[postgis-users] Problem with mapserver-postgis

Paul Scott pscott at uwc.ac.za
Sun Oct 16 12:11:49 PDT 2005


Have you checked your pg_hba.conf that the localhost or 127.0.0.1 entry
is a trusted user? If not try setting the ident part to trust and
restart the server.

--Paul

On Sun, 2005-10-16 at 18:55 +0000, Juan Barón wrote:
> I have pulled up postmaster with - i  and it continues without working
> 
> 
> 
> 
>         
>         ______________________________________________________________
>         From:  Armin Burger <armin.burger at gmx.net>
>         Reply-To:  PostGIS Users Discussion
>         <postgis-users at postgis.refractions.net>
>         To:  PostGIS Users Discussion
>         <postgis-users at postgis.refractions.net>
>         Subject:  Re: [postgis-users] Problem with mapserver-postgis
>         Date:  Sun, 16 Oct 2005 12:57:56 +0200
>         >Is postmaster started with the -i option (enable TCP/IP 
>         >connections)?
>         >
>         >Armin
>         >
>         >Juan Barón wrote:
>         >>Hi:
>         >>
>         >>I have changed the connection string writing the password:
>         >>
>         >>CONNECTION "user=postgres password=postgres
>         dbname=pruebapostgis 
>         >>host=localhost port=5432"
>         >>
>         >>and I obtain the same result:
>         >>
>         >>msDrawMap(): Image handling error. Failed to draw layer
>         named 
>         >>'callejero'.
>         >>msPOSTGISLayerOpen(): Query error. couldnt make connection
>         to DB 
>         >>with connect string 'user=postgres password=postgres 
>         >>dbname=pruebapostgis host=localhost port=5432'.
>         >>Error reported was 'could not translate host name
>         "localhost" to 
>         >>address: Unknown host '.
>         >>This error occured when trying to make a connection to the 
>         >>specified postgresql server.
>         >>Most commonly this is caused by
>         >>(1) incorrect connection string
>         >>(2) you didnt specify a 'user=...' in your connection string
>         >>(3) the postmaster (postgresql server) isnt running
>         >>(4) you are not allowing TCP/IP connection to the postmaster
>         >>(5) your postmaster is not running on the correct port - if
>         its not 
>         >>on 5432 you must specify a 'port=...'
>         >>(6) the security on your system does not allow the
>         webserver 
>         >>(usually user 'nobody') to make socket connections to the 
>         >>postmaster
>         >>(7) you forgot to specify a 'host=...' if the postmaster is
>         on a 
>         >>different machine
>         >>(8) you made a typo
>         >>
>         >>I have also proven to connect me to the db from the command
>         prompt 
>         >>with the login information and I connect myself well:
>         >>
>         >>psql  pruebapostgis  -U postgres
>         >>
>         >>somebody knows which is the problem, it seems that it
>         doesn't 
>         >>transfer localhost to an address, I have also proven with
>         127.0.0.1 
>         >>and neither it works
>         >>
>         >>
>         >>
>         >>
>         >>
>         >>------------------------------------------------------------------------
>         >>
>         >>     From:  /Prashanth Ram <pram123 at gmail.com>/
>         >>     Reply-To:  /pram at pramcentral.com,PostGIS Users
>         Discussion
>         >>     <postgis-users at postgis.refractions.net>/
>         >>     To:  /PostGIS Users Discussion 
>         >><postgis-users at postgis.refractions.net>/
>         >>     Subject:  /Re: [postgis-users] Problem with
>         mapserver-postgis/
>         >>     Date:  /Sat, 15 Oct 2005 17:47:06 -0400/
>         >>
>         >>     Juan:
>         >>        Have you tried connecting to the db from the command
>         prompt 
>         >>with
>         >>     the login information?
>         >>       Also, the connection string is missing the password
>         >>
>         >>     -Prashanth
>         >>
>         >>
>         >>     --     HTMLX.com
>         >>     Mapserver Hosting, Mapscript Hosting, PHP Hosting
>         >>     PostgreSQL w/PostGIS extension enabled Hosting
>         >>
>         >>     On 10/15/05, *Juan Barón* <jbarong at hotmail.com
>         >>     <mailto:jbarong at hotmail.com>> wrote:
>         >>
>         >>Hello list,
>         >>
>         >>I am using mapserver 4.4.1 and postgresql 8.0 with postgis.
>         >>
>         >>
>         >>
>         >>         I have a layer in the map file:
>         >>
>         >>         LAYER
>         >>           CONNECTIONTYPE postgis
>         >>             NAME callejero
>         >>             CONNECTION "user=postgres dbname=pruebapostgis 
>         >>host=localhost
>         >>         port=5432"
>         >>             DATA "the_geom from tablacallejero"
>         >>
>         >>             STATUS DEFAULT
>         >>             TYPE LINE
>         >>             CLASS
>         >>              COLOR 255 0 0
>         >>             END
>         >>         END
>         >>
>         >>         and when I execute the application, the layer
>         doesn't 
>         >>appear me         and the
>         >>         result is a message for screen:
>         >>
>         >>         msDrawMap(): Image handling error. Failed to draw
>         layer 
>         >>named
>         >>         'callejero'.
>         >>
>         >>         msPOSTGISLayerOpen(): Query error. couldnt make
>         connection 
>         >>to DB
>         >>         with
>         >>         connect string 'user=postgres dbname=pruebapostgis 
>         >>host=localhost
>         >>         port=5432'.
>         >>         Error reported was 'could not translate host name 
>         >>"localhost" to
>         >>         address:
>         >>
>         >>         Unknown host '.
>         >>         This error occured when trying to make a connection
>         to the 
>         >>specified
>         >>         postgresql server.
>         >>         Most commonly this is caused by
>         >>         (1) incorrect connection string
>         >>         (2) you didnt specify a 'user=...' in your
>         connection 
>         >>string
>         >>
>         >>         (3) the postmaster (postgresql server) isnt running
>         >>         (4) you are not allowing TCP/IP connection to the 
>         >>postmaster
>         >>         (5) your postmaster is not running on the correct
>         port - 
>         >>if its
>         >>         not on
>         >>         5432 you must specify a 'port=...'
>         >>
>         >>         (6) the security on your system does not allow the 
>         >>webserver
>         >>         (usually
>         >>         user 'nobody') to make socket connections to the 
>         >>postmaster
>         >>         (7) you forgot to specify a 'host=...' if the
>         postmaster 
>         >>is on a
>         >>         different
>         >>         machine
>         >>
>         >>         (8) you made a typo
>         >>
>         >>         I have proven to change localhost for 127.0.0.1
>         >>         <http://127.0.0.1/>, but the result is the
>         >>         same one.
>         >>
>         >>         postgresql this being executed, because if I put
>         netstat - 
>         >>na
>         >>         appears:
>         >>
>         >>         TCP 127.0.0.1:5432
>         <http://127.0.0.1:5432/>  LISTENING
>         >>
>         >>         I don't know which is the problem.
>         >>
>         >>         Thank's
>         >>
>         >>
>         >>
>         >>
>         >>         _______________________________________________
>         >>         postgis-users mailing list
>         >>         postgis-users at postgis.refractions.net
>         >>         <mailto:postgis-users at postgis.refractions.net>
>         >>         
>         >>http://postgis.refractions.net/mailman/listinfo/postgis-users
>         >>
>         >>
>         >>
>         >>
>         >>
>         >>
>         >>     --     HTMLX.com
>         >>     Mapserver Hosting, Mapscript Hosting, PHP Hosting
>         >>     PostgreSQL w/PostGIS extension enabled Hosting
>         >>
>         >>      >_______________________________________________
>         >>      >postgis-users mailing list
>         >>      >postgis-users at postgis.refractions.net
>         >>      
>         >>
>         >http://postgis.refractions.net/mailman/listinfo/postgis-users
>         >>
>         >>
>         >>------------------------------------------------------------------------
>         >>
>         >>_______________________________________________
>         >>postgis-users mailing list
>         >>postgis-users at postgis.refractions.net
>         >>http://postgis.refractions.net/mailman/listinfo/postgis-users
>         >_______________________________________________
>         >postgis-users mailing list
>         >postgis-users at postgis.refractions.net
>         >http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list