[Geocoding] Nominatim data import error: DB Error: connect failed
Sarah Hoffmann
lonvia at denofr.de
Tue Sep 11 17:49:15 BST 2012
On Mon, Sep 10, 2012 at 10:27:18PM -0400, Nyx wrote:
> Yup it does, doing `psql postgres` got me in:
>
> psql (9.1.5)
> Type "help" for help.
>
> postgres=#
>
> ----
Then it is most likely a problem with php's DB module. Hard to say what
exactly the problem is because there is no real error message. Try reinstalling
the DB module, sometimes that helps. If not, check the postgres logs for
errors, maybe there is a hint in there.
Sarah
>
>
>
> On Mon, Sep 10, 2012 at 10:01 PM, Sarah Hoffmann <lonvia at denofr.de> wrote:
>
> > On Mon, Sep 10, 2012 at 09:47:57PM -0400, Nyx wrote:
> > > Hey all,
> > >
> > > I just installed PostgreSQL 9.1, PostGIS 2 and Nominatim cloned
> > recursively
> > > from github using the instructions at
> > > http://wiki.openstreetmap.org/wiki/Nominatim/Installation. Now when I
> > try
> > > to import the planet file using ./setup.php --osm-file
> > us-northeast.osm.pbf
> > > --all, I get the error ` DB Error: connect failed `. I'm running on
> > CentOS
> > > 6.3.
> >
> > You may not have sufficient rights to read from postgres' socket. Does it
> > work, when you connect to postgres directly like this:
> >
> > psql postgres
> >
> > Sarah
> >
> >
> > >
> > > I have enabled trust authentication for everyone. My pg_hba.conf is as
> > > follows:
> > >
> > > # TYPE DATABASE USER ADDRESS METHOD
> > >
> > > # "local" is for Unix domain socket connections only
> > > local all all trust
> > > # IPv4 local connections:
> > > host all all 127.0.0.1/32 trust
> > > # IPv6 local connections:
> > > host all all ::1/128 trust
> > > ----
> > >
> > > and in postgresql.conf I have:
> > >
> > > # - Connection Settings -
> > >
> > > listen_addresses = '*'
> > > ----
> > >
> > > Here is part of the ouput:
> > >
> > > [4]=>
> > > array(7) {
> > > ["file"]=>
> > > string(41) "/usr/local/cpanel/3rdparty/lib/php/DB.php"
> > > ["line"]=>
> > > int(556)
> > > ["function"]=>
> > > string(7) "connect"
> > > ["class"]=>
> > > string(8) "DB_pgsql"
> > > ["object"]=>
> > > object(DB_pgsql)#3 (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(35) "/home/myusername/Nominatim/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) "/home/ myusername/Nominatim/utils/setup.php"
> > > ["line"]=>
> > > int(118)
> > > ["function"]=>
> > > string(5) "getDB"
> > > ["args"]=>
> > > array(0) {
> > > }
> > > }
> > > }
> > > ["callback"]=>
> > > NULL
> > > }
> > > DB Error: connect failed
> > >
> > > ----
> > >
> > > Any suggestions how this can be fixed? Thanks!
> >
> > > _______________________________________________
> > > Geocoding mailing list
> > > Geocoding at openstreetmap.org
> > > http://lists.openstreetmap.org/listinfo/geocoding
> >
> >
More information about the Geocoding
mailing list