After installation with no error, amavisd is not running

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
sterua
Posts: 6
Joined: Thu Feb 26, 2015 1:41 am

After installation with no error, amavisd is not running

Postby sterua » Fri Sep 06, 2019 2:08 pm

Hello All.
It's been few hours i seek how to start amavisd but i dont find how.

I've installed zcs 8.8.15.GA.3847.UBUNTU18.64 UBUNTU18_64 on ubuntu 18.04

in my server, i've install dnsmasq with the configuration (i've replace my domain name by mydomain.com and my public ip by xx.xx.xx.xx) :

Code: Select all

server=8.8.8.8
server=8.8.6.6
listen-address=127.0.0.1
domain=mydomain.com
#address=/mydomain.com/127.0.0.1
#address=/mydomain.com/XX.XX.XX.XX
mx-host=mydomain.com,mydomain.com,5


my /etc/hosts is :

Code: Select all

127.0.0.1 localhost.mydomain.com       localhost
127.0.0.1 mydomain.com myhost
xx.xx.xx.xx mydomain.com mydomain.com


i also disable ipv6

no error during installation, but, amavis, antispam and antivirus don't start

when i try to restart service or just start zmamavisctl, i've got his in the log :

Code: Select all

Sep  6 10:04:36 mydomain amavis[1027]: starting. /opt/zimbra/common/sbin/amavisd at mydomain.com amavisd-new-2.10.1 (20141025), Unicode aware, LANG="fr_FR.UTF-8"
Sep  6 10:04:36 mydomain amavis-services[22304]: childproc_minder: FLUSH process states
Sep  6 10:04:36 mydomain amavis-services[22305]: snmp_responder: FLUSH snmp data
Sep  6 10:04:36 mydomain amavis[1027]: perl=5.026001, user=999, EUID: 999 (999);  group=, EGID: 999 5 998 999 (999 5 998 999)
Sep  6 10:04:36 mydomain amavis[1027]: SpamControl: init_pre_chroot on SpamAssassin done
Sep  6 10:04:36 mydomain amavis[1040]: Net::Server: Process Backgrounded
Sep  6 10:04:36 mydomain amavis[1040]: Net::Server: 2019/09/06-10:04:36 Amavis (type Net::Server::PreForkSimple) starting! pid(1040)
Sep  6 10:04:36 mydomain amavis[1040]: Net::Server: Binding to UNIX socket file "/opt/zimbra/data/amavisd/amavisd.sock"
Sep  6 10:04:36 mydomain amavis[1040]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
Sep  6 10:04:36 mydomain amavis[1040]: (!)Net::Server: 2019/09/06-10:04:36 Can't connect to TCP port 10024 on 127.0.0.1 [Address already in use]\n  at line 64 in file /opt/zimbra/common/lib/perl5/Net/Server/Proto/TCP.pm
Sep  6 10:04:36 mydomain amavis[1040]: Net::Server: 2019/09/06-10:04:36 Server closing!


Can someone help me please ? (sorry for my english)


User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 462
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: 8.7.11_P12 RHEL6 Network Edition
Contact:

Re: After installation with no error, amavisd is not running

Postby JDunphy » Fri Sep 06, 2019 4:46 pm

sterua wrote:Hello All.
It's been few hours i seek how to start amavisd but i dont find how.

I've installed zcs 8.8.15.GA.3847.UBUNTU18.64 UBUNTU18_64 on ubuntu 18.04

Sep 6 10:04:36 mydomain amavis[1040]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
Sep 6 10:04:36 mydomain amavis[1040]: (!)Net::Server: 2019/09/06-10:04:36 Can't connect to TCP port 10024 on 127.0.0.1 [Address already in use]\n at line 64 in file /opt/zimbra/common/lib/perl5/Net/Server/Proto/TCP.pm
Sep 6 10:04:36 mydomain amavis[1040]: Net::Server: 2019/09/06-10:04:36 Server closing![/code]

Can someone help me please ? (sorry for my english)

Make sure you don't have any old amavis running... Error message above says you do because a process is already bound to that port 10024 and in listen mode. A few ways to verify this.

Code: Select all

# su - zimbra
% zmamavisdctl status
amavisd is running.
amavisd-mc is running.
% ps axo pid,command |grep master |grep amavi
19909 /opt/zimbra/common/sbin/amavisd (master)
% zmamavisdctl stop 
Stopping amavisd... done.
Stopping amavisd-mc... done.
% ps axo pid,command |grep master |grep amavi
% zmamavisdctl status
amavisd is not running.
% zmamavisdctl start
Starting amavisd-mc...done.
Starting amavisd...done.

or work backwards from the socket 10024 to see what programs are running that are listening on this port and kill them. Note: kill -TERM should be enough to the master amavis but don't try to start until you can verify that you don't have anything listening on port 10024

Code: Select all

% su -
# lsof -i :10024
COMMAND   PID   USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
amavisd   696 zimbra    4u  IPv4 370675540      0t0  TCP localhost:10024 (LISTEN)
amavisd   764 zimbra    4u  IPv4 370675540      0t0  TCP localhost:10024 (LISTEN)
amavisd  2586 zimbra    4u  IPv4 370675540      0t0  TCP localhost:10024 (LISTEN)
amavisd  2646 zimbra    4u  IPv4 370675540      0t0  TCP localhost:10024 (LISTEN)
amavisd 26670 zimbra    4u  IPv4 370675540      0t0  TCP localhost:10024 (LISTEN)
...

# su - zimbra
% zmamavisdctl start
sterua
Posts: 6
Joined: Thu Feb 26, 2015 1:41 am

Re: After installation with no error, amavisd is not running

Postby sterua » Fri Sep 06, 2019 10:54 pm

thanks a lot, JDunphy, it works !!!!! but just until reboot ...
i've akready try stop et restart zmamavisctl but i had not have ths lsof command.
so, now, when i reboot, i do zmcontrol status, and i have :

Code: Select all

Host mydomain.com
        amavis                  Stopped
                amavisd is not running.
        antispam                Stopped
                zmamavisdctl is not running
        antivirus               Stopped
                zmamavisdctl is not running
                zmclamdctl is not running
                zmfreshclamctl is not running
        convertd                Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Stopped
                zmsaslauthdctl is not running
                postfix is not running
        opendkim                Stopped
                zmopendkimctl is not running.
        proxy                   Running
        service webapp          Running
        snmp                    Stopped
                zmswatch is not running.
        spell                   Stopped
                zmapachectl is not running
        stats                   Stopped
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running


so, i do a zmcontrol restart and zmcontrol status after:

Code: Select all

~$ zmcontrol restart
Host mydomain.com
        Stopping vmware-ha...Done.
        Stopping zmconfigd...Done.
        Stopping zimlet webapp...Done.
        Stopping zimbraAdmin webapp...Done.
        Stopping zimbra webapp...Done.
        Stopping service webapp...Done.
        Stopping stats...Done.
        Stopping mta...Done.
        Stopping spell...Done.
        Stopping snmp...Done.
        Stopping cbpolicyd...Done.
        Stopping archiving...Done.
        Stopping opendkim...Done.
        Stopping amavis...Done.
        Stopping antivirus...Done.
        Stopping antispam...Done.
        Stopping proxy...Done.
        Stopping memcached...Done.
        Stopping mailbox...Done.
        Stopping convertd...Done.
        Stopping logger...Done.
        Stopping dnscache...Done.
        Stopping ldap...Done.
Host mydomain.com
        Starting ldap...Done.
        Starting zmconfigd...Done.
        Starting logger...Done.
        Starting convertd...Done.
        Starting mailbox...Done.
        Starting memcached...Done.
        Starting proxy...Done.
        Starting amavis...Done.
        Starting antispam...Done.
        Starting antivirus...Done.
        Starting opendkim...Done.
        Starting snmp...Done.
        Starting spell...Done.
        Starting mta...Done.
        Starting stats...Done.
        Starting service webapp...Done.
        Starting zimbra webapp...Done.
        Starting zimbraAdmin webapp...Done.
        Starting zimlet webapp...Done.
zimbra@host:~$ zmcontrol status
Host mydomain.com
        amavis                  Stopped
                amavisd is not running.
        antispam                Stopped
                zmamavisdctl is not running
        antivirus               Stopped
                zmamavisdctl is not running
        convertd                Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        service webapp          Running
        snmp                    Running
        spell                   Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running


i do work, after that, i do : zmamavisdctl stop
after, with root login, i do lsof -i :10024 and a kill -9 of all pid shown.
For ending, i do a zmamavisdctl start as zimbra user, and all service are running ...

Code: Select all

zimbra@host:~$ zmamavisdctl stop
zimbra@host:~$ exit
root@host:~# lsof -i :10024
COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
/usr/sbin 2126 amavis    5u  IPv4  30600      0t0  TCP localhost.condateam.com:10024 (LISTEN)
/usr/sbin 2178 amavis    5u  IPv4  30600      0t0  TCP localhost.condateam.com:10024 (LISTEN)
/usr/sbin 2179 amavis    5u  IPv4  30600      0t0  TCP localhost.condateam.com:10024 (LISTEN)
root@host:~# kill 2126 2178 2179
root@host:~# su - zimbra
zimbra@host:~$ zmamavisdctl start
Starting amavisd-mc...done.
Starting amavisd...Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.{ <-- HERE ,200}).*$/ at /opt/zimbra/common/lib/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 921, <DATA> line 755.
done.
zimbra@host:~$ zmcontrol status
Host mydomain.com
        amavis                  Running
        antispam                Running
        antivirus               Running
        convertd                Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        service webapp          Running
        snmp                    Running
        spell                   Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running


So why do i have to do this for all service running? how can i fix it for all services working at reboot ?
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 462
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: 8.7.11_P12 RHEL6 Network Edition
Contact:

Re: After installation with no error, amavisd is not running

Postby JDunphy » Sat Sep 07, 2019 5:27 pm

Hello,

Pretty interesting problem. You have a lot of things going on including the topic of amavisd given what you have posted.

Can you verify what you are attempting to start on reboot. I would be looking for non zimbra things. I am not running ubuntu 18 or anything systemd related but I think you want to do something like:

Code: Select all

$ systemctl list-dependencies

Maybe someone who is running 8.8.15 and Ubuntu 18+ can chime in and help here.

You are looking to see if you are attempting to start non zimbra postfix or non zimbra amavis, etc, etc. It's a fairly common problem for admins coming to zimbra to forget they have previous configurations of postfix installed or other programs that are included with zimbra... You want to disable those non zimbra versions if that applies to you. I would start there. Once you have that ruled out, the next step is to look at some load issues because some of these start scripts have sleep and a severely slow machine could throw off their ability to test if the daemon came up and those start scripts could end early as a result. Next look at memory and dmesg to see if the kernel is killing processes because of shortfalls. If you don't have any swap configured then the kernel will do its best to kill off processes to help with memory shortfalls.

Also /var/log/zimbra.log should have a lot of information of what happened when you did your reboot that may help isolate the problem.

It isn't common to have any of the issues you are reporting so you should expect to have a clean reboot and have zimbra come up clean. Unfortunately, I don't have enough of a picture of what is going on to identify the root cause.

Jim
Slava
Posts: 1
Joined: Fri Aug 23, 2019 9:42 am

Re: After installation with no error, amavisd is not running

Postby Slava » Mon Sep 09, 2019 4:51 am

Good morning!

I also had a problem 8.8.15.GA.3847.UBUNTU18.64 if disabling IPv6


If you use the /etc/sysctl.conf method, then
( WARNING: Please note, that at the time of writing this method to disable IPv6 after reboot using /etc/sysctl.conf configuration file on Ubuntu 18.04 does Not work. However, this seems to be a bug so feel free to try.)

I disabled IPv6: The recommend method to disable IPv6 on Ubuntu 18.04 after reboot is to configure the GRUB boot loader to pass kernel parameter during the boot time.

after that the error with Amavisd disappeared
phoenix
Ambassador
Ambassador
Posts: 26284
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: After installation with no error, amavisd is not running

Postby phoenix » Mon Sep 09, 2019 6:25 am

sterua wrote:my /etc/hosts is :

Code: Select all

127.0.0.1 localhost.mydomain.com       localhost
127.0.0.1 mydomain.com myhost
xx.xx.xx.xx mydomain.com mydomain.com
That hosts file is incorrect, it's been covered many times in these forums and it's even covered in a wiki article. The correct format is as follows:

Code: Select all

127.0.0.1 localhost.localdomain localhost
xx.xx.xx.xx    mail.yourdomain.com mail
i.e. the FQDN of the server needs to be specified in there, both of those line should be as I've shown.

You should also not need to disable IPv6 on your server, it works fine for me on CentOS7. Leave IPv6 enabled, fix the hosts file and see how you get on with that.
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
sterua
Posts: 6
Joined: Thu Feb 26, 2015 1:41 am

Re: After installation with no error, amavisd is not running

Postby sterua » Mon Sep 16, 2019 1:20 pm

Actually, i dont know why, but, i haves install amavisd-new, so, i remove it, and all things are now ok, all services started at boot;)
I'd like to mark the subject as resolved... but i dont know how
phoenix
Ambassador
Ambassador
Posts: 26284
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: After installation with no error, amavisd is not running

Postby phoenix » Mon Sep 16, 2019 1:27 pm

sterua wrote:Actually, i dont know why, but, i haves install amavisd-new, so, i remove it, and all things are now ok, all services started at boot;)
I'd like to mark the subject as resolved... but i dont know how
You can do that by editing your first post and changing the title.

You still need to modify your hosts file as per the details in my previous post as it is incorrectly configured.
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168

Return to “Administrators”

Who is online

Users browsing this forum: Google [Bot], raong and 12 guests