[postgis-users] Mapserver and Postgis

Ezequias Rodrigues da Rocha ezequias at recife.pe.gov.br
Tue Mar 28 05:36:35 PST 2006


Yes, I have a root account on webserver.

Best regards...
Ezequias

Obe, Regina DND\MIS escreveu:
> It could be that your webserver doesn't allow outbound connections on
> 5432 because it has a firewall in front blocking.  As Greg mentioned it
> sounds like you aren't connecting at all.
>
> Do you have root access to your webserver?
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] 
> Sent: Tuesday, March 28, 2006 8:02 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Mapserver and Postgis
>
>
> Gregory,
> Many thanks but there is notthing on the  postgresql-Tue.log :-( .
>
> I can start and stop the postgresql without problem. I use postmaster -D
>
> way.
>
> Another thing. How can I ping using mapserver ?
> Another thing2:I can log to postgis using ssh connection (as root and 
> after as postgres user).
> Another thing3:There is no password to postgis ( linux )user. The 
> postgis (database) user has yes a password (and I used on the map file)
>
> I hope  you could understand my enviroment.
>
> Ezequias
>
> Gregory S. Williamson escreveu:
>   
>> Ezequias --
>>
>> What does the postgres log say ? That's a good place to start 
>> debugging this.
>>
>> The text that you quoted has several very good suggestions; assuming 
>> that the connection string seems rational to you, i.e. user, password,
>>     
>
>   
>> server and database are all sane, I would suggest making sure that you
>>     
>
>   
>> can can ping the postgres server from the mapserver ... if so
>>
>> Check the postgres log and see if it is refusing the connection. if it
>>     
>
>   
>> is you need to add the postgres user (not a great idea to exposte the 
>> DBA account as a working account, but that's another issue) and the IP
>>     
>
>   
>> address to the .hba file on the postres server. That file controls who
>>     
>
>   
>> can connect and can't; it is in the root of the directory the postgres
>>     
>
>   
>> database was created in.
>>
>> If there is nothing in the log I'd suspect the TCP issue, or some 
>> routing issue since postgres will write a useful message if an 
>> un-authorized user tries to connect. Presumably the postgres user has 
>> permissions to connect to the database and access the tables.
>>
>> It is possible the postgres instance was not started with the proper 
>> to allow TCP/IP connections; that is controlled by the script that 
>> starts the postgres database. I'm not sure if the error log would show
>>     
>
>   
>> anything in this case.
>>
>> HTH, post back your results and maybe others can help more.
>>
>> Greg Williamson
>> DBA
>> GlobeXplorer LLC
>> -----Original Message-----
>> From:	postgis-users-bounces at postgis.refractions.net on behalf of
>>     
> Ezequias Rodrigues da Rocha
>   
>> Sent:	Tue 3/28/2006 4:35 AM
>> To:	PostGIS Users Discussion
>> Cc:	
>> Subject:	[postgis-users] Mapserver and Postgis
>>
>> Hi list,
>>
>> I don't know if this is a off-topic, but as nobody from mapserver 
>> could
>> solve my problem I will report to you now.
>>
>> I am trying to connect my mapserver project to PostGIS but my browser
>> always report the folowing error:
>> msDrawMap(): Image handling error. Failed to draw layer named
>>     
> 'bairros'.
>   
>> msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with 
>> connect string 'user=postgres password=***** dbname=db host=xxx.xxx 
>> 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
>>
>> Could someone help me. As simple as possible would be very glad.
>>
>> Sincerely...
>>
>>   
>>     
>
>   

-- 
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com
msn:ezequias at hotmail.com
"the worst of democracies is still better than the best of dictatorship"




More information about the postgis-users mailing list