Bind9 and Spamassassin do not start after boot - Ubuntu 16.04 x32, DigitalOcean droplet


After boot Bind9 and Spamassassin do not start. The autostart is enabled in the bootup and shutdown menu. If I start them manually they work like charm so I have created a cron job to start them - not sure if it is elegant, since they do not crash - but I assume it can be a bug, too. What do you suggest me to do? Can you please look after it?

This could be the same problem i encounter on Centos 7 where Bind starts before network finish to load and it stop Bind to work properly. Take a look at this post maybe can help you with Bind. Did you check log files and see if there is any indication what is happening?

Thanks I’ll look after it. No, I haven’t found anything in log files and I tried fresh install, too, without any luck.

I’m not so good with Ubuntu but i had similar problem with ClamAV like you have with Spamassassin. Can you use SSH, reboot you server, manually start Spamassassin and make it start on boot, e.g. avoid using Vmin to set this options but rather use SSH. In the same way i fixed my problem with ClamAV on Centos 7.


I do not fully understand you. Should I create init.d(In Ubuntu it’s upstart) for bind9 and spamassasin?

No just use SSH to start both services and avoid using Vmin menus for this. For example to start ClamAV on Centos 7 i would use:
systemctl enable clamd@scan.service
systemctl start clamd@scan.service

Now i know that Ubuntu instead of systemd it uses upstart but i’m not familiar with this OS so you should find the equivalent for this commands.

One more question i forgot to ask, can you check how much memory is used on this server. If you run low on free memory it could be the reason Bind and ClamAV do not start during reboot.

I see, thanks. Well I have 2gb ram and x32 Ubuntu so I think this should be suffice.

Edit: it seems a bug:

Best would be to avoid new OS first 6 months or even a year and give devs enough time to properly patch all bugs, especially if you intend to use in production.

True, but I really need the new MySQL along with PHP7 so that was my decision. Anyway, with this cronjob hack it works and hopefully the patches are coming soon.

As of the date of this posting I can confirm that this is an issue with Ubuntu 16.04. Although the services are shown to start at boot in Webmin->System->Bootup and Shutdown dialog they do not appear to be starting.

The workaround is to try as Diabolico suggested and run systemctl enable commands in the terminal instead of the Vitualmin web gui.

i.e. manually specify that spamassasin and clamav should start on boot

sudo systemctl enable clamav-daemon.service
sudo systemctl enable spamassassin.service

After rebooting your server you should see the two services have started as expected.