Res: Re: [UMN_MAPSERVER-USERS] Res: Re: Res: Re: [UMN_MAPSERVER-USERS] Fw: Postgis Connection

Benjamin Thelen bt at CCGIS.DE
Fri Jul 1 08:17:13 EDT 2005


Ezequias Rodrigues da Rocha wrote:
> All looks to be correct. I am becoming to be worried.
>  
> ps: Your e-mails are comming twice. Some times three times. Check it out.
>  
> Thank you for your attention
>  
> Sincerely
> ezequias 
>  
> /-------Mensagem original-------/
>  
> /*De:*/ Benjamin Thelen <mailto:bt at CCGIS.DE>
> /*Data:*/ 07/01/05 08:16:01
> /*Para:*/ MAPSERVER-USERS at LISTS.UMN.EDU 
> <mailto:MAPSERVER-USERS at LISTS.UMN.EDU>
> /*Assunto:*/ Re: [UMN_MAPSERVER-USERS] Res: Re: Res: Re: 
> [UMN_MAPSERVER-USERS] Fw: Postgis Connection
>  
> Ezequias Rodrigues da Rocha wrote:
>  > I do heve this line. See below:
>  >
>  >
>  >
>  > 
> #---------------------------------------------------------------------------
>  > # CONNECTIONS AND AUTHENTICATION
>  > 
> #---------------------------------------------------------------------------
>  >
>  > # - Connection Settings -
>  >
>  > listen_addresses = '*'  # what IP interface(s) to listen on;
>  >                                 # defaults to localhost, '*' = any
>  > port = 5432
>  > max_connections = 100
>  >
>  > Still waitting
>  > Ezequias
>  >
>  > /-------Mensagem original-------/
>  >
>  > /*De:*/ Benjamin Thelen <mailto:bt at ccgis.de>
>  > /*Data:*/ 07/01/05 05:55:31
>  > /*Para:*/ Ezequias Rodrigues da Rocha <mailto:ezequias at recife.pe.gov.br>
>  > /*Cc:*/ Benjamin Thelen <mailto:bt at ccgis.de>
>  > /*Assunto:*/ Re: Res: Re: [UMN_MAPSERVER-USERS] Fw: Postgis Connection
>  >
>  > Ezequias Rodrigues da Rocha wrote:
>  >  > I didn't find the tcpip_socket parameter and put it in sume point 
> on my
>  >  > postgresql.conf.
>  >  >
>  >  > But now I can't start my postgresql 8.0 (# ./postmaster -D
>  >  > /usr/local/pgsql/data)
>  >  >
>  >  > Please see what is wrong
>  >  >
>  >  > The error reported was:
>  >  >
>  >  > [postgres at mangueira bin]$ FATAL:  unrecognized configuration parameter
>  >  > "tcpip_socket"
>  >  >
>  >  > My pg_hba.conf is:
>  >  >
>  >  > [postgres at mangueira data]$ more pg_hba.conf
>  >  > # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
>  >  >
>  >  > # "local" is for Unix domain socket connections only
>  >  > local   all         all                               trust
>  >  > # IPv4 local connections:
>  >  > host    all         all         10.0.0.0 255.0.0.0    password
>  >  > host    all         all         192.168.0.0 255.0.0.0 password
>  >  > host    all         all         127.0.0.1/32          trust
>  >  > host    all         all         200.249.133.135 255.255.255.255
>  >  > password
>  >  > # IPv6 local connections:
>  >  > host    all         all         ::1/128               trust
>  >  > I believe there is no problem because I am on the network 10 and the
>  >  > server on the 192
>  >  >
>  >  > Some more advices ?
>  
>  
> Ezequias,
>  
> You can ping the pgsql-server from your mapserver-server?
> # ping lab1.recife
>  
> The pgsql-server listens on port 5432? Check with:
> # netstat -tan -ptcp.
>  
> You corrected the typo "dbname=dbpotgis"?
> You are sure about the password for the dbuser? Can you log into the
> database from the command line and access the tables?
> # psql -Upostgres -ddbpostgis
>  
> If you are not sure about the password, change "password" to "trust" in
> pg_hba.conf. Also, I would recommend to change "password" to "md5" for
> encrypted passwords.
>  
>  
> Well, at the moment, I have no more ideas, sorry!
>  
> Ben
>  
>  
>  >  >
>  >  > Best regards
>  >  > Ezequias
>  >  >
>  >  > /-------Mensagem original-------/
>  >  >
>  >  > /*De:*/ Benjamin Thelen <mailto:bt at CCGIS.DE>
>  >  > /*Data:*/ 06/30/05 12:43:52
>  >  > /*Para:*/ MAPSERVER-USERS at LISTS.UMN.EDU 
> <mailto:MAPSERVER-USERS at LISTS.UMN.EDU>
>  > <mailto:MAPSERVER-USERS at LISTS.UMN.EDU>
>  >  > <mailto:MAPSERVER-USERS at LISTS.UMN.EDU>
>  >  > /*Assunto:*/ Re: [UMN_MAPSERVER-USERS] Fw: Postgis Connection
>  >  >
>  >  > 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>
>  > <http://www.recife.pe.gov.br>
>  >  > <http://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>
>  > <mailto:ezequias at hotmail.com> <mailto: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
>  >  >
>  >  >
>  >  > Add FUN to your email - CLICK HERE!
>  >  > <http://www.incredimail.com/index.asp?id=54760>
>  >
>  > Ezequias,
>  >
>  > As you're using postgresql 8, you must remove the tcpip_socket
>  > parameter, because it's a paramater used in earlier postgresql versions.
>  > Look again into your posgresql.conf. You'll need to have the following
>  > at the beginning of the file:
>  >
>  > listen_addresses = '*' # what IP interface(s) to listen on;
>  >      # defaults to localhost, '*' = any
>  >
>  > Restart pgsql.
>  >
>  > Ben
>  >
>  >
>  >
>  >
>  >
>  > Add FUN to your email - CLICK HERE!
>  > <http://www.incredimail.com/index.asp?id=54760>
> 		
> 
> Add FUN to your email - CLICK HERE! 
> <http://www.incredimail.com/index.asp?id=54760>



Ezequias,

Please always reply to the list!

Of course you receive the mails twice. One Mail goes to the list and the 
other to you directly. Some list-members only reply to the list, but 
most reply to both.



Another point, please do not top post!


I'm afraid, that I have no more ideas! Your problem needs hard debugging 
;-).

Install pgadmin-III and/or phppgadmin and try to connect to your 
pgsql-server from your mapserver-server, also you could try to connect 
from your remote machine from command-line with "psql -Upostgres 
-hlab1.recife -ddbpostgis".


As your machines are on different network segments, it is quite likely, 
that port 5432 is blocked by a firewall - you have to ask your IT to 
unlock this port.



Ben



More information about the mapserver-users mailing list