[mapserver-users] PostGIS Connection Failure
Krishna Priya Patury
krishna.patury at gmail.com
Mon Jun 23 13:21:26 PDT 2014
Hi There,
I'm getting the below error when I try to access an application uisng
PostGis. Both the Postgres database and the mapserver installation are on
the same CentosOS 64 bit VM.
msPostGISLayerOpen(): Query error. Database connection failed(could not
connect to server: Permission denied Is the server running on
"localhost"(::1) and accepting TCP/IP connections on port 5432).
I know my application works as the same application is working just fine on
a different installation. On this installation I can connection to the
database using the same parameters using PSQL and I can generate the image
just fine using the shp2imp or the running the mapserver directly using
QUERY_STRING as below.
shp2img -m mapfile -all_debug 5
./mapserver QUERY_STRING='map=xxx etc'
Apache is running under the apache user, and Postgres as postgres but I can
run the above commands as an apache user and still runs fine.
I am not quite sure at this point why I cannot connect using the
application. I checked to make sure there are no firewalls enabled.
Below is my pg_bha.conf file entries:
local all all trust
host all 0.0.0.0/0 trust
In the postgresql.conf file, listen_addresses is set to all:
listen_addresses='*'
Any advice would be appreciated.
Thanks,
Krishna.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140623/1cf63298/attachment.htm>
More information about the MapServer-users
mailing list