Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Not able to change log directories for Ranger Admin and Ranger usersync

avatar

While Ambari UI provides feature to change log directories from UI, but it still is not being taken by Ranger. Looks like Ranger is overriding what I am setting in Ambari.

1 ACCEPTED SOLUTION

avatar

Got the solution after working with support. This is BUG in current Ambari and HDP versions.

https://hortonworks.jira.com/browse/BUG-38390

Below is workaround:

Change Log directory for Ranger Admin logs

On Ranger Admin nodes: ADMIN LOGS (Change the symbolic link for in ews directory):

 
mkdir /opt/hadoop/log/ranger/admin 
chmod 775 /opt/hadoop/log/ranger/admin 
chown ranger_qa:ranger_qa_grp /opt/hadoop/log/ranger/admin 
cd /usr/hdp/current/ranger-admin/ews 
unlink logs
ln -s /opt/hadoop/log/ranger/admin logs 

From Ambari Web UI --> Change Log directory for Ranger Admin and restart Ranger.

Note: here ranger_qa and ranger_qa_grp are ranger user and group respectively which are customized in my case.

Change log directory for USERSYNC LOGS

On Ranger Usersync node:

mkdir /opt/hadoop/log/ranger/usersync 

chmod 775 /opt/hadoop/log/ranger/usersync 

chown ranger_qa:ranger_qa_grp /opt/hadoop/log/ranger/usersync

Note: here ranger_qa and ranger_qa_grp are ranger user and group respectively which are customized in my case.

1. Make a back of file /usr/hdp/current/ranger-usersync/ranger-usersync-services.sh

2. Change the file to the path to your new log location.

logdir=/var/log/ranger/usersync

cd /usr/hdp/current/ranger-usersync/ 

cp ranger-usersync-services.sh{,.backup01122015} 

vi ranger-usersync-services.sh
    #logdir=/var/log/ranger/usersync          
     logdir=/opt/hadoop/log/ranger/usersync

From Ambari Web UI --> Change Log directory for Ranger Usersync and restart Ranger

View solution in original post

1 REPLY 1

avatar

Got the solution after working with support. This is BUG in current Ambari and HDP versions.

https://hortonworks.jira.com/browse/BUG-38390

Below is workaround:

Change Log directory for Ranger Admin logs

On Ranger Admin nodes: ADMIN LOGS (Change the symbolic link for in ews directory):

 
mkdir /opt/hadoop/log/ranger/admin 
chmod 775 /opt/hadoop/log/ranger/admin 
chown ranger_qa:ranger_qa_grp /opt/hadoop/log/ranger/admin 
cd /usr/hdp/current/ranger-admin/ews 
unlink logs
ln -s /opt/hadoop/log/ranger/admin logs 

From Ambari Web UI --> Change Log directory for Ranger Admin and restart Ranger.

Note: here ranger_qa and ranger_qa_grp are ranger user and group respectively which are customized in my case.

Change log directory for USERSYNC LOGS

On Ranger Usersync node:

mkdir /opt/hadoop/log/ranger/usersync 

chmod 775 /opt/hadoop/log/ranger/usersync 

chown ranger_qa:ranger_qa_grp /opt/hadoop/log/ranger/usersync

Note: here ranger_qa and ranger_qa_grp are ranger user and group respectively which are customized in my case.

1. Make a back of file /usr/hdp/current/ranger-usersync/ranger-usersync-services.sh

2. Change the file to the path to your new log location.

logdir=/var/log/ranger/usersync

cd /usr/hdp/current/ranger-usersync/ 

cp ranger-usersync-services.sh{,.backup01122015} 

vi ranger-usersync-services.sh
    #logdir=/var/log/ranger/usersync          
     logdir=/opt/hadoop/log/ranger/usersync

From Ambari Web UI --> Change Log directory for Ranger Usersync and restart Ranger