Warning about unknown module afsql

Bug #1009920 reported by Sébastien Koechlin on 2012-06-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
syslog-ng (Ubuntu)
Undecided
Unassigned

Bug Description

# service syslog-ng reload
 * Reload system logging syslog-ng
Plugin module not found in 'module-path'; module-path='/usr/lib/syslog-ng/3.3.4', module='afsql'
   ...done.

Module not loaded by configuration (commented line):
# grep -R afsql /etc/syslog-ng/
/etc/syslog-ng/modules.conf:#@module afsql

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: syslog-ng-core 3.3.4.dfsg-2ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Thu Jun 7 11:34:58 2012
ProcEnviron:
 LANGUAGE=fr_FR.UTF-8
 TERM=screen
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: syslog-ng
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.syslog.ng.syslog.ng.conf: [modified]
mtime.conffile..etc.syslog.ng.syslog.ng.conf: 2012-05-23T16:03:22.690655

How can I help to resolve this bug?

Moritz Bunkus (moritz-bunkus) wrote :

I have this problem as well and I know where it comes from along with three possible workarounds.

I don't have the afsql module enabled in /etc/syslog-ng/modules.conf, nor do I have syslog-ng-sql installed (only libsyslog-ng and syslog-ng-core). However, reading modules.conf I figured that afsql must be a default module.

A quick look at the package's source code revealed that as long as the SQL module is enabled it is also set as the default module by configure.

The three workarounds (any of those three I've verified to work, only one of them required, your choice):

1. Add --default-modules=... to sylog-ng's command line. This can be done by adding the following to /etc/default/syslog-ng:

SYSLOGNG_OPTS="--no-caps --default-modules=affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat"

Those modules are the ones configure sets as default as well.

2. Install the syslog-ng-mod-sql package which contains the afsql module, even if you don't use the SQL sink. I consider this suboptimal and a waste of space ;)

3. Modify the package's build routine so that it doesn't include afsql in the list of default modules and re-build it.

1. and 2. are pretty upgrade safe, 3. isn't. 3. is what the Ubuntu team itself should do; otherwise it makes no sense at all to provide a separate package for the SQL module.

Moritz Bunkus (moritz-bunkus) wrote :

BTW, you usually don't need "--no-caps". I do because I'm running a third-party kernel for which this is required, and I lazily copied/pasted from that machine without removing "--no-caps" before posting here. Sorry.

Hello,

Sorry, I did not reply; your workaround work really well.

I did the first one, as I did not want to install extra packages for warning messages (2) and not go wih a self compiled package, and security updates to do (3).

Thanks.

Gergely Nagy (algernon) wrote :

This has been fixed with module-autoloading in syslog-ng 3.4, and 3.5 is in Trusty, so setting the state accordingly.

Changed in syslog-ng (Ubuntu):
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers