Mailing List Archive

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

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 '127.0.0.1' 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
'/usr/lib/x86_64-linux-gnu/rsyslog/lmnet.so'
5230.640130977:main thread : errmsg.c: Called LogMsg, msg: could not
load module '/usr/lib/x86_64-linux-gnu/rsyslog/lmnet.so', dlopen:
/usr/lib/x86_64-linux-gnu/rsyslog/lmnet.so: 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/lmnet.so', dlopen:
/usr/lib/x86_64-linux-gnu/rsyslog/lmnet.so: cannot open shared object
file: No such file or directory
[v8.32.0 try http://www.rsyslog.com/e/2066 ]
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
http://www.rsyslog.com/e/2066 to learn what that number means)

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

-derek

--
Derek Atkins 617-623-3745
derek@ihtfp.com www.ihtfp.com
Computer and Internet Security Consultant

_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
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.