[mapserver-users] PostGIS Connection String - Thread Issue?

thomas bonfort thomas.bonfort at gmail.com
Fri Feb 3 00:33:15 PST 2012


There were some changes to string quoting/escaping in version 6 (I think).

Are the errors you are seeing intermittent, or is it reproducible
consistently on all requests?
What happens if you use

CONNECTION "dbname=interlocken user=interlocken ..."

instead of

CONNECTION "dbname='interlocken' user='interlocken' ..."

--
thomas

On Thu, Feb 2, 2012 at 23:00, Trent Pingenot <pintj at hotmail.com> wrote:
> Hi list,
>
> We recently upgraded from MapServer 5.x to 6.0.1 on Linux.  We have 21 sites
> running all running smoothly with identical configurations off this server.
> On one site the MapServer connection to Postgres/PostGIS fails on all
> layers.  The MS debug message is as follows
>
> [Thu Feb  2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error.
> Database connection failed (FATAL:  no pg_hba.conf entry for host "[local]",
> user "interlocken", database "nterlocNken", SSL off
> ) with connect string 'dbname='nterlocNken' user='interlocken'
> password=*******************'
>
> And the entry in the map file
>
>     CONNECTIONTYPE postgis
>     PROCESSING "CLOSE_CONNECTION=DEFER"
>     CONNECTION "dbname='interlocken' user='interlocken'
> password='**************'"
>     DATA 'the_geom FROM "ext_lighting_existing_point" USING UNIQUE gid USING
> srid=4326'
>
> I can log into psql on the server as the interlocken user and hit the DB
> just fine so it's not the pg_hba.conf file settings which are set that the
> db username and db name must match.  My question is why
> does the dbname get corrupted to nterlocNken? Is this a bug or how mapserver
> should present the connection items in a debug statement?  I can use our old
> copy 5.4 copy of mapserver and it runs the map file fine.  One difference in
> this build is that we don't have the --with-threads support. We are looking
> at getting the build rebuilt with this thread locking option included.
> Could threading be the problem? I'm not sure how/if threading might be
> related but thought I would mention it.
>
> I've stripped out all layers from the mapfile except a single test layer.
> I've got 60+ layers running in other map files and databases with identical
> setups  on the same server without problems, why this one?  We even tried
> wiping out the DB and associated user and reloading and still the same
> problem.
>
> Thanks in advance for any help or tips you can provide.
>
> Thanks,
>
> Trent
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the MapServer-users mailing list