Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem installing Stash 3.7 to use PostgreSQL

Mark Ruedy March 24, 2015

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

0 votes
IT BS
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 5, 2015

What were your remved config lines ?

 

Thanks

0 votes
Mark Ruedy March 25, 2015

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.

0 votes
Mark Ruedy March 25, 2015

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?

 

0 votes
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 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

0 votes
Mark Ruedy March 24, 2015

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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events