Support Questions

Find answers, ask questions, and share your expertise

How to change the default logs path of HUE?

avatar
Explorer

How to change the default logs path of HUE from /var/log/hue to /../../../?

Couldn't find any value for log path on hue.ini or log.conf.

Is there a way to change the config without reinstalling?

Please help us to change the logs path.

1 ACCEPTED SOLUTION

avatar
Guru

@Raagul Sukumar

Works if you change/replace the LOG_DIR variable to something else. You can modify "/etc/hue/conf/log.conf" and replace it something like this wherever you see LOG_DIR. In my case I first created a directory "/opt/log/hue", then make the following changes.

#args=('%LOG_DIR%/shell_input.log', 'a', 1000000, 3)
args=('/opt/log/hue/shell_input.log', 'a', 1000000, 3)

Once the changes are made, restart hue service "service hue restart"

You can tail access.log and it should be progressing with every click on Hue services.

[Please accept the answer if this works for you]

View solution in original post

6 REPLIES 6

avatar
Explorer

@allaboutbdata, @dtraver@hortonworks.com

Kindly help us on this issue.

avatar
New Contributor

Hi

@Raagul S : I'm also interested in knowing the answer.

avatar
Expert Contributor

avatar
Explorer

Thanks for the response.

As per the link mentioned, we could identify the soft links present in Hue server where the logging is happening. ls -l /usr/lib/hue/desktop lrwxrwxrwx 1 root root 12 May 2 17:02 logs -> /var/log/hue We tried changing it to custom path, but logging still happening in old path only (/var/log/hue). Also, we could see a variable %LOG_DIR% declared in log.conf, which is substituting for the logging path. But couldn't find any such environment variable. Appreciate for the help!

avatar
Guru

@Raagul Sukumar

Works if you change/replace the LOG_DIR variable to something else. You can modify "/etc/hue/conf/log.conf" and replace it something like this wherever you see LOG_DIR. In my case I first created a directory "/opt/log/hue", then make the following changes.

#args=('%LOG_DIR%/shell_input.log', 'a', 1000000, 3)
args=('/opt/log/hue/shell_input.log', 'a', 1000000, 3)

Once the changes are made, restart hue service "service hue restart"

You can tail access.log and it should be progressing with every click on Hue services.

[Please accept the answer if this works for you]

avatar
Explorer

Hello Shyam,

Thanks for your solution.

Yes, it will work and it already worked for us (yesterday) when we replace the args (%LOG_DIR%) with absolute path of some custom directory.

Here goes the logs from our server.

--------------------------------------------------------------------------

#args=('%LOG_DIR%/access.log', 'a', 1000000, 3)

args=('/var/log/hadoop/hue/access.log', 'a', 1000000, 3)

#args=('%LOG_DIR%/error.log', 'a', 1000000, 3)

args=('/var/log/hadoop/hue/error.log', 'a', 1000000, 3)

---------------------------------------------------------------------------

As you have mentioned , the custom directory should be created before modifying in log.conf file wheres for the other components where it is possible to change from Ambari, the Amabri itself will take care of creating the log directory, ownership & permission.

Still thanking you again for your response with right solution.

Regards,

- Raagul