Mailing List Archive

Trouble running rsyslogd from inside a snap ($ModDir not working?)

I am trying to include rsyslogd in a snap (container) of an application,
which is pulling rsyslogd from ubuntu core 18. The problem I am running
into is that this changes the location of rsyslog, and even though I am
setting $ModDir in my config file, rsyslog is still trying to load a
module from the default path (which doesn't exist) and failing! Shouldn't
$ModDir tell rsyslog where to find its modules???

The rsyslog.conf file starts with:

$ModDir /path/to/snap/usr/lib/x86_64-linux-gnu/rsyslog/

But when I run:

/path/to/snap/usr/sbin/rsyslogd -d -f /tmp/rsyslog.conf

I get the following output:

5230.637921111:main thread : rsyslogd.c: rsyslogd 8.32.0 startup,
module path '', cwd:/home/admin
5230.638616091:main thread : glbl.c: rsyslog/glbl: using '' as
localhost IP
5230.639070718:main thread : obj.c: caller requested object 'net', not
found (iRet -3003)
5230.639421215:main thread : modules.c: Requested to load module 'lmnet'
5230.639735667:main thread : modules.c: loading module
5230.640130977:main thread : errmsg.c: Called LogMsg, msg: could not
load module '/usr/lib/x86_64-linux-gnu/rsyslog/', dlopen:
/usr/lib/x86_64-linux-gnu/rsyslog/ cannot open shared object
file: No such file or directory

rsyslog internal message (3,-2066): could not load module
'/usr/lib/x86_64-linux-gnu/rsyslog/', dlopen:
/usr/lib/x86_64-linux-gnu/rsyslog/ cannot open shared object
file: No such file or directory
[v8.32.0 try ]
Error during class init for object 'conf' - failing...
rsyslogd initializiation 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 to learn what that number means)

Any ideas how to get around this (without rebuilding rsyslogd from source?)


Derek Atkins 617-623-3745
Computer and Internet Security Consultant

rsyslog mailing list
What's up with rsyslog? Follow
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.