FATAL: password authentication failed for user "xnat " fresh install

272 views
Skip to first unread message

Christopher Grave

unread,
Feb 9, 2017, 4:07:00 PM2/9/17
to xnat_discussion
Hi,

First post so please go easy on me.

I am in the process of setting up  an XNAT (1.6.5) server and have pretty much completed all the installation steps. When I attempt to go to to the XNAT landing page on the server (127.0.0.1/xnat)I receive the following error.

"XNAT has encountered an error with your request

If this error continues to occur please contact your system administrator with information about how to recreate the problem"

Looking at the application log (/opt/tomcat/webapps/xnat/logs/applicaiton.log) I receive numerous errors;

.......
2017-02-09 09:56:32,771 [http-bio-8080-exec-20] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
2017-02-09 09:56:32,771 [http-bio-8080-exec-20] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
2017-02-09 09:56:32,802 [http-bio-8080-exec-25] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
2017-02-09 09:56:32,802 [http-bio-8080-exec-25] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
2017-02-09 09:56:32,809 [http-bio-8080-exec-21] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
2017-02-09 09:56:32,809 [http-bio-8080-exec-21] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
2017-02-09 09:56:32,818 [http-bio-8080-exec-24] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
2017-02-09 09:56:32,818 [http-bio-8080-exec-24] ERROR org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "xnat  ")
..............

Please note postgres is installed on a separate VM to tomcat and xnat.

I believe I have configured the pg_hba.conf file correctly (see blelow) and have also included the listen_addresses = '*' in the postgresql.conf file

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
#host   all             all             127.0.0.1/32            md5
host    all             all             130.***.***.***/32      md5
host    all             all             130.***.***.***/32      md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

I have ran the following commands to create xnat's database user

sudo -u postgres createuser -U postgres -S -D -R xnat
sudo -u postgres psql -U postgres -c "ALTER USER xnat WITH PASSWORD 'xnat'"
sudo -u postgres createdb -U postgres -O xnat xnat

When I run the following command in order to Create Database tables & views it seems to complete any errors.

Any help would be greatly appreciated. Let me know if anymore information is required

Kind Regards

Chris






Moore, Charlie

unread,
Feb 9, 2017, 4:17:55 PM2/9/17
to xnat_di...@googlegroups.com

Hello Chris,

 

Welcome to XNAT! My guess is that the extra space in that string user “xnat “ isn’t a typo; that is, wherever the XNAT database user is getting pulled from has a trailing space. I don’t remember very well where that was in 1.6 since we’re all excited around here about XNAT 1.7, but that going in the build.properties file sounds about right. Can you check whether or not your DB user in there has a trailing space?

 

Thanks,

Charlie

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Christopher Grave

unread,
Feb 9, 2017, 6:06:28 PM2/9/17
to xnat_discussion
Hi Charlie,

Thanks for the reply and warm welcome. You are exactly right. Realised shortly after posting topic that in the build.properties file there was a trailing space after the username. Doh!

Thanks for looking and spotting the error.


Chris

Christopher Grave

unread,
Feb 9, 2017, 6:06:29 PM2/9/17
to xnat_discussion
Reply all
Reply to author
Forward
0 new messages