`luci` service is not starting.

Solution In Progress - Updated -

Environment

  • Red Hat Enterprise Linux Server 6 (with the High Availability Add on)
  • luci Web UI

Issue

  • While trying to start the luci service, it is failing with the error
service luci start
Adding following auto-detected host IDs (IP addresses/domain names), corresponding to `hostname.example.com' address, to the configuration of self-managed certificate `/var/lib/luci/etc/cacert.config' (you can change them by editing `/var/lib/luci/etc/cacert.config', removing the generated certificate `/var/lib/luci/certs/host.pem' and restarting luci):
        (none suitable found, you can still do it manually as mentioned above)

Generating a 2048 bit RSA private key
writing new private key to '/var/lib/luci/certs/host.pem'
Start luci...                                              [FAILED]
  • luci service not starting.

Resolution

  • To fix the issue add read and execute bits for others on folder /var/log and start luci service
# chmod o+rx /var/log
# service luci start

Root Cause

  • Permissions on log directory were too strict and luci daemon had been failing in log creation
$ ls -dlsa /var/log
4 drwx------. 25 root root 4096 Oct 26 21:04 /var/log

Diagnostic Steps

  • Executing luci directly gives an exact reason for a fail
# /usr/sbin/luci serve --daemon --user luci --group luci --log-file=/var/log/luci/luci.log --pid-file=/var/run/luci/luci.pid --server-name=init --app-name=init /var/lib/luci/etc/luci.ini
Changing user luci:luci (141:141)
Error: Unable to write to log file: [Errno 13] Permission denied: '/var/log/luci/luci.log'

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments