I have MapServer 6.04 running in CentOS 6.7. I am able to serve shapefiles and GeoJSON, but when I try to connect to a PostGIS (2.1.8) enabled PostgreSQL (9.4.5) database it fails with the error: Database connection failed
. I can connect to the database via QGIS and python from other machines. I can also run ogrinfo PG:"user=radar dbname=radar" ktlx -summary
and get the following output:
Layer name: ktlx
Geometry: 3D Multi Polygon
Feature Count: 6
Extent: (-98.807300, 32.737200) - (-93.488900, 36.542300)
Layer SRS WKT:
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4269"]]
FID Column = index
Geometry Column = geom
radar: String (0.0)
val: Integer (3.0)
The connection info in my .map file is:
CONNECTIONTYPE postgis
CONNECTION "host=127.0.0.1 dbname=radar user=radar"
Every reference I have found in the documentation indicates that the the CONNECTIONTYPE
and CONNECTION
strings I am using are correct. Is there a different connection string to use?