Can't connect to PostgresQL as the admin user.

488 views
Skip to first unread message

Yi Chen

unread,
Dec 29, 2021, 10:31:59 PM12/29/21
to Dataverse Users Community
Here is the error message i got:

````````````````````````````````````````````````````````````````````````````````````````````````
Can't connect to PostgresQL as the admin user.
Is the server running, have you adjusted pg_hba.conf, etc?

````````````````````````````````````````````````````````````````````````````````````````````````


And i have followed the documents to adjust the pg_hba.conf file like this:

````````````````````````````````````````````````````````````````````````````````````````````````
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 scram-sha-256
# "local" is for Unix domain socket connections only
local   all             all                                     peer


# Allow replication connections from localhost, by a user with the
# replication privilege.
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 scram-sha-256
local   replication     all                                           peer

````````````````````````````````````````````````````````````````````````````````````````````````

And  also added  " listen_addresses = '*' " to postgresql.conf


At last, i checked whether i have multiple versions of postgresql, but i only have one 
version of postgresql.

Wha's going wrong? Anyone can help?

Donald Sizemore II

unread,
Dec 30, 2021, 3:55:14 AM12/30/21
to dataverse...@googlegroups.com
Hello,

I think it may be using ipv6 for localhost instead of ipv4 (you may need to change them both for the installation). Be sure to restart Postgres to pick up the change?

You shouldn’t need to change listen_address unless Postgres will be contacted from some other machine.

Don

painstakingly pecked on my iphone.

On Dec 29, 2021, at 22:32, Yi Chen <yc5...@nyu.edu> wrote:


--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/7e41fdac-55b7-4d31-83f2-8b2fc194ad0bn%40googlegroups.com.

Yi Chen

unread,
Dec 30, 2021, 7:50:02 PM12/30/21
to Dataverse Users Community
Hey,
It worked! I did using ipv6 for localhost instead of ipv4, thank you very much for sloving my problem, it bothered me the whole day :-)
Have a nice day don, thanks again!!!

Peter Fey

unread,
Jan 10, 2022, 5:29:03 AM1/10/22
to Dataverse Users Community
Great deal - it worked for me to on a quick attempt to do a fresh install!
That bothered me not only for days but for weeks ...

IMHO it would make sense to mention that in the docs, as it is not 
obvious to set ipv6 to TRUST to get it running.

Maybe it is a *BUG*, as on my install ipv6 is disabled and the installer 
should skip it in this situation ?!

 :- )
Peter
Reply all
Reply to author
Forward
0 new messages