[mapserver-users] PostGIS Connection String - Thread Issue?
Trent Pingenot
pintj at hotmail.com
Fri Feb 3 08:16:16 PST 2012
Thomas,
That did it! I had tried removing the single quotes from the username, but not the db, but not both, I can't remember. By removing single quotes around
both the dbname and the username it started working. It's still strange to me that it works with single quotes on all my other sites.
Thanks for your suggestion!
Trent
> Date: Fri, 3 Feb 2012 09:33:15 +0100
> Subject: Re: [mapserver-users] PostGIS Connection String - Thread Issue?
> From: thomas.bonfort at gmail.com
> To: pintj at hotmail.com
> CC: mapserver-users at lists.osgeo.org
>
> 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
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120203/a70d6e76/attachment.htm>
More information about the MapServer-users
mailing list