rsyslogd addon won't start

  • I'm trying to forward logs and the rsyslog addon (9.2.0.104) from the libreelec repo won't start. I've tried with several configs, reinstalled, rebooted, even tried on both a Pi and an x86 install.

    Journald shows...

    Code
    systemd[1]: service.rsyslog.service: Main process exited, code=exited, status=1/FAILURE

    If I ssh in and run rsyslogd -dn it looks like its looking for its libraries in the incorrect path.

    I'm poking around to see if I can get it to look at another path. Anyone run into this or have any idea on how I can fix it?

  • I know this is an old thread but running into the same issue I was saddend to see that the community did not respond at all. Is this open source at it's best?

    The error is about the modules that cannot be found. Looking at the man page (on another machine since the man page is not installed with this addon) I found the issue

    Code
    FILES
           /etc/rsyslog.conf
                  Configuration file for rsyslogd.  See rsyslog.conf(5) for exact information.
           /dev/log
                  The Unix domain socket to from where local syslog messages are read.
           /var/run/rsyslogd.pid
                  The file containing the process id of rsyslogd.
           prefix/lib/rsyslog
                  Default directory for rsyslogd modules. The prefix is specified during compilation 
                  (e.g. /usr/local).

    Since the modules are searched for in /usr/lib/rsyslog I assume the addon was compiled with /usr as prefix. This is incorrect. By the looks of it this cannot be changed. The package should be recompiled with a prefix of /storage/.kodi/addons/service.rsyslog.

  • Jsaathof, you picked the perfect old thread to resurrect, I just started looking at this again a few weeks ago. After 15 years of using Kodi for my whole house, I'm happy I can help at least one other user. :)

    The problem with the libraries was actually an artifact of how I was testing. It's all in the git issue published above. The problem, at least in my instance, had nothing to do with the addon or libraries. The issue is that the LE scripts that set up the addon environment are still using the config files for the master profile but I'm using multiple profiles (one for my wife, one for me, one for our guest room). The Kodi GUI is pointing to a different addon directory so the settings are never read and it looks like rsyslog isn't running and sent me down the path above.

    I couldn't figure out a way through the Kodi API to detect if a non-default profile was in use but when I submitted a more accurate description of the issue (https://github.com/LibreELEC/LibreELEC.tv/issues/8055) it was assigned to the LE 12.0 project. I looked through the Kodi API's and didn't see anything that would return a profile name, but maybe there is something undoc'ed or an artifact on disk that someone smarter than I can find and fix.

    In the meantime. If you are running into the non-default profile issue. You can manually edit the /storage/.kodi/userdata/addon_data/service.rsyslog/rsyslog.conf file with your settings. Then edit the settings.xml in the same dir and set RSYSLOG_MANUAL to true, if its not already. The rsyslog.conf structure is a universe unto its own, so if you want to cheat a bit you can use the file elements that the addon builds for you. Grab those from /storage/.kodi/addons/service.rsyslog/config/ and merge them into your rsyslog.conf.

    The only piece you can't just copy and paste is the one line that actually specifies where to send the logs. You can see my config below. Just change the target and port and you should be fine. Generally, you don't want syslog as TCP, so I'd leave the protocol. I also set the template to send RFC5424 logs. The project named the template before the RFC was finalized and they never changed the name.

    action(type="omfwd" template="RSYSLOG_SyslogProtocol23Format" target="syslog.local" protocol="UDP" port="515")

    The next time I get some lab time I'm going to see if I can improve the rsyslog.conf to handle some of Kodi's multi-line logs more gracefully and a Splunk app for the logs. I'll try and post an update with whatever else I come up with.