Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

Ranger Admin is failing to start

avatar
Contributor

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)
1 ACCEPTED SOLUTION

avatar

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.

View solution in original post

6 REPLIES 6

avatar
Contributor

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

avatar

What ranger and ambari version do you have?

avatar
Contributor

@Jonas Straub We are using Ranger 0.5.0.2.3 and Ambari 2.1

avatar

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.

avatar
Contributor

@pminovic @Jonas Straub

This issue occurred when we modified the configuration of ranger log directory.

The issue is resolved.

We took a backup of /var/lib/ambari-agent/data/structured-out-status.json and restarted Ambari Agent.

Post this, restart of Ranger Admin went fine.

avatar

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.

Labels