[opensuse] Systemd fails to start my spamd
Hi, look at this:
Telcontar:~ # date;systemctl restart spamd.service Sat Jun 15 22:58:36 CEST 2013 Job for spamd.service failed. See 'systemctl status spamd.service' and 'journalctl -n' for details. Telcontar:~ # date;systemctl status spamd.service Sat Jun 15 22:58:40 CEST 2013 spamd.service - Daemonized version of spamassassin Loaded: loaded (/usr/lib/systemd/system/spamd.service; enabled) Active: failed (Result: exit-code) since Sat, 2013-06-15 22:58:36 CEST; 3s ago Process: 31577 ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid (code=exited, status=64) Process: 31573 ExecStartPre=/bin/echo Starting spamd: (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/spamd.service
Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --ssl-version sslversion Specify SSL protocol version to use Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --server-key keyfile Specify an SSL keyfile Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --server-cert certfile Specify an SSL certificate Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketpath=path Listen on given UNIX domain socket Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketowner=name Set UNIX domain socket file's owner Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketgroup=name Set UNIX domain socket file's group Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketmode=mode Set UNIX domain socket file's mode Jun 15 22:58:36 Telcontar.valinor spamd[31577]: -V, --version Print version and exit Jun 15 22:58:36 Telcontar.valinor systemd[1]: Failed to start Daemonized version of spamassassin. Jun 15 22:58:36 Telcontar.valinor systemd[1]: Unit spamd.service entered failed state Telcontar:~ #
Is systemd calling "/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid" without expanding "$SPAMD_ARGS"?
Telcontar:~ # cat /usr/lib/systemd/system/spamd.service # This file is part of package amavisd. # # Copyright (c) 2011 SuSE LINUX Products GmbH, Germany. # Author: Werner Fink # Please send feedback to http://www.suse.de/feedback # # Description: # # Used to start the spamd the daemonized version of spamassassin # spamassassin adds a header line that shows if the mail has been # determined spam or not. This way, you can decide what to do with the # mail within the scope of your own filtering rules in your MUA (Mail # User Agent, your mail program) or your LDA (Local Delivery Agent). #
[Unit] Description=Daemonized version of spamassassin Requires=remote-fs.target syslog.target After=remote-fs.target syslog.target Before=mail-transfer-agent.target Conflicts=
[Service] Type=forking PIDFile=/var/run/spamd.pid ExecStartPre=-/bin/echo 'Starting spamd:' EnvironmentFile=-/etc/sysconfig/spamd ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid
[Install] WantedBy=multi-user.target Telcontar:~ #
I edit the line, replacing the contents: #ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid ExecStart=/usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid Then restart the service:
Telcontar:~ # date;systemctl restart spamd.service Sat Jun 15 23:05:52 CEST 2013 Warning: Unit file of spamd.service changed on disk, 'systemctl --system daemon-reload' recommended. Job for spamd.service failed. See 'systemctl status spamd.service' and 'journalctl -n' for details.
Telcontar:~ # systemctl --system daemon-reload Telcontar:~ # date;systemctl restart spamd.service Sat Jun 15 23:06:09 CEST 2013 Telcontar:~ # date;systemctl status spamd.service Sat Jun 15 23:07:19 CEST 2013 spamd.service - Daemonized version of spamassassin Loaded: loaded (/usr/lib/systemd/system/spamd.service; enabled) Active: active (running) since Sat, 2013-06-15 23:06:11 CEST; 1min 8s ago Process: 31800 ExecStart=/usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid (code=exited, status=0/SUCCESS) Process: 31796 ExecStartPre=/bin/echo Starting spamd: (code=exited, status=0/SUCCESS) Main PID: 31802 (/usr/sbin/spamd) CGroup: name=systemd:/system/spamd.service ├ 31802 /usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid ├ 31805 spamd child └ 31806 spamd child
Jun 15 23:06:11 Telcontar.valinor spamd[31802]: rules: meta test FROM_12LTRDOM has dependency 'ALL_TRUSTED' with a zero score Jun 15 23:06:11 Telcontar.valinor spamd[31802]: rules: meta test HDRS_LCASE has dependency 'ALL_TRUSTED' with a zero score Jun 15 23:06:11 Telcontar.valinor spamd[31802]: rules: meta test TBIRD_SPOOF has dependency 'ALL_TRUSTED' with a zero score Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server started on port 783/tcp (running version 3.3.2) Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server pid: 31802 Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server successfully spawned child process, pid 31805 Jun 15 23:06:11 Telcontar.valinor systemd[1]: Started Daemonized version of spamassassin. Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server successfully spawned child process, pid 31806 Jun 15 23:06:11 Telcontar.valinor spamd[31802]: prefork: child states: IS Jun 15 23:06:11 Telcontar.valinor spamd[31802]: prefork: child states: II Telcontar:~ #
Telcontar:~ # ps afxu | grep spamd root 31872 0.0 0.0 7048 860 pts/21 S+ 23:09 0:00 | | \_ grep --color=auto spamd root 31802 0.6 0.7 144792 59876 ? Ss 23:06 0:01 /usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid root 31805 0.0 0.7 144792 57492 ? S 23:06 0:00 \_ spamd child root 31806 0.0 0.7 144792 57476 ? S 23:06 0:00 \_ spamd child Telcontar:~ #
So indeed, the variable was not expanded, because me editing it works. Why? Bug? Surprising, after several months of release... -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [06-15-13 17:15]:
Telcontar:~ # date;systemctl restart spamd.service Sat Jun 15 22:58:36 CEST 2013 Job for spamd.service failed. See 'systemctl status spamd.service' and 'journalctl -n' for details. Telcontar:~ # date;systemctl status spamd.service Sat Jun 15 22:58:40 CEST 2013 spamd.service - Daemonized version of spamassassin Loaded: loaded (/usr/lib/systemd/system/spamd.service; enabled) Active: failed (Result: exit-code) since Sat, 2013-06-15 22:58:36 CEST; 3s ago Process: 31577 ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid (code=exited, status=64) Process: 31573 ExecStartPre=/bin/echo Starting spamd: (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/spamd.service
Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --ssl-version sslversion Specify SSL protocol version to use Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --server-key keyfile Specify an SSL keyfile Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --server-cert certfile Specify an SSL certificate Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketpath=path Listen on given UNIX domain socket Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketowner=name Set UNIX domain socket file's owner Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketgroup=name Set UNIX domain socket file's group Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketmode=mode Set UNIX domain socket file's mode Jun 15 22:58:36 Telcontar.valinor spamd[31577]: -V, --version Print version and exit Jun 15 22:58:36 Telcontar.valinor systemd[1]: Failed to start Daemonized version of spamassassin. Jun 15 22:58:36 Telcontar.valinor systemd[1]: Unit spamd.service entered failed state Telcontar:~ #
Is systemd calling "/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid" without expanding "$SPAMD_ARGS"?
I have never had it fail, "ps aux |grep spamd": root 4346 0.1 0.4 129088 55896 ? Ss 17:26 0:01 /usr/sbin/spamd -d -c -L -r /var/run/spamd.pid Tumbleweed/12.3 -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 15/06/13 17:12, Carlos E. R. escribió:
So indeed, the variable was not expanded, because me editing it works. Why? Bug? Surprising, after several months of release...
What do you have _exactly_ in SPAMD_ARGS ? /etc/sysconfig/spamd ? systemd IS expanding SPAMD_ARGS it contains arguments that are not understood by the daemon.. (hence you are getting usage instructions at startup) I just installed the package to reproduce your problem and I get exactly the expected behaviour, spamd.service - Daemonized version of spamassassin Loaded: loaded (/usr/lib/systemd/system/spamd.service; disabled) Active: active (running) since sáb 2013-06-15 17:58:09 CLT; 7min ago Process: 1308 ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid (code=exited, status=0/SUCCESS) Process: 1305 ExecStartPre=/bin/echo Starting spamd: (code=exited, status=0/SUCCESS) Main PID: 1310 (/usr/sbin/spamd) CGroup: name=systemd:/system/spamd.service ├─1310 /usr/sbin/spamd -d -c -L -r /var/run/spamd.pid ├─1311 spamd child └─1312 spamd child jun 15 17:58:07 linux-h253 systemd[1]: Starting Daemonized version of spamassassin... jun 15 17:58:08 linux-h253 spamd[1308]: logger: removing stderr method jun 15 17:58:09 linux-h253 spamd[1310]: spamd: server started on port 783/tcp (running version 3.3.2) jun 15 17:58:09 linux-h253 spamd[1310]: spamd: server pid: 1310 jun 15 17:58:09 linux-h253 spamd[1310]: spamd: server successfully spawned child process, pid 1311 jun 15 17:58:09 linux-h253 spamd[1310]: spamd: server successfully spawned child process, pid 1312 jun 15 17:58:09 linux-h253 systemd[1]: Started Daemonized version of spamassassin. jun 15 17:58:09 linux-h253 spamd[1310]: prefork: child states: II -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-06-16 00:05, Cristian Rodríguez wrote:
El 15/06/13 17:12, Carlos E. R. escribió:
So indeed, the variable was not expanded, because me editing it works. Why? Bug? Surprising, after several months of release...
What do you have _exactly_ in SPAMD_ARGS ? /etc/sysconfig/spamd ?
SPAMD_ARGS="-d -c --max-children=6 " # me caza menos spam! The problem is the comment. I put it on a different line and it works. Or I edit the service file directly, and it works. And previously, systemv accepted the line with the comments without problem. -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar)
El 15/06/13 19:47, Carlos E. R. escribió:
And previously, systemv accepted the line with the comments without problem.
Yes, because init scripts sourced such files to be interpreted in a shell. the relevant part of the documentation is EnvironmentFile= Similar to Environment= but reads the environment variables from a text file. The text file should contain new-line separated variable assignments. Empty lines and lines **STARTING** with ; or # will be ignored, which may be used for commenting. A line ending with a backslash will be concatenated with the following one, allowing multiline variable definitions. The parser strips leading and trailing whitespace from the values of assignments, unless you use double quotes ("). It does not parse inline comments. There is no formal specification for /etc/sysconfig, for that and many other reasons it must die. ;P The distribution specific notes http://ftp.novell.hu/pub/mirrors/ftp.novell.com/forge/library/SUSE%20Package... Say nothing about inline comments. (undefined behavior ;P) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
I had a problem with spamd initially. I use fetchmail which uses procmail which uses spamassassin in the form of spamd and then postfix. Spamassassin needs the network to be up and DNS working. I also had to add a TimeOut -- How long did the whining go on when KDE2 went on KDE3? The only universal constant is change. If a species can not adapt it goes extinct. That's the law of the universe, adapt or die. -- Billie Walsh, May 18 2013 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Anton Aylward
-
Carlos E. R.
-
Carlos E. R.
-
Cristian Rodríguez
-
Patrick Shanahan