Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675200 - mail-filter/amavisd-new-2.11.1-r3: rc-status reports amavisd-new stopped even if it's started
Summary: mail-filter/amavisd-new-2.11.1-r3: rc-status reports amavisd-new stopped even...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-11 18:31 UTC by Tomáš Mózes
Modified: 2019-01-19 22:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomáš Mózes 2019-01-11 18:31:59 UTC
# /etc/init.d/amavisd status
 * status: stopped

# ps auxw | grep amavisd
amavis   25253  0.0  3.4 274340 139436 ?       Ss   17:59   0:01 /usr/sbin/amavisd (master)
amavis   25264  0.1  3.5 282776 141620 ?       S    17:59   0:01 /usr/sbin/amavisd (ch8-avail)
amavis   25265  0.1  3.5 284260 144404 ?       S    17:59   0:02 /usr/sbin/amavisd (ch11-avail)
amavis   25266  0.1  3.4 281864 141080 ?       S    17:59   0:01 /usr/sbin/amavisd (ch7-avail)
amavis   25267  0.1  3.6 286056 146184 ?       S    17:59   0:02 /usr/sbin/amavisd (ch10-avail)
amavis   25268  0.0  3.4 282004 141064 ?       S    17:59   0:01 /usr/sbin/amavisd (ch7-avail)

# /etc/init.d/amavisd restart
 * Starting amavisd ...
 * start-stop-daemon: /usr/sbin/amavisd is already running
 * Failed to start amavisd                                                                                                                                                [ !! ]
 * ERROR: amavisd failed to start

As a quickfix amavisd.initd-r1 can be used.
Comment 1 Michael Orlitzky gentoo-dev 2019-01-12 14:49:36 UTC
Ironically, I rewrote the init script for v2.11.1 (in part) to fix the exact opposite issue: bug #646336.

The new init script runs amavis in the foreground, so it should be easy to figure out what's going wrong. Amavis no longer creates its own PID file, so there's only one PID file at /run/amavisd.pid containing the PID of the "amavis (master)" process.

When you try to stop the service, OpenRC should kill the PID contained in that file, and not succeed until the process is dead. But from your "ps" output, it obviously isn't... Can you tell me what's in that PID file after a fresh start, and what happens during/after you tell OpenRC to stop it? What's in the PID file (and what is the PID of the amavis master process) after the problem appears?
Comment 2 Michael Orlitzky gentoo-dev 2019-01-19 21:08:41 UTC
Ping =)
Comment 3 Tomáš Mózes 2019-01-19 22:13:29 UTC
Sorry it took me so long and it's a false alarm. The problem was that I had app-admin/monit with old pidfile location. After adjusting the pidfile to /run/amavisd.pid it works properly.