asterisk spams console output to syslog due to systemd misconfiguration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
asterisk (Debian) |
Fix Released
|
Unknown
|
|||
asterisk (Ubuntu) |
Fix Released
|
Low
|
Utkarsh Gupta |
Bug Description
problem:
Jan 2 00:23:40 fitpc systemd[1]: Starting Asterisk PBX...
Jan 2 00:23:40 fitpc asterisk[2328]: #033[0mPBX UUID: xxxxxxxxxxxxxxx
Jan 2 00:23:40 fitpc asterisk[2328]: [Jan 2 00:23:40] #033[1;
odules will be loaded.
Jan 2 00:23:40 fitpc asterisk[2328]: [Jan 2 00:23:40] #033[1;
0m: No directory user found, anonymous binding as default.
and so on, including all console messages from asterisk.
The problem isn't the message, the problem is that stdout of asterisk service is continuously logged to syslog, despite asterisk already having a perfectly usable logging system which can be configured to log to file, or to syslog itself.
Moreover, the ANSI codes aren't stripped, which makes the log look awful.
after chatting in #ubuntu, i've been told I can fix this problem by the following:
systemctl edit asterisk
and adding the following to the override file:
[Service]
StandardOutput=null
StandardError=null
This indeed fixes the output spam and I can further edit /etc/asterisk/
So, I think the bug is that asterisk service definition file should include these stdout/stderr definitions by default.
Thanks for looking into this.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: asterisk 1:16.2.
ProcVersionSign
Uname: Linux 5.4.0-58-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Sat Jan 2 00:45:12 2021
InstallationDate: Installed on 2020-12-28 (4 days ago)
InstallationMedia: Ubuntu-Server 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
ProcEnviron:
TERM=screen
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: asterisk
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in asterisk (Debian): | |
status: | Unknown → New |
Changed in asterisk (Debian): | |
status: | New → Fix Released |
Changed in asterisk (Debian): | |
status: | Fix Released → Fix Committed |
Changed in asterisk (Debian): | |
status: | Fix Committed → Fix Released |
Does anyone give a rat's ass about this? I'm guessing not, but some kind of notification about it would have been nice.