Support Questions
Find answers, ask questions, and share your expertise

how to modify Ranger log and PID Directories

Explorer

how can we modify the below ranger parameters.

•ranger_admin_log_dir

•ranger_pid_dir

•ranger_usersync_log_dir

•ranger.tagsync.logdir

Rigth now in ambari these are grayed out and does not let me to modify

From the os command prompt ,i tried to modify below two files

/usr/hdp/current/ranger-admin/ews/ranger-admin-services.sh

/usr/hdp/current/ranger-usersync/ranger-usersync-services.sh

example from pidf=/var/run/ranger/rangeradmin.pid to pidf=/var/log/hdp/ranger/run/rangeradmin.pid

There after Ranger servers failed to come up

Your help is needed

2 REPLIES 2

Re: how to modify Ranger log and PID Directories

Expert Contributor

@Jacqualin jasmin

Try changing it in Amabri respective Log4j configuration. I know in older versions it is not there. If it's there you can change it ( admin-log4j, usersync-log4j, tagsync-log4j section)

Re: how to modify Ranger log and PID Directories

Expert Contributor

Hi @Jacqualin jasmin

You have to use the API or the configs.sh helper command:

/var/lib/ambari-server/resources/scripts/configs.sh
-port 8080 set localhost <CLUSTER_NAME> ranger-env ranger_admin_log_dir
"/var/log/hdp/ranger/admin"
/var/lib/ambari-server/resources/scripts/configs.sh
-port 8080 set localhost <CLUSTER_NAME> ranger-env ranger_usersync_log_dir
"/var/log/hdp/ranger/usersync"
/var/lib/ambari-server/resources/scripts/configs.sh
-port 8080 set localhost <CLUSTER_NAME> ranger-env ranger.tagsync.logdir
"/var/log/hdp/ranger/tagsync"