<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Problem: Database query failed (error # %s) - 502 Bad Gateway]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=2240&amp;type=atom"/>
	<updated>2014-11-19T13:56:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=2240</id>
		<entry>
			<title type="html"><![CDATA[Problem: Database query failed (error # %s) - 502 Bad Gateway]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=5383#p5383"/>
			<content type="html"><![CDATA[Witam,

Przygotowałem VPS z: Ubuntu 14.04, nginx 1.7.7 + ssl, postgresql 9.3. Skonfigurowałem w/w aplikacje wydaje się poprawnie, tj. zainstalowałem CMS Joomla z wykorzystaniem bazy postgresql, uruchomiłem php. Następnie po instalacji zalogowałem się do strony administratora i tu strona się ładuje, problem jest ze stroną główną przy której otrzymuje komunikat: 502 Bad Gateway

Przeszukałem logi błędów:
[code]
2014/11/19 13:48:51 [error] 1180#0: *347 upstream sent invalid status "0 Database query failed (error # %s): %s  SQL=SELECT "m"."tag_id","m"."core_content_id","m"."content_item_id","m"."type_alias",COUNT( "tag_id") AS "count","t"."access","t"."id","ct"."router","cc"."core_title","cc"."core_alias","cc"."core_catid","cc"."core_language" FROM "j2sq_contentitem_tag_map" AS "m" INNER JOIN "j2sq_tags" AS "t" ON m.tag_id = t.id INNER JOIN "j2sq_ucm_content" AS "cc" ON m.core_content_id = cc.core_content_id INNER JOIN "j2sq_content_types" AS "ct" ON m.type_alias = ct.type_alias WHERE "m"."tag_id" IN (2,3,4,5) AND t.access IN (1,1) AND (cc.core_access IN (1,1) OR cc.core_access = 0) AND ("m"."content_item_id" <> 24 OR "m"."type_alias" <> 'com_content.article') AND "cc"."core_state" = 1  GROUP BY "m"."core_content_id" ORDER BY "count" DESC LIMIT 5" while reading response header from upstream, client: 192.168.56.1, server: 192.168.56.11, request: "GET /j2/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.56.11"
[/code]

kolejny:
[code]
2014/11/19 14:27:57 [crit] 16755#0: *1 connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 192.168.56.1, server: 192.168.56.11, request: "GET /j2/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.56.11"
[/code]

I w tym momencie nie wiem czy to problem z połączeniem do bazy danych czy php, lub jeszcze coś innego.
Proszę o jakieś wskazówki.]]></content>
			<author>
				<name><![CDATA[bartekb100]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=2161</uri>
			</author>
			<updated>2014-11-19T13:56:07Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=5383#p5383</id>
		</entry>
</feed>
