Created 12-15-2015 04:07 AM
Ranger admin is failing with the below error:
resource_management.core.exceptions.Fail: Execution of '/usr/java/default/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/postgresql.jar:/usr/hdp/current/ranger-admin/ews/webapp/WEB-INF/lib/* org.apache.ambari.server.DBConnectionVerification 'jdbc:postgresql://hostranger.hdp.com:5432/rangerdb' rangerdba [PROTECTED] org.postgresql.Driver' returned 1. shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine current working directory. at java.lang.System.initProperties(Native Method) at java.lang.System.initializeSystemClass(System.java:1119)
Created 12-16-2015 04:59 AM
We checked this over webex on case yesterday. Issue was with structured-out-*.json. Ambari agent log indicated that the file that it was looking for is structured-out-<>.json. /var/lib/ambari-agent/data/structured-out-status.json to backup and restarted agent. This fixed this issue.
Created 12-15-2015 04:41 AM
If I execute the command directly from the CLI,
/usr/java/default/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/postgresql.jar:/usr/hdp/current/ranger-admin/ews/webapp/WEB-INF/lib/* org.apache.ambari.server.DBConnectionVerification 'jdbc:postgresql://hostranger.hdp.com:5432/rangerdb' rangerdba [PROTECTED] org.postgresql.Driver
Its working fine and we are getting the o/p -
Connected to DB Successful
@pminovic
Created 12-15-2015 05:46 PM
What ranger and ambari version do you have?
Created 12-16-2015 03:31 AM
@Jonas Straub We are using Ranger 0.5.0.2.3 and Ambari 2.1
Created 12-15-2015 06:39 PM
Have you checked and updated postgresql.conf and pg_hba.conf to allow user rangerdba to access rangerdb from any host in the cluster? You can find details here:
http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-...
If you change those files be sure to run "pg_ctl reload" so that changes take effect.
Created 12-16-2015 03:34 AM
Created 12-16-2015 04:59 AM
We checked this over webex on case yesterday. Issue was with structured-out-*.json. Ambari agent log indicated that the file that it was looking for is structured-out-<>.json. /var/lib/ambari-agent/data/structured-out-status.json to backup and restarted agent. This fixed this issue.