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

Which PostgreSQL username and password should be used to setup Service Desk?

We just purchased Service Desk, and we are now at the point of running through the beginning database-setup wizard (SetupDatabase.jspa).

We installed and setup PostgreSQL 9.6 according to this:

https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-postgresql-938846851.html

To create the user, I typed:

su - postgres
psql
CREATE USER jiradbuser;

 

To create the database:

CREATE DATABASE jiradb WITH ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;

 

To grant privileges:

GRANT ALL PRIVILEGES ON DATABASE jiradb TO jiradbuser;

 

I'm now at the database setup page.  It's asking me for the following, and here is what I typed:

Database Type: PostgreSQL

Hostname: localhost

Port: 5432

Database: jiradb

Username: jiradbuser

Password: I've tried our root password and no password at all.

Schema: public

 

I always get the following error message:

FATAL: Ident authentication failed for user "jiradbuser"

 

The directions on that page made no mention of a password being set, so I don't even know which password I should be using.

Just for kicks, I then set a password on jiradbuser using this command:

ALTER USER jiradbuser WITH PASSWORD 'thepassword';

I then typed that new password in the database-setup wizard, and I still got the same error message:

FATAL: Ident authentication failed for user "jiradbuser"

1 answer

1 accepted

1 vote
Answer accepted
Thomas Deiler Community Leader Feb 20, 2018

Dear @Jason Freeman,

you have to modify the postgreSQL configuration on the server.

  • Locate the file "pg_hba.conf" on localhost
  • change the line "host all all 127.0.0.1/32 ident" to
host all all 127.0.0.1/32 md5
  •  save
  • restart postgreSQL
  • retry in JSD

So long

Thomas

Thanks.  That seems to have worked.

Is there any way the documentation could be updated?  Specifically:

1. jiradbuser does need to have a password set.  The documentation says nothing about setting a password.  Yes, one could infer that a user needs a password, but I was trying to strictly follow the directions.  I didn't know if there was something special happening where I did not need a password to be set on this account.  Like with the other steps in the tutorial, I would even put a sample command

CREATE USER jiradbuser WITH PASSWORD 'yourPassword';

2. When you use the beginning setup wizard, the username and password that you use are the jiradbuser and its associated password that you set -- not a Linux or other user account.

3. The above change that you mentioned in pg_hba.conf needs to be done.

I think putting the above three items in the documentation would help people in the future who are setting up JIRA Service Desk or other JIRA product who are completely new to Atlassian products.

Like David Crowe likes this
Thomas Deiler Community Leader Feb 20, 2018

Dear @Jason Freeman,

am glad to here, that it worked. As I am a volunteer (like most of the Community Champions) and not working for Atlassian, I will forward your feedback to the right channel. But I cannot promise, that the article will be updated.

Btw: It is possible to configure PostgreSQL accepting users without passwords - but this is a little bit risky. ;)

Please mark my reply as "Accept as solution", so that other readers can learn from this.

Many Thanks

Thomas

Thanks for the reply.  Yours is accepted.

Yeah, I know that PostgreSQL can be setup without passwords, but will it still work with JIRA that way? The JIRA setup wizard requires a password.

Jason, to your point...I found the same issues, exactly. When setting up a new system for the first time, it's important to remove as many unknowns as possible to make it through the gauntlet. Having documentation that is simply lazy creates more problems than it solves because of all the rabbit holes you need to run down.

Like Jason Freeman likes this

I found JSD to be unnecessarily complicated to setup.  Directions have to either be step-by-step or not.  If half the directions are step-by-step and the other half are not (where it's just assumed that "you know what you're doing"), there is undoubtedly going to be confusion.

@Jason Freeman 

As one of the "People of the Future," i agree that Atlassian documentation can be contrary, misleading, and confusing at times. I fully understand the inherent difficulties in keeping u-to-date documents--especially considering they are for numerous products running in a wide variety of environments. But still. I typically google 5-6 so-called step-by-step guides and try to take the average of all their approaches.

Atlassian's products are extremely well executed. But you're right that the documentation is rather hit or miss.

I came across this thread while researching "ERROR: role "jiradbuser" does not exist" during Jira Core installation. Certainly some of the fault is mine for not being as proficient in Postgres as other DBMSs, but some authoritative guidance--or, at a minimum, a list of potential pitfalls--would sure increase my likelihood of recommending Atlassian products to other sys admins.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Calling all Jira Cloud users! Give us feedback on our exploration of a new navigation.

Hi everyone! My name’s Matt and I’m a product manager at Atlassian. I work in the navigation & findability space for all our Jira Cloud products. We’ve been working on trying to improve the exp...

1,045 views 16 12
Join discussion

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