{"action":"created","issue":{"url":"https://api.github.com/repos/twain47/Nominatim/issues/257","labels_url":"https://api.github.com/repos/twain47/Nominatim/issues/257/labels{/name}","comments_url":"https://api.github.com/repos/twain47/Nominatim/issues/257/comments","events_url":"https://api.github.com/repos/twain47/Nominatim/issues/257/events","html_url":"https://github.com/twain47/Nominatim/issues/257","id":61941361,"number":257,"title":"Can't connect to database","user":{"login":"Edig","id":70331,"avatar_url":"https://avatars.githubusercontent.com/u/70331?v=3","gravatar_id":"","url":"https://api.github.com/users/Edig","html_url":"https://github.com/Edig","followers_url":"https://api.github.com/users/Edig/followers","following_url":"https://api.github.com/users/Edig/following{/other_user}","gists_url":"https://api.github.com/users/Edig/gists{/gist_id}","starred_url":"https://api.github.com/users/Edig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Edig/subscriptions","organizations_url":"https://api.github.com/users/Edig/orgs","repos_url":"https://api.github.com/users/Edig/repos","events_url":"https://api.github.com/users/Edig/events{/privacy}","received_events_url":"https://api.github.com/users/Edig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-16T01:55:50Z","updated_at":"2015-03-17T10:35:45Z","closed_at":null,"body":"Hi, \r\n\r\nI just install and export all the data with Nominatim. But when I try it I can't access to the database. \r\n\r\nMy server is on CentOS and I change the user from www-data to apache (like the instructions told me)\r\n\r\n```\r\nstring(19) \"pgsql://@/nominatim\" object(DB_Error)#2 (8) { [\"error_message_prefix\"]=> string(0) \"\" [\"mode\"]=> int(1) [\"level\"]=> int(1024) [\"code\"]=> int(-24) [\"message\"]=> string(24) \"DB Error: connect failed\" [\"userinfo\"]=> string(257) \" [nativecode=pg_connect(): Unable to connect to PostgreSQL server: 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\"?] ** pgsql://@/nominatim\" [\"backtrace\"]=> array(7) { [0]=> array(6) { [\"file\"]=> string(22) \"/usr/share/pear/DB.php\" [\"line\"]=> int(966) [\"function\"]=> string(10) \"PEAR_Error\" [\"class\"]=> string(10) \"PEAR_Error\" [\"type\"]=> string(2) \"->\" [\"args\"]=> array(5) { [0]=> string(24) \"DB Error: connect failed\" [1]=> int(-24) [2]=> int(1) [3]=> int(1024) [4]=> string(234) \" [nativecode=pg_connect(): Unable to connect to PostgreSQL server: 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\"?]\" } } [1]=> array(7) { [\"file\"]=> string(24) \"/usr/share/pear/PEAR.php\" [\"line\"]=> int(531) [\"function\"]=> string(8) \"DB_Error\" [\"class\"]=> string(8) \"DB_Error\" [\"object\"]=> *RECURSION* [\"type\"]=> string(2) \"->\" [\"args\"]=> array(4) { [0]=> int(-24) [1]=> int(1) [2]=> int(1024) [3]=> string(234) \" [nativecode=pg_connect(): Unable to connect to PostgreSQL server: 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\"?]\" } } [2]=> array(7) { [\"file\"]=> string(29) \"/usr/share/pear/DB/common.php\" [\"line\"]=> int(1908) [\"function\"]=> string(10) \"raiseError\" [\"class\"]=> string(4) \"PEAR\" [\"object\"]=> object(DB_pgsql)#1 (28) { [\"phptype\"]=> string(5) \"pgsql\" [\"dbsyntax\"]=> string(5) \"pgsql\" [\"features\"]=> array(7) { [\"limit\"]=> string(5) \"alter\" [\"new_link\"]=> string(5) \"4.3.0\" [\"numrows\"]=> bool(true) [\"pconnect\"]=> bool(true) [\"prepare\"]=> bool(false) [\"ssl\"]=> bool(true) [\"transactions\"]=> bool(true) } [\"errorcode_map\"]=> array(0) { } [\"connection\"]=> bool(false) [\"dsn\"]=> array(9) { [\"phptype\"]=> string(5) \"pgsql\" [\"dbsyntax\"]=> string(5) \"pgsql\" [\"username\"]=> string(0) \"\" [\"password\"]=> bool(false) [\"protocol\"]=> string(3) \"tcp\" [\"hostspec\"]=> string(0) \"\" [\"port\"]=> bool(false) [\"socket\"]=> bool(false) [\"database\"]=> string(9) \"nominatim\" } [\"autocommit\"]=> bool(true) [\"transaction_opcount\"]=> int(0) [\"affected\"]=> int(0) [\"row\"]=> array(0) { } [\"_num_rows\"]=> array(0) { } [\"fetchmode\"]=> int(1) [\"fetchmode_object_class\"]=> string(8) \"stdClass\" [\"was_connected\"]=> NULL [\"last_query\"]=> string(0) \"\" [\"options\"]=> array(8) { [\"result_buffering\"]=> int(500) [\"persistent\"]=> bool(false) [\"ssl\"]=> bool(false) [\"debug\"]=> int(0) [\"seqname_format\"]=> string(6) \"%s_seq\" [\"autofree\"]=> bool(false) [\"portability\"]=> int(0) [\"optimize\"]=> string(11) \"performance\" } [\"last_parameters\"]=> array(0) { } [\"prepare_tokens\"]=> array(0) { } [\"prepare_types\"]=> array(0) { } [\"prepared_queries\"]=> array(0) { } [\"_last_query_manip\"]=> bool(false) [\"_next_query_manip\"]=> bool(false) [\"_debug\"]=> bool(false) [\"_default_error_mode\"]=> NULL [\"_default_error_options\"]=> NULL [\"_default_error_handler\"]=> string(0) \"\" [\"_error_class\"]=> string(8) \"DB_Error\" [\"_expected_errors\"]=> array(0) { } } [\"type\"]=> string(2) \"->\" [\"args\"]=> array(7) { [0]=> NULL [1]=> int(-24) [2]=> NULL [3]=> NULL [4]=> string(234) \" [nativecode=pg_connect(): Unable to connect to PostgreSQL server: 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\"?]\" [5]=> string(8) \"DB_Error\" [6]=> bool(true) } } [3]=> array(7) { [\"file\"]=> string(28) \"/usr/share/pear/DB/pgsql.php\" [\"line\"]=> int(289) [\"function\"]=> string(10) \"raiseError\" [\"class\"]=> string(9) \"DB_common\" [\"object\"]=> object(DB_pgsql)#1 (28) { [\"phptype\"]=> string(5) \"pgsql\" [\"dbsyntax\"]=> string(5) \"pgsql\" [\"features\"]=> array(7) { [\"limit\"]=> string(5) \"alter\" [\"new_link\"]=> string(5) \"4.3.0\" [\"numrows\"]=> bool(true) [\"pconnect\"]=> bool(true) [\"prepare\"]=> bool(false) [\"ssl\"]=> bool(true) [\"transactions\"]=> bool(true) } [\"errorcode_map\"]=> array(0) { } [\"connection\"]=> bool(false) [\"dsn\"]=> array(9) { [\"phptype\"]=> string(5) \"pgsql\" [\"dbsyntax\"]=> string(5) \"pgsql\" [\"username\"]=> string(0) \"\" [\"password\"]=> bool(false) [\"protocol\"]=> string(3) \"tcp\" [\"hostspec\"]=> string(0) \"\" [\"port\"]=> bool(false) [\"socket\"]=> bool(false) [\"database\"]=> string(9) \"nominatim\" } [\"autocommit\"]=> bool(true) [\"transaction_opcount\"]=> int(0) [\"affected\"]=> int(0) [\"row\"]=> array(0) { } [\"_num_rows\"]=> array(0) { } [\"fetchmode\"]=> int(1) [\"fetchmode_object_class\"]=> string(8) \"stdClass\" [\"was_connected\"]=> NULL [\"last_query\"]=> string(0) \"\" [\"options\"]=> array(8) { [\"result_buffering\"]=> int(500) [\"persistent\"]=> bool(false) [\"ssl\"]=> bool(false) [\"debug\"]=> int(0) [\"seqname_format\"]=> string(6) \"%s_seq\" [\"autofree\"]=> bool(false) [\"portability\"]=> int(0) [\"optimize\"]=> string(11) \"performance\" } [\"last_parameters\"]=> array(0) { } [\"prepare_tokens\"]=> array(0) { } [\"prepare_types\"]=> array(0) { } [\"prepared_queries\"]=> array(0) { } [\"_last_query_manip\"]=> bool(false) [\"_next_query_manip\"]=> bool(false) [\"_debug\"]=> bool(false) [\"_default_error_mode\"]=> NULL [\"_default_error_options\"]=> NULL [\"_default_error_handler\"]=> string(0) \"\" [\"_error_class\"]=> string(8) \"DB_Error\" [\"_expected_errors\"]=> array(0) { } } [\"type\"]=> string(2) \"->\" [\"args\"]=> array(5) { [0]=> int(-24) [1]=> NULL [2]=> NULL [3]=> NULL [4]=> string(220) \"pg_connect(): Unable to connect to PostgreSQL server: 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\"?\" } } [4]=> array(7) { [\"file\"]=> string(22) \"/usr/share/pear/DB.php\" [\"line\"]=> int(556) [\"function\"]=> string(7) \"connect\" [\"class\"]=> string(8) \"DB_pgsql\" [\"object\"]=> object(DB_pgsql)#1 (28) { [\"phptype\"]=> string(5) \"pgsql\" [\"dbsyntax\"]=> string(5) \"pgsql\" [\"features\"]=> array(7) { [\"limit\"]=> string(5) \"alter\" [\"new_link\"]=> string(5) \"4.3.0\" [\"numrows\"]=> bool(true) [\"pconnect\"]=> bool(true) [\"prepare\"]=> bool(false) [\"ssl\"]=> bool(true) [\"transactions\"]=> bool(true) } [\"errorcode_map\"]=> array(0) { } [\"connection\"]=> bool(false) [\"dsn\"]=> array(9) { [\"phptype\"]=> string(5) \"pgsql\" [\"dbsyntax\"]=> string(5) \"pgsql\" [\"username\"]=> string(0) \"\" [\"password\"]=> bool(false) [\"protocol\"]=> string(3) \"tcp\" [\"hostspec\"]=> string(0) \"\" [\"port\"]=> bool(false) [\"socket\"]=> bool(false) [\"database\"]=> string(9) \"nominatim\" } [\"autocommit\"]=> bool(true) [\"transaction_opcount\"]=> int(0) [\"affected\"]=> int(0) [\"row\"]=> array(0) { } [\"_num_rows\"]=> array(0) { } [\"fetchmode\"]=> int(1) [\"fetchmode_object_class\"]=> string(8) \"stdClass\" [\"was_connected\"]=> NULL [\"last_query\"]=> string(0) \"\" [\"options\"]=> array(8) { [\"result_buffering\"]=> int(500) [\"persistent\"]=> bool(false) [\"ssl\"]=> bool(false) [\"debug\"]=> int(0) [\"seqname_format\"]=> string(6) \"%s_seq\" [\"autofree\"]=> bool(false) [\"portability\"]=> int(0) [\"optimize\"]=> string(11) \"performance\" } [\"last_parameters\"]=> array(0) { } [\"prepare_tokens\"]=> array(0) { } [\"prepare_types\"]=> array(0) { } [\"prepared_queries\"]=> array(0) { } [\"_last_query_manip\"]=> bool(false) [\"_next_query_manip\"]=> bool(false) [\"_debug\"]=> bool(false) [\"_default_error_mode\"]=> NULL [\"_default_error_options\"]=> NULL [\"_default_error_handler\"]=> string(0) \"\" [\"_error_class\"]=> string(8) \"DB_Error\" [\"_expected_errors\"]=> array(0) { } } [\"type\"]=> string(2) \"->\" [\"args\"]=> array(2) { [0]=> array(9) { [\"phptype\"]=> string(5) \"pgsql\" [\"dbsyntax\"]=> string(5) \"pgsql\" [\"username\"]=> string(0) \"\" [\"password\"]=> bool(false) [\"protocol\"]=> string(3) \"tcp\" [\"hostspec\"]=> string(0) \"\" [\"port\"]=> bool(false) [\"socket\"]=> bool(false) [\"database\"]=> string(9) \"nominatim\" } [1]=> bool(false) } } [5]=> array(6) { [\"file\"]=> string(32) \"/root/Nominatim-2.3.1/lib/db.php\" [\"line\"]=> int(7) [\"function\"]=> string(7) \"connect\" [\"class\"]=> string(2) \"DB\" [\"type\"]=> string(2) \"::\" [\"args\"]=> array(2) { [0]=> string(19) \"pgsql://@/nominatim\" [1]=> bool(false) } } [6]=> array(4) { [\"file\"]=> string(40) \"/root/Nominatim-2.3.1/website/search.php\" [\"line\"]=> int(10) [\"function\"]=> string(5) \"getDB\" [\"args\"]=> array(0) { } } } [\"callback\"]=> NULL } DB Error: connect failed\r\n```\r\n\r\nYou can access the url to see the error, what I'm doing wrong?\r\n\r\nI already try with a new user with password and change the data with this\r\n@define('CONST_Database_DSN', 'pgsql://apache:apache@/nominatim');\r\n\r\nAnd I get the same error"},"comment":{"url":"https://api.github.com/repos/twain47/Nominatim/issues/comments/82264293","html_url":"https://github.com/twain47/Nominatim/issues/257#issuecomment-82264293","issue_url":"https://api.github.com/repos/twain47/Nominatim/issues/257","id":82264293,"user":{"login":"lonvia","id":1447941,"avatar_url":"https://avatars.githubusercontent.com/u/1447941?v=3","gravatar_id":"","url":"https://api.github.com/users/lonvia","html_url":"https://github.com/lonvia","followers_url":"https://api.github.com/users/lonvia/followers","following_url":"https://api.github.com/users/lonvia/following{/other_user}","gists_url":"https://api.github.com/users/lonvia/gists{/gist_id}","starred_url":"https://api.github.com/users/lonvia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lonvia/subscriptions","organizations_url":"https://api.github.com/users/lonvia/orgs","repos_url":"https://api.github.com/users/lonvia/repos","events_url":"https://api.github.com/users/lonvia/events{/privacy}","received_events_url":"https://api.github.com/users/lonvia/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T10:35:45Z","updated_at":"2015-03-17T10:35:45Z","body":"Wow, quite some detective work. That is worth an entry in the troubleshooting section.\r\n\r\nThe issue with the username should be solved with the new `CONST_Database_Web_User` setting."}}