Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] rsyslog addon compiled against wrong prefix #8125

Closed
jsaathof opened this issue Sep 8, 2023 · 5 comments
Closed

[BUG] rsyslog addon compiled against wrong prefix #8125

jsaathof opened this issue Sep 8, 2023 · 5 comments

Comments

@jsaathof
Copy link

jsaathof commented Sep 8, 2023

Describe the bug

The rsyslog addon cannot load modules and therefore cannot start.

The modules are searched in /usr/lib/rsyslog which is not the correct folder. The module is installed in /storage/.kodi/addons/service.rsyslog. According to the manpage of rsyslog the modules are searched in the default directory prefix/lib/rsyslog. The prefix has been set to /usr.

The module should be recompiled with /storage/.kodi/addons/service.rsyslog as prefix.

How to reproduce

Steps to reproduce the behavior:

  1. Login via SSH
  2. Run "/storage/.kodi/addons/service.rsyslog/bin/rsyslogd -n"
  3. See error

Information

  • LibreELEC Version: 11.0.3
  • Hardware Platform: Intel NUC7i3BNK

Log file

LibreELEC:~ # /storage/.kodi/addons/service.rsyslog/bin/rsyslogd -n
rsyslog internal message (3,-2066): could not load module 'lmnet', errors: trying to load module /usr/lib/rsyslog/lmnet.so: /usr/lib/rsyslog/lmnet.so: cannot open shared object file: No such file or directory [v8.2308.0 try https://www.rsyslog.com/e/2066 ]
Error during class init for object 'conf' - failing...
rsyslogd initialization failed - global classes could not be initialized.
Did you do a "make install"?
Suggested action: run rsyslogd with -d -n options to see what exactly fails.
rsyslogd: run failed with error -2066 (see rsyslog.h or try https://www.rsyslog.com/e/2066 to learn what that number means)

Context

The manpage on a different node reads:

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).

The prefix supplied during compilation shows it is set to /usr because rsyslogd searches for the modules in that location. The addon should be recompiled with /storage/.kodi/addons/service.rsyslog as prefix.

@heitbaum
Copy link
Contributor

heitbaum commented Sep 8, 2023

Closing. Please see #8044

@heitbaum heitbaum closed this as completed Sep 8, 2023
@jsaathof
Copy link
Author

jsaathof commented Sep 9, 2023

Sorry, somehow I could find that ticket. Bun since this is not fixed and does not work "out of the box" when installing the addon I still think this is a bug. The addon was not updated.
I have reinstalled the addon before creating this issue. Even removed the folder in /storage/.kodi/addons to be sure no incorrect information was left behind. I think it is weird to make an addon work by having to SSH into libreelec and changing things.

@heitbaum
Copy link
Contributor

heitbaum commented Sep 9, 2023

Sorry, somehow I could find that ticket. Bun since this is not fixed and does not work "out of the box" when installing the addon I still think this is a bug. The addon was not updated. I have reinstalled the addon before creating this issue. Even removed the folder in /storage/.kodi/addons to be sure no incorrect information was left behind. I think it is weird to make an addon work by having to SSH into libreelec and changing things.

Because of the way rsyslog plugins are done - the supported startup is via the systemd script (and this is automated)
You should not need to ssh to activate the addon.
addons may require reboots (known issue).

the following lines are part of the startup.

Environment=RSYSLOG_MODDIR=/storage/.kodi/addons/service.rsyslog/lib/rsyslog/
ExecStartPre=/bin/sh /storage/.kodi/addons/service.rsyslog/bin/rsyslog.init
ExecStart=/storage/.kodi/addons/service.rsyslog/bin/rsyslogd -n -f /storage/.kodi/userdata/addon_data/service.rsyslog/rsyslog.conf

If you were looking to improve the addon build - to directly specify the RSYSLOG_MODDIR during build - then PR would be welcome.

@jsaathof
Copy link
Author

jsaathof commented Sep 9, 2023

I will check again.

@adriankaylor
Copy link

@jsaathof This ended up being a problem with how settings were read when you were not using the default profile. All of the library stuff above was a problem with my testing. Check the forums. I just posted a novel about it with a workaround if you are also using a profile other than Master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants