Postgrey does not launch correctly on boot after upgrade from 14.04 to 16.04

Bug #1646584 reported by ilpssun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgrey (Ubuntu)
New
Undecided
Unassigned

Bug Description

I upgraded my Ubuntu 14.04 LTS to 16.04.1 LTS and now I have a problem with my postgrey installation. When I (re)boot the server, the postgrey startup script is apparently called but postgrey does not launch correctly. Only after manually restarting the service is postgrey working correctly.

In more detail: After reboot the following lines appear in my syslog:
Dec 1 19:22:14 systemd[1]: Starting LSB: Start/stop the postgrey daemon...
Dec 1 19:22:14 postgrey[998]: * Starting postfix greylisting daemon postgrey
Dec 1 19:22:15 postgrey[1050]: Process Backgrounded
Dec 1 19:22:15 postgrey[1050]: 2016/12/01-19:22:15 postgrey (type Net::Server::Multiplex) starting! pid(1050)
Dec 1 19:22:15 postgrey[998]: ...done.
Dec 1 19:22:15 systemd[1]: Started LSB: Start/stop the postgrey daemon.

When I then ps for postgrey, no process is found. However, a simple sudo systemctl restart postgrey makes it run properly. The launch is documented in syslog as follows:
Dec 1 19:25:54 systemd[1]: Stopping LSB: Start/stop the postgrey daemon...
Dec 1 19:25:54 postgrey[1878]: * Stopping postfix greylisting daemon postgrey
Dec 1 19:25:54 systemd[1]: postgrey.service: Control process exited, code=exited status=1
Dec 1 19:25:54 systemd[1]: Stopped LSB: Start/stop the postgrey daemon.
Dec 1 19:25:54 systemd[1]: postgrey.service: Unit entered failed state.
Dec 1 19:25:54 systemd[1]: postgrey.service: Failed with result 'exit-code'.
Dec 1 19:25:54 systemd[1]: Starting LSB: Start/stop the postgrey daemon...
Dec 1 19:25:54 postgrey[1886]: * Starting postfix greylisting daemon postgrey
Dec 1 19:25:54 postgrey[1886]: Pid_file "/var/run/postgrey.pid" already exists. Overwriting!
Dec 1 19:25:54 postgrey[1893]: Process Backgrounded
Dec 1 19:25:54 postgrey[1893]: 2016/12/01-19:25:54 postgrey (type Net::Server::Multiplex) starting! pid(1893)
Dec 1 19:25:54 postgrey[1886]: ...done.
Dec 1 19:25:54 systemd[1]: Started LSB: Start/stop the postgrey daemon.
Dec 1 19:25:54 postgrey[1893]: Resolved [localhost]:10023 to [::1]:10023, IPv6
Dec 1 19:25:54 postgrey[1893]: Resolved [localhost]:10023 to [127.0.0.1]:10023, IPv4
Dec 1 19:25:55 postgrey[1893]: Binding to TCP port 10023 on host ::1 with IPv6
Dec 1 19:25:55 postgrey[1893]: Binding to TCP port 10023 on host 127.0.0.1 with IPv4
Dec 1 19:25:55 postgrey[1893]: Setting gid to "120 120"
Dec 1 19:25:55 postgrey[1893]: Setting uid to "112"
As you can see, this time postgrey documents its binding to the correct port. When I look through my ps output now, I can see the working process there.

My suspicion is that the network is not yet ready. If I edit `/etc/init.d/postgrey` to include `$network` in the `Required-start` section, it seems to work correctly. As I'm not experienced with the linux boot process, I'm not sure whether this is a problem with my specific system or a general bug. Also, I'm not sure whether the editing the init script has any side effects that I'm not seeing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.