[mapserver-users] mapserver5 postgis connection problem

Richard Duivenvoorde rdmailings at duif.net
Thu May 26 17:58:02 EDT 2011


Like somebody else in the list I have a strange problem with MS6 on a
fresh RHEL6 machine. Running the same data and mapfile in an older MS works.
Below as much info I could get.
Anybody a clue?
I can recompile or add debug statements if nessecary (will be on irc
tomorrow morning)

Regards,

Richard Duivenvoorde


I fail to get a postgres connection log somewhere on this machine...

a new installed RHEL6 machine:
Red Hat Enterprise Linux Server release 6.0 (Santiago)

running
"PostgreSQL 8.4.8 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
4.4.4 20100726 (Red Hat 4.4.4-13), 64-bit"
and
"1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"

mapserver -v gives
MapServer version 6.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WCS_SERVER INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

I've done a gdal and mapserver compile myself

A database with OSM data and mapfile with connectionstring like:
CONNECTION "host=localhost dbname=osm password=xxxx user=geo"
keeps saying:
Permission denied Is the server running on host "localhost" and
accepting TCP/IP connections on port 5432? ) with connect string
'host=localhost dbname=osm password=******* user=geo'

while:
- I can connect with that user/password via psql
- can use shp2img and the same mapfile (generating a map)
- can do
ogrinfo -ro PG:'host=localhost user=geo password=xxxxxx dbname=osm' -sql
"select count(*) from mytable"
- even tried trust for all hosts in pg_hba.conf

setting debug in LAYER at 5

-- first part is from wms request (failing connection):
[Thu May 26 23:45:30 2011].566614 msPostGISLayerOpen called: way28992
from nl_osm_point using unique osm_id using srid=28992
[Thu May 26 23:45:30 2011].566704 msPostGISLayerOpen: No connection in
pool, creating a fresh one.
[Thu May 26 23:45:30 2011].568103 msPostGISLayerOpen: Connection failure.
[Thu May 26 23:45:30 2011].568123 msPostGISLayerOpen(): Query error.
Database connection failed (could not connect to server: Permission denied
        Is the server running on host "localhost" and accepting
        TCP/IP connections on port 5432?
could not connect to server: Permission denied
        Is the server running on host "localhost" and accepting
        TCP/IP connections on port 5432?
) with connect string 'host=localhost dbname=osm password=******* user=geo'
Is the database running? Is it allowing connections? Does the specified
user exist? Is the password valid? Is the database on the standard port?
[Thu May 26 23:45:30 2011].568138 msDrawMap(): Image handling error.
Failed to draw layer named 'plaatsen'.
[Thu May 26 23:45:30 2011].568224 msPostGISLayerClose called: way28992
from nl_osm_point using unique osm_id using srid=28992
[Thu May 26 23:45:30 2011].568238 freeLayer(): freeing layer at 0x1c67250.
[Thu May 26 23:45:30 2011].568243 msPostGISLayerIsOpen called.
[Thu May 26 23:45:30 2011].568251 freeLayer(): freeing layer at 0x1c6a7f0.
[Thu May 26 23:45:30 2011].568255 msPostGISLayerIsOpen called.

-- This part is from shp2img (connection succesfull):
[Thu May 26 23:47:55 2011].3388 msLayerIsVisible(): Skipping layer
(plaatsen) because no CLASS in the layer is in-scale for this MAP scale
[Thu May 26 23:47:55 2011].3450 msLayerIsVisible(): Skipping layer
(plaatsen) because no CLASS in the layer is in-scale for this MAP scale
[Thu May 26 23:47:55 2011].3457 msLayerIsVisible(): Skipping layer
(plaatsen) because no CLASS in the layer is in-scale for this MAP scale
[Thu May 26 23:47:55 2011].3470 msPostGISLayerOpen called: way28992 from
(select way28992, z_order, landuse, osm_id, name from nl_osm_polygon
order by z_order) as foo using unique osm_id using srid=28992
[Thu May 26 23:47:55 2011].3478 msPostGISLayerOpen: No connection in
pool, creating a fresh one.
[Thu May 26 23:47:55 2011].16884
msConnPoolRegister(residentialandindustry,host=localhost dbname=osm
password=xxxx user=geo,0x18ff430)
[Thu May 26 23:47:55 2011].27950 msPostGISLayerOpen: Got PostGIS version
10500.
[Thu May 26 23:47:55 2011].27963 msPostGISLayerFreeItemInfo called.
[Thu May 26 23:47:55 2011].27971 msPostGISLayerInitItemInfo called.
[Thu May 26 23:47:55 2011].27986 msPostGISLayerWhichShapes called.
[Thu May 26 23:47:55 2011].27992 msPostGISParseData called.
[Thu May 26 23:47:55 2011].28008 msPostGISParseData:
unique_column=osm_id, srid=28992, geom_column_name=way28992,
table_name=(select way28992, z_order, landuse, osm_id, name from
nl_osm_polygon order by z_order) as foo
[Thu May 26 23:47:55 2011].28012 msPostGISBuildSQL called.
[Thu May 26 23:47:55 2011].28016 msPostGISBuildSQLItems called.
[Thu May 26 23:47:55 2011].28021 msPostGISBuildSQLItems: 2 items requested.
[Thu May 26 23:47:55 2011].28025 msPostGISBuildSQLFrom called.
[Thu May 26 23:47:55 2011].28031 msPostGISBuildSQLWhere called.
[Thu May 26 23:47:55 2011].28034 msPostGISBuildSQLSRID called.
[Thu May 26 23:47:55 2011].28038 msPostGISBuildSQLSRID: SRID provided
(28992)
[Thu May 26 23:47:55 2011].28041 msPostGISBuildSQLBox called.
...


More information about the mapserver-users mailing list