[Bug 857459] New: PHP can't access Postgres DB if apache is started via systemd
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c0 Summary: PHP can't access Postgres DB if apache is started via systemd Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: i586 OS/Version: openSUSE 13.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: markus@gaugusch.at QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 I run a davical server on my openSUSE 13.1 installation. It is configured to use a postgres92 server. Everything was running fine on openSUSE 12.3, I updated it using "zypper dup". Since this upgrade, davical can no longer access the postgres database, showing the following messages: Jan 05 23:03:01 zephyrus httpd2-prefork[8835]: Unable to connect to database: SQLSTATE[08006] [7] could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?... Jan 05 23:03:01 zephyrus httpd2-prefork[8835]: PHP Fatal error: PDO connection error 'pgsql:dbname=davical port=5432 user=davical_app': SQLSTATE[08006] [7] could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? in /usr/share/awl/inc/AwlDBDialect.php on line 81... The DB is running fine, I can connect using psql. Even more weird: If I don't start apache using "service apache2 start", but use the commandline shown from "ps aux" after starting it via systemd, there is no problem: # /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL -DMAILMAN -DPNP4NAGIOS -DTRAC_MODPYTHON -D SYSTEMD -DFOREGROUND -k start The socket file exists in /tmp and is readable by user wwwrun. I have no idea what's wrong, but it seems that systemd is the culprit. There are no error messages except the one above shown in journalctl Reproducible: Always Steps to Reproduce: 1. start apache via systemd 2. open url which causes access to postgres DB Actual Results: error message in journalctl -f, PHP web app fails Expected Results: No failure, function as with 12.3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c zhang jiajun <jzhang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jzhang@suse.com AssignedTo|bnc-team-screening@forge.pr |max@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c2 Victor Kasatkin <victor.aka@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor.aka@gmail.com --- Comment #2 from Victor Kasatkin <victor.aka@gmail.com> 2014-01-06 19:10:48 UTC --- perl work with the same error 13.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c3 --- Comment #3 from Victor Kasatkin <victor.aka@gmail.com> 2014-01-06 19:34:14 UTC --- now problem resolved by edit /usr/lib/systemd/system/apache2.service set PrivateTmp=false and run systemctl daemon-reload systemctl restart apache2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c Xiyuan Liu <xyliu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xyliu@suse.com AssignedTo|bnc-team-screening@forge.pr |systemd-maintainers@suse.de |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c4 systemd maintainers <systemd-maintainers@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |draht@suse.com, | |systemd-maintainers@suse.de Component|Basesystem |Apache AssignedTo|systemd-maintainers@suse.de |bnc-team-apache@forge.provo | |.novell.com --- Comment #4 from systemd maintainers <systemd-maintainers@suse.de> 2014-01-07 08:24:43 UTC --- This is not a systemd bug -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c5 Markus Gaugusch <markus@gaugusch.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Apache |Other AssignedTo|bnc-team-apache@forge.provo |bnc-team-screening@forge.pr |.novell.com |ovo.novell.com --- Comment #5 from Markus Gaugusch <markus@gaugusch.at> 2014-03-14 07:22:48 UTC --- After the last systemd update, I've run again into the same situation. I'm sure it is no apache bug, because it can't do anything. I'd suggest to fix it in Postgres, such as done here: https://bugs.archlinux.org/task/31436 Can you assign this to postgres developers? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c Stefan Fent <stefan.fent@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |max@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857459 https://bugzilla.novell.com/show_bug.cgi?id=857459#c6 Reinhard Max <max@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #6 from Reinhard Max <max@suse.com> 2014-08-06 15:07:35 CEST --- Fixed in Factory by moving PostgreSQL's socket to /var/run/postgresql. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com