Fw: Postgis Connection
Benjamin Thelen
bt at CCGIS.DE
Thu Jun 30 08:58:18 PDT 2005
Ezequias Rodrigues da Rocha wrote:
> I am trying to load a mapserver service with a postgis connection but
> the MS reported this message below:
>
>
> msDrawMap(): Image handling error. Failed to draw layer named 'bairros'.
> msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with
> connect string 'user=postgres password=post dbname=dbpotgis
> host=lab1.recife port=5432'.
> Error reported was 'could not create socket: Permission denied '.
> 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
> Does anyone can tell me what to do ?
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Atenciosamente (Sincerely)
> *Ezequias Rodrigues da Rocha*
> *** *www.recife.pe.gov.br*
> <http://www.recife.pe.gov.br/>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> A pior das democracias ainda é melhor do que a melhor das ditaduras
> The worst of democracies is still better than the better of dictatorships
> MSN Messenger: ezequias at hotmail.com <mailto:ezequias at hotmail.com>
>
>
> Add FUN to your email - CLICK HERE!
> <http://www.incredimail.com/index.asp?id=54760>
Ezequias,
Well, I think one cannot make more suggestions you already got from the
error messages!
I assume your postgres is running and your connection string is correct,
but you should send it to the list, too.
A common error is, that the postgresql-server does not accept tcp/ip
connections. Check your postgresql.conf: "tcpip_socket = true" must be
there.
Second, check your pg_hba.conf: There has to be an entry that allows
your "mapserver-host" to connect to the server, such as
for remote access of the network 192.168.100.0:
host all all 192.168.100.0 255.255.255.0 trust
or for local access, if mapserver and pgsql are on the same host:
host all all 127.0.0.1 255.255.255.255 trust
Hope, that helps!
Ben
More information about the MapServer-users
mailing list