amavisd-new no longer starts after upgrade to ISPConfig 3.1 and Ubuntu 16.10

Discussion in 'General' started by Reinhold Kainhofer, Nov 19, 2016.

  1. Reinhold Kainhofer

    Reinhold Kainhofer New Member

    Yesterday I upgraded IPSConfig to version 3.1.1p1 and Ubuntu to 16.10. Most things work just fine, but amavisd-new refuses to start on port 10024, effectively taking the whole mail server offline. All incoming mails are stuck in the postfix queue and are not delivered. The system has been running with 14.04 and ISPC 3.0.5p... for months and years before without issues.

    Amavisd-new claims that it is not able connect to port 10024 ([Permission denied]) and no longer starts and manually restarting does not work, either:

    Code:
    root@server /etc/amavis # service amavis restart
    
    root@server /etc/amavis # systemctl status amavis.service
    ● amavis.service - LSB: Starts amavisd-new mailfilter
    Loaded: loaded (/etc/init.d/amavis; generated; vendor preset: enabled)
    Active: active (exited) since Sat 2016-11-19 19:39:50 CET; 44s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 20798 ExecStop=/etc/init.d/amavis stop (code=exited, status=0/SUCCESS)
    Process: 20823 ExecStart=/etc/init.d/amavis start (code=exited, status=0/SUCCESS)
    
    Nov 19 19:39:50 server.kainhofer.com systemd[1]: Starting LSB: Starts amavisd-new mailfilter...
    Nov 19 19:39:50 server.kainhofer.com amavis[20846]: starting. /usr/sbin/amavisd-new at server.kainhofer.com amavisd-new-2.10.1 (20141025), Unicode aware, LC_ALL="C", LANG="en_US.UTF-8"
    Nov 19 19:39:50 server.kainhofer.com amavis[20860]: (!)Net::Server: 2016/11/19-19:39:50 Can't connect to TCP port 10024 on 127.0.0.1 [Permission denied]\n  at line 68 in file /usr/share/perl5/Net/Server/Proto/TCP.pm
    Nov 19 19:39:50 server.kainhofer.com amavis[20823]: Starting amavisd: amavisd-new.
    Nov 19 19:39:50 server.kainhofer.com systemd[1]: Started LSB: Starts amavisd-new mailfilter.
    
    I made sure no other demon is blocking port 10024:
    Code:
    root@server /var/log # lsof -i :10024 
    root@server /etc/postfix # netstat -a |grep 1002 
    tcp  0  0 localhost:10023  0.0.0.0:*  LISTEN  
    tcp  0  0 localhost:10025  0.0.0.0:*  LISTEN  
    tcp  0  0 localhost:10027  0.0.0.0:*  LISTEN  
    
    I have removed apparmor and selinux is not installed, either.

    Any idea what is wrong with amavisd-new and how I can get back my mail server?

    Thanks,
    Reinhold
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Did you (re-)run the ispconfig updater after updating ubuntu version and let it reconfigure services?

    My guess would be misconfiguration (maybe from the above), possibly trying to listen on 10024 twice, or selinux, which you said is disabled. Could try a reboot for good measure. Run through the ubuntu 16.10 perfect server guide and make sure nothing is missing (I note there are 'disable apparmor' instructions there, maybe verify that...).
     
  3. Reinhold Kainhofer

    Reinhold Kainhofer New Member

    Yes, I re-run the ispconfig update (cd ispconfig3_install/install/ && php ./update.php) and let it reconfigure all services. I also tried a reboot before posting here.
    I also ran all relevant commands from the Ubuntu 16.10 perfect server guide before posting here. The apparmor service has status "exited".

    Looking at the amavis perl code, the error appeared inside in if block where ipv6-related conditions were also used, so I tried disabling ipv6 on the server. This made this error go away, but still resulted in other fatal errors so that amavis would still not start up.

    As a last solution, I tried installing the amavis version from Ubuntu 14.04 (which was installed before upgrading to 16.04), and suddenly everything started working again.

    So, either the latest amavis version shipped by Ubuntu 16.10 is broken, or ispconfig is incorrectly configuring it.

    Since I wasn't sure (and couldn't really determine) whether the problem was with ISPConfig or with Amavis (or the Ubuntu package), I also posted to the amavis-users mailing list (https://lists.amavis.org/pipermail/amavis-users/2016-November/004621.html) and submitted a bug report to Ubuntu (https://bugs.launchpad.net/ubuntu/+source/amavisd-new/+bug/1643249)
     

Share This Page