Hey all, I'm revisiting an old brick wall I ran into with getting Feature Server to read from postGIS.  I was hoping to have a working example for a conference in September.  Maybe we'll have an epiphany.  I'll go ahead and say my unix and apache knowledge is mediocre.
<br><br>Here's my problem:<br><pre>An error occurred: could not connect to server: Permission denied<br>        Is the server running locally and accepting<br><br>        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
<br><br>  File "./FeatureServer/Server.py", line 232, in cgiHandler<br>    format, content = service.dispatchRequest( params, path_info, host, post_data, request_method, accepts )<br><br>  File "./FeatureServer/Server.py", line 105, in dispatchRequest
<br>    datasource.begin()<br>  File "./FeatureServer/DataSource/PostGIS.py", line 19, in begin<br>    self.db = psycopg2.connect(self.dsn<br>)<br></pre><br>I'm running Apache as root.  (I didn't set this up, but apparently it was a prepackaged Apache with RedHat and he had problems when not run as root).  PostGIS *MUST* be started and accessed as "postgres".
<br>I have the entire FeatureServer directory running as "psotgres" user.<br><br>[root@niceguy tmp]# ll .s.* -a<br>srwxrwxrwx  1 postgres postgres  0 Aug 15 14:42 .s.PGSQL.5432<br>-rwxrwxrwx  1 postgres postgres 28 Aug 15 14:42 .s.PGSQL.5432.lock
<br><br>This is the lock file, which has 777 permissions.<br><br>When I try from command line as "root":<br>>>> db = psycopg2.connect("dbname=test")<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in ?
<br>psycopg2.OperationalError: FATAL:  role "root" does not exist<br><br>When I try from command line as "postgres":<br>[postgres@niceguy cgi-bin]$ python<br>>>> import psycopg2<br>>>> db = 
psycopg2.connect("dbname=test")<br>>>> print db.status<br>1<br><br>It looks (to me) like the python in FeatureServer is not getting executed as postgres, because it connects fine from the command-line.  
<br><br>So, one question is: Has anyone gotten FeatureServer to read from postGIS? Would you mind telling me a bit about your setup (webserver, users, etc.).  <br><br>Other than that, anyone have any ideas?<br>Thanks.<br>
-Ed<br>