setup. sh pg_hba.conf file error

66 views
Skip to first unread message

Sandra Tecelao

unread,
Aug 25, 2015, 9:19:49 AM8/25/15
to xnat_discussion
Hi,

we are installing XNAT from the source code on one machine and we are using a database that is installed in a different machine. We are having some problems when we do the setup and we get this error message:

"FATAL: no pg_hba.conf entry for host "...", user "database user", database "database name", SSL off"

We need to use ssl to access the database, so the ssl flag was set to true. On the database machine we are also getting an error message regarding the ssl connection:

"could not accept SSL connection: sslv3 alert certificate unknown",,,,,,,,,""

Do you have an idea how to solve this problem?

Best regards,

Sandra Tecelão

Herrick, Rick

unread,
Aug 25, 2015, 9:39:48 AM8/25/15
to xnat_di...@googlegroups.com
Make sure that the SSL certificate on the database is also present in the Java keystore on the XNAT side. You won’t be able to connect if that’s a self-signed certificate or from an issuer that’s not in the trusted CA store.


If the cert is from a trusted CA, you may just need to add “ssl=true” to your JDBC URL:

jdbc:postgresql://server:5432/xnat?ssl=true

HTH.

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 740-5961


--
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 http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.



The material in this message is private and may contain Protected Healthcare Information (PHI). 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.

Sandra Tecelao

unread,
Sep 3, 2015, 3:46:33 AM9/3/15
to xnat_discussion
Hi Rick,

thank you very much for your answer. That helped to solve the problem. We were able to deploy XNAT, however, after we open the webpage and log in we get an error message (contact the IT department). We already installed XNAT on other machines and we never got this problem. This is the first time we are installing it in a server without internet connection and the database, as I referred before, is installed in a different machine. So, probably is something related to this. I attached the logs files so you can have a better understanding about this.

Suggestions are welcome.

Best regards,

Sandra Tecelão
turbine.log
velocity.log
xdat.log

Herrick, Rick

unread,
Sep 3, 2015, 11:19:59 AM9/3/15
to xnat_di...@googlegroups.com
Those are… very strange errors. Specifically, this one in xdat.log:

2015-09-01 12:51:38,231 [http-bio-8080-exec-18] ERROR org.nrg.xdat.turbine.modules.screens.SecureScreen - 
org.postgresql.util.PSQLException: ERROR: relation "xdat_search.prearchive" does not exist
  Position: 15

You really shouldn’t ever have this. XNAT checks for the existence of the xdat_search.prearchive table on start up and, if it doesn’t exist, creates it. That seems to indicate that something is messed up with the installation, the database connection, or something like that. The errors in the turbine.log are usually very non-specific: they just mean that something’s just really broken.

It’s quite possible that your initial attempts to build the deployment with the problems accessing the database left XNAT in some kind of weird state where it can’t figure out that it needs to do stuff to initialize the application properly and then tries to access stuff that’s not properly initialized.

My suggestion would be to nuke the entire installation: drop the database and recreate it, delete your deployed XNAT web app or war, then run through the basic setup process again from start to finish (you’ll probably need to delete the deployments and projects folders in your XNAT source builder folder as well). I generally make sure I can go from an empty database and clean source code to a fully initialized and running XNAT application without any errors along the way for precisely this reason.
Reply all
Reply to author
Forward
0 new messages