I am following the instructions on https://confluence.atlassian.com/display/STASH/Connecting+Stash+to+PostgreSQL
But after running the two "CREATE" commands in psql, the user still does not seem to be valid. During install the test connection to the database fails and I also can't connect from the command line like this:
-bash-4.2$ psql -h localhost -d stash -U stashuser -W
Password for user stashuser:
psql: FATAL: Ident authentication failed for user "stashuser"
-bash-4.2$
My CREATE commands were
CREATE ROLE stashuser WITH LOGIN PASSWORD 'JELLYFISH' VALID UNTIL 'infinity';
CREATE DATABASE stash WITH ENCODING='UTF8' OWNER=stashuser CONNECTION LIMIT=-1;
I am new to PostgreSQL so could there be more I need to do there? Like flush privileges or something?
This is a new server I am setting up, with hardware more like what we wish to deploy.
Thanks
Mark
What were your remved config lines ?
Thanks
I found there where other config lines in pg_hba.conf causing the problem. I've eliminated them, restarted postgresql. Now it works fine. Sorry about that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I updated the pg_hba.conf to what you have (left off IPv6 part) but still get the same message. Is that postgresql user supposed to match some OS user/pass or is it confined to postgresql?
[root@gitpc data]# psql -h 127.0.0.1 -d stash -U stashuser -W
Password for user stashuser:
psql: FATAL: Ident authentication failed for user "stashuser"
[root@gitpc data]#
Is there any debugging facility for postgresql authentication?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
Try to use 127.0.0.1 instead of localhost. Look my example:
[root@lab mysql]# psql -h 127.0.0.1 -d confluence57 -U atlassian -W
Password for user atlassian:
psql (8.4.20, server 9.4.1)
WARNING: psql version 8.4, server version 9.4.
Some psql features might not work.
Type "help" for help.
confluence57=> \q
[root@lab mysql]# psql -h localhost -d confluence57 -U atlassian -W
Password for user atlassian:
psql: FATAL: Ident authentication failed for user "atlassian"
[root@lab mysql]#
My pg_hba.conf is like this:
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
local all postgres trust
host all all 127.0.0.1/32 trust
host all all 192.168.213.129/32 md5
# IPv6 local connections:
host all all ::1/128 ident
host all all 192.168.0.0/24 md5
Regards,
Renato Rudnicki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, I already added the following lines to /var/lib/pgsql/data/pg_hba.conf, restarted postgresql but get the same message trying to open the database local all all trust host all all 127.0.0.1/32 trust
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.