Closed nathanlcarlson closed 6 years ago
The pg_hba.conf
file looks like this currently
local all postgres md5
local all all md5
host all all ::1/128 md5
Refer to https://www.postgresql.org/docs/8.4/static/auth-pg-hba-conf.html for how this should be for Postgres 8.4. If you are reading this and 8.4 is no longer being used, make sure to switch to the correct format.
::1/128
above is the IPv6 format for the loopback interface. From the Postgres documentation linked above
An entry given in IPv6 format will match only IPv6 connections, even if the represented address is in the IPv4-in-IPv6 range.
I think the Java Postgres client is attempting to connect using an IPv4 connection. I think this is why it is failing.
WARN [localhost-startStop-1] (DatabaseResource.java:getInstance():101) - Instance is NULL!!! "init" must be called prior to calling this method!!
WARN [localhost-startStop-1] (ESGFProperties.java:readFromFile():150) - ESGF_HOME not set
WARN [localhost-startStop-1] (ReloadableFileSet.java:<init>():60) - File /esg/config/esgf_ats_static.xml not found
WARN [localhost-startStop-1] (RealmVerifier.java:setEnforceRpId():107) - RP discovery / realm validation disabled;
WARN [localhost-startStop-1] (RealmVerifier.java:setEnforceRpId():107) - RP discovery / realm validation disabled;
WARN [localhost-startStop-1] (ESGFProperties.java:readFromFile():150) - ESGF_HOME not set
ERROR [localhost-startStop-1] (UserInfoDAO.java:getUserById():587) - org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
ERROR [localhost-startStop-1] (UserInfoDAO.java:getUserById():593) - org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
ERROR [localhost-startStop-1] (UserInfoDAO.java:getUserById():594) - esg.node.security.ESGFDataAccessException: org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
It seems that the problem is simply the environment variable ESGF_HOME
needs to be set (to /esg
), probably when Tomcat is started.
From the Tomcat log
/usr/local/tomcat/logs/catalina.out
The previous errors refer to a NullPointerException
Lines 81 and 82 of esg.node.security.UserInfoCredentialedDAO
getUserById
is a larger function that does some database queries and is returningnull
. After reviewing the logs I foundThis leads me to conclude that the database queries in
getUserById
are failing because it cannot connect and is thus returningnull
.