[Featureserver] FeatureServer connection to PostGIS

Christopher Schmidt crschmidt at metacarta.com
Fri Jul 13 11:46:12 EDT 2007


On Fri, Jul 13, 2007 at 10:42:27AM -0500, Ed Fialkowski wrote:
> Now, changing the import and all calls in PostGIS.py to psycopg2 seemed to
> work, actually.

I haven't tested it with psycopg2, so I don't know if the API changed.
We'll assume for now it hasn't, because either way, we're at least
moving forward :)

> Unfortunately, now I'm getting permission denied.
> 
> An error occurred: could not connect to server: Permission denied
> 	Is the server running locally and accepting
> 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
> 
>  File "./FeatureServer/Server.py", line 232, in cgiHandler
> 
>    format, content = service.dispatchRequest( params, path_info,
> host, post_data, request_method, accepts )
>  File "./FeatureServer/Server.py", line 105, in dispatchRequest
>    datasource.begin()
>  File "./FeatureServer/DataSource/PostGIS.py", line 19, in begin
> 
>    self.db = psycopg2.connect(self.dsn)

What is your dsn? (Set in your featureserver.cfg.) Can you connect via
psycopg2.connect("db=foo"), etc. in the command line interpreter?

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list