[postgis-users] Problem with mapserver-postgis

Prashanth Ram pram123 at gmail.com
Sat Oct 15 14:47:06 PDT 2005


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> 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
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>


--
HTMLX.com
Mapserver Hosting, Mapscript Hosting, PHP Hosting
PostgreSQL w/PostGIS extension enabled Hosting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20051015/3c7fe501/attachment.html>


More information about the postgis-users mailing list