postgrey cannot do reload and check status (PID problem)

Bug #1289424 reported by psl on 2014-03-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgrey (Ubuntu)
Undecided
Unassigned

Bug Description

Ubuntu 12.04.4 LTS, 64-bit version
postgrey 1.34-1

I cannot force reload of whitelist with reload command to service script of postgrey

# service postgrey reload
 * Reloading postfix greylisting daemon configuration...... [fail]

This command is called from the script /etc/init.d/postgrey, it looks OK:

start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/postgrey.pid --name postgrey

When I manually send signal 1 to postgrey, whitelists are reloaded, so it proves that postgrey handles signal 1 correctly.

Problem is with PID file, /var/run/postgrey.pid. PID stored in the file is not the PID of running postgrey.

# cat /var/run/postgrey.pid
3932
# ps -p 3932
  PID TTY TIME CMD
# ps ax | grep postgrey | grep -v grep
 1084 ? Ss 0:11 /usr/sbin/postgrey --pidfile=/var/run/postgrey.pid --daemonize --inet=10023

postgrey runs with PID 1084 but 3932 is reported in /var/run/postgrey.pid

Status query has the same problem, it report that postgrey is not running but it is not true because it runs with different PID...

# service postgrey status
 * postgrey is not running

psl (slansky) on 2014-03-07
description: updated
description: updated
psl (slansky) on 2014-03-07
description: updated
summary: - postgrey cannot do reload (init.d script)
+ postgrey cannot do reload and check status (PID problem)
psl (slansky) wrote :

start-stop-daemon cannot find postgrey process:

# service postgrey status
* postgrey is running

# ps -p $(cat /var/run/postgrey.pid)
  PID TTY TIME CMD
 8168 ? 00:00:00 /usr/sbin/postg

# start-stop-daemon --stop --pidfile /var/run/postgrey.pid --name postgrey
No postgrey found running; none killed.

psl (slansky) wrote :

# cat /proc/$(cat /var/run/postgrey.pid)/stat
8168 (/usr/sbin/postg) S 1 8168 8168 0 -1 4219200 2987 0 6 0 26 9 0 0 20 0 1 0 9870635 70381568 3821 18446744073709551615 4194304 4198756 140735866909152 140735866908392 139909713549123 0 0 128 86023 18446744071580608617 0 0 17 2 0 0 19 0 0 6299096 6299784 14188544 140735866916671 140735866916768 140735866916768 140735866916837 0

This command works, postgrey is stopped:

# start-stop-daemon --stop --pidfile /var/run/postgrey.pid --name /usr/sbin/postg

psl (slansky) wrote :

This issue is duplicate to #981789

/etc/init.d/postgrey script has to be modified from my point of view...

psl (slansky) wrote :
psl (slansky) on 2014-03-08
Changed in postgrey (Ubuntu):
status: New → Confirmed
psl (slansky) on 2014-06-26
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers