Bug 1540100 - clamav-milter fails to restart after update
Summary: clamav-milter fails to restart after update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: clamav
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-30 09:43 UTC by Dimitris
Modified: 2018-02-20 16:24 UTC (History)
10 users (show)

Fixed In Version: clamav-0.99.3-4.fc27 clamav-0.99.3-4.el7
Clone Of:
Environment:
Last Closed: 2018-02-18 00:21:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dimitris 2018-01-30 09:43:46 UTC
Description of problem:

A few days ago, there was an update for all clamav components, to 0.99.3-1.el7. Once that happened, mail stopped being accepted because the service clamav-milter/clamav-milter-systemd had failed/died. Upon further investigation, the systemd service for clamav-milter (clamav-milter-systemd) had disappeared, the output of the following command is empty:

# systemctl | grep clamav


It appears like the systemd service is enabled but dead:

# systemctl status clamav-milter
● clamav-milter.service - Milter module for the Clam Antivirus scanner
   Loaded: loaded (/usr/lib/systemd/system/clamav-milter.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Tue 2018-01-30 05:28:04 EET; 6h ago
 Main PID: 849 (code=exited, status=0/SUCCESS)

Jan 19 04:45:28 server clamav-milter[849]: +++ Started at Fri Jan 19 04:45:28 2018
Jan 19 04:45:28 server clamav-milter[849]: WARNING: No clamd server appears to be available
Jan 19 04:45:28 server clamav-milter[849]: No clamd server appears to be available
Jan 30 05:28:04 server clamav-milter[849]: ClamAV: mi_stop=1


What worries me even more, is that by looking at the output from "systemctl status", it says that the system is in "State: running", even though it is clear the clamav-milter service is dead.

Based on the error above, I think clamd delayed to start and clamav-milter did not re-try to connect again.

Of course, once I restart the clamav-milter service, everything is back to normal. But I am opening this bug report, because this issue may arise again, in the next package update.

Thank you.



Version-Release number of selected component (if applicable):

clamav-milter-systemd-0.99.3-1.el7.noarch
clamav-milter-0.99.3-1.el7.x86_64


How reproducible:

always


Steps to Reproduce:
1. yum update
2. systemctl status clamav-milter, to confirm dead service


Actual results:

clamav-milter is dead


Expected results:

clamav-milter to live

Comment 1 Sergio Basto 2018-01-30 12:06:28 UTC
can you restart the service ? and check if it is running ?

I already wrote about this somewhere

Comment 2 Dimitris 2018-01-30 14:54:03 UTC
I can do a "systemctl start clamav-milter" and the service/daemon will come back alive as if nothing happened.

What is interesting, after it starts, systemctl reports it as a service!

# systemctl | grep clamav
clamav-milter.service                                                                  loaded active running   Milter module for the Clam Antivirus scanner


From what little I understand, I would guess that the RPM package update procedure removes the existing systemd service, installs a new one, which isn't properly registered with systemd, or something along those lines.

Comment 3 Sergio Basto 2018-01-31 13:07:03 UTC
(In reply to Dimitris from comment #2)
> From what little I understand, I would guess that the RPM package update
> procedure removes the existing systemd service, installs a new one, which
> isn't properly registered with systemd, or something along those lines.

Hello , have you any evidence of a missing "systemctl daemon-reload" ? 

I found and fix a missing scriplet but is in clamd@.service ...

Comment 4 Fedora Update System 2018-01-31 13:07:54 UTC
clamav-0.99.3-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f85e6eff90

Comment 5 Fedora Update System 2018-01-31 13:10:43 UTC
clamav-0.99.3-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-4ee5e08424

Comment 6 Fedora Update System 2018-01-31 17:27:20 UTC
clamav-0.99.3-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-93724354e4

Comment 7 Fedora Update System 2018-01-31 17:29:12 UTC
clamav-0.99.3-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a19bc46b6c

Comment 8 Fedora Update System 2018-02-01 18:09:39 UTC
clamav-0.99.3-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a19bc46b6c

Comment 9 Fedora Update System 2018-02-01 19:30:24 UTC
clamav-0.99.3-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-93724354e4

Comment 10 Dimitris 2018-02-02 09:38:00 UTC
Please take a look at the following. I tried to log the procedure, it shows how my system runs with clamav-milter but after yum update, the service is gone and the clamav-milter process is dead. My comments are in parenthesis.



(display current system status)

# rpm -qa|grep -i clam
clamav-filesystem-0.99.2-8.el7.noarch
clamav-data-0.99.2-8.el7.noarch
clamav-milter-0.99.2-8.el7.x86_64
clamav-server-systemd-0.99.2-8.el7.noarch
clamav-0.99.2-8.el7.x86_64
clamav-lib-0.99.2-8.el7.x86_64
clamav-milter-sysvinit-0.99.2-8.el7.noarch
clamav-milter-systemd-0.99.2-8.el7.noarch
clamav-update-0.99.2-8.el7.x86_64
clamav-server-0.99.2-8.el7.x86_64

(enable and start clamd)

# systemctl enable clamd
Created symlink from /etc/systemd/system/multi-user.target.wants/clamd.service to /usr/lib/systemd/system/clamd.service.
# systemctl start clamd

# systemctl  enable clamav-milter
Created symlink from /etc/systemd/system/multi-user.target.wants/clamav-milter.service to /usr/lib/systemd/system/clamav-milter.service.
# systemctl start clamav-milter

(display service files)

# ls -la /usr/lib/systemd/system/clamd.service
-rw-r--r--. 1 root root 255 Sep 15 14:12 /usr/lib/systemd/system/clamd.service

# ls -la /usr/lib/systemd/system/clamav-milter.service
-rw-r--r--. 1 root root 544 Mar 27  2017 /usr/lib/systemd/system/clamav-milter.service

(update everything except clamav for the moment)

# yum -y --exclude="*clam*" update

(reboot)

# reboot

(... wait for reboot ...)

(display service status)

# systemctl status clamd
● clamd.service - clamd scanner daemon
   Loaded: loaded (/usr/lib/systemd/system/clamd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2018-02-02 11:09:47 EET; 1min 1s ago
...

# systemctl status clamav-milter
● clamav-milter.service - Milter module for the Clam Antivirus scanner
   Loaded: loaded (/usr/lib/systemd/system/clamav-milter.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2018-02-02 11:09:47 EET; 1min 6s ago
...

(now update clamav)

# yum -y update "clam*"

(verify that clamav-milter is dead and process is not alive, after update)

# ps ax |grep -i clam
 1089 ?        Ssl    0:10 /usr/sbin/clamd -c /etc/clamd.d/clamd.conf
 1809 pts/0    S+     0:00 grep --color=auto -i clam

(the clamav-milter service is gone)

# systemctl --type=service |grep clam
clamd.service                      loaded active running clamd scanner daemon

Comment 11 Fedora Update System 2018-02-03 09:33:24 UTC
clamav-0.99.3-4.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a2bbc8895e

Comment 12 Fedora Update System 2018-02-03 09:42:45 UTC
clamav-0.99.3-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5901586167

Comment 13 Fedora Update System 2018-02-04 19:38:35 UTC
clamav-0.99.3-4.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a2bbc8895e

Comment 14 Fedora Update System 2018-02-04 20:18:04 UTC
clamav-0.99.3-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5901586167

Comment 15 Sergio Basto 2018-02-07 04:43:12 UTC
(In reply to Dimitris from comment #10)
> Please take a look at the following. I tried to log the procedure, it shows
> how my system runs with clamav-milter but after yum update, the service is
> gone and the clamav-milter process is dead. My comments are in parenthesis.
> 
> 
> 
> (display current system status)
> 
> # rpm -qa|grep -i clam
> clamav-filesystem-0.99.2-8.el7.noarch
> clamav-data-0.99.2-8.el7.noarch
> clamav-milter-0.99.2-8.el7.x86_64
> clamav-server-systemd-0.99.2-8.el7.noarch
> clamav-0.99.2-8.el7.x86_64
> clamav-lib-0.99.2-8.el7.x86_64
> clamav-milter-sysvinit-0.99.2-8.el7.noarch
> clamav-milter-systemd-0.99.2-8.el7.noarch
> clamav-update-0.99.2-8.el7.x86_64
> clamav-server-0.99.2-8.el7.x86_64
> 
> (enable and start clamd)
> 
> # systemctl enable clamd
> Created symlink from
> /etc/systemd/system/multi-user.target.wants/clamd.service to
> /usr/lib/systemd/system/clamd.service.
> # systemctl start clamd
> 
> # systemctl  enable clamav-milter
> Created symlink from
> /etc/systemd/system/multi-user.target.wants/clamav-milter.service to
> /usr/lib/systemd/system/clamav-milter.service.
> # systemctl start clamav-milter
> 
> (display service files)
> 
> # ls -la /usr/lib/systemd/system/clamd.service
> -rw-r--r--. 1 root root 255 Sep 15 14:12
> /usr/lib/systemd/system/clamd.service
> 
> # ls -la /usr/lib/systemd/system/clamav-milter.service
> -rw-r--r--. 1 root root 544 Mar 27  2017
> /usr/lib/systemd/system/clamav-milter.service
> 
> (update everything except clamav for the moment)
> 
> # yum -y --exclude="*clam*" update
> 
> (reboot)
> 
> # reboot
> 
> (... wait for reboot ...)
> 
> (display service status)
> 
> # systemctl status clamd
> ● clamd.service - clamd scanner daemon
>    Loaded: loaded (/usr/lib/systemd/system/clamd.service; enabled; vendor
> preset: disabled)
>    Active: active (running) since Fri 2018-02-02 11:09:47 EET; 1min 1s ago
> ...
> 
> # systemctl status clamav-milter
> ● clamav-milter.service - Milter module for the Clam Antivirus scanner
>    Loaded: loaded (/usr/lib/systemd/system/clamav-milter.service; enabled;
> vendor preset: disabled)
>    Active: active (running) since Fri 2018-02-02 11:09:47 EET; 1min 6s ago
> ...
> 
> (now update clamav)
> 
> # yum -y update "clam*"
> 
> (verify that clamav-milter is dead and process is not alive, after update)
> 
> # ps ax |grep -i clam
>  1089 ?        Ssl    0:10 /usr/sbin/clamd -c /etc/clamd.d/clamd.conf
>  1809 pts/0    S+     0:00 grep --color=auto -i clam
> 
> (the clamav-milter service is gone)
> 
> # systemctl --type=service |grep clam
> clamd.service                      loaded active running clamd scanner daemon

you haven't report systemctl status clamav-milter after failure !


and journalctl -u  clamav-milter.service also could have useful info 

if you try update to  0.99.3-4 and failed please send me those results , many thanks

Comment 16 Fedora Update System 2018-02-18 00:21:48 UTC
clamav-0.99.3-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2018-02-20 16:24:19 UTC
clamav-0.99.3-4.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.