[Pkg-kannel-devel] Bug#794065: kannel: run_kannel_box prevents logging of kannel.conf errors

Kalle Niemitalo kalle.niemitalo at procomp.fi
Thu Jul 30 09:09:44 UTC 2015


Package: kannel
Version: 1.4.3-2+b2
Severity: normal

Jonas Smedegaard <dr at jones.dk> writes in Bug#590544:

> I don't know if Kannel not already spits out sensible errors in log 
> messages, but if not then yes, that's a good suggestion to pass 
> upstream.

Regarding errors in log messages....

If there is an error in /etc/kannel/kannel.conf (e.g. if it tries to set
a configuration variable that Kannel does not support), then bearerbox
fails not start, but the error message is not logged anywhere in
/var/log.  This makes the configuration error difficult to find and fix.

strace shows that bearerbox tries to write error messages to stderr
but gets ENOSPC because run_kannel_box has redirected fd 2 to /dev/full.

As a workaround, one can run bearerbox in a tty and see the error
messages that way.  However, that requires a cumbersome invocation of
sudo or su if one wants the bearerbox process to get the same uid and
gid as when started from the init script.

If you're going to revise the init scripts, then perhaps you can get rid
of run_kannel_box altogether and instead have the init system (systemd
or whatever) restart the boxes if they die for any reason.  That way,
the init system would also be in a position to log the signal that
killed the process.

There Kannel boxes can be configured to write their messages to syslog,
but AFAIK that requires setting the syslog-level variable in
kannel.conf, so it won't help if the problem is with kannel.conf itself.
Also, the messages written to /var/log/kannel/ often appear to include
passwords, so I'm wary of writing them to syslog.



More information about the Pkg-kannel-devel mailing list