It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Problem installing Stash 3.7 to use PostgreSQL

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

5 answers

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

0 votes
rrudnicki Atlassian Team Mar 25, 2015

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

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?

 

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.

What were your remved config lines ?

 

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Next-gen

Keyboard shortcuts have arrived for next-gen projects!

...ollected feedback from users around the lack of shortcuts, and we’re here to address that: In next-gen projects, I miss the keyboard shortcuts badly. This is particularly true on the Board, but also i...

102 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you