Search Postgresql Archives

problem connecting to postgres via apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm having a problem connecting to postgres via a CGI program.  I can connect just fine using the same connect string in a non-cgi perl program as in the perl cgi program.  The error I get is this:

ERROR: Unable to connect to dbname testdb2, err: could not connect to server: Permission denied
Is the server running on host "jacensolo.red.dsic.com" (192.168.10.16) and accepting
TCP/IP connections on port 5432?

I tried adding postgres to the apache user's groups, because I saw something on google that said that that is needed for the socket connection to work, but it didn't help.

I just tried stopping and restarting apache, and when I try to start I get this:


apachectl start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

I took away the group permission for postgres, just in case that had messed up something, but it didn't help.  Now I can't even start apache.

But, if I do:

[scassidy@jacensolo init.d]$ ps auxww|grep http
apache   15426  0.0  0.0 186416  2740 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
apache   15427  0.0  0.0 186416  2720 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
apache   15428  0.0  0.0 186416  3004 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
apache   15429  0.0  0.0 186416  2740 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
apache   15430  0.0  0.0 186416  2724 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
apache   15431  0.0  0.0 186416  2740 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
apache   15432  0.0  0.0 186416  2988 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
apache   15433  0.0  0.0 186416  2988 ?        S    Jan19   0:00 /usr/sbin/httpd -k start
root     18778  0.0  0.0 184208  2408 ?        Ss    2013   2:25 /usr/sbin/httpd -k start

I'm seeing processes that apparently shouldn't be there.  Maybe that's why it can't connect, because it is already connected?


Should I just kill those processes, do you think?

What could have happened?  It was working just fine before.

Very mysterious.


Susan



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux