user manager and netfilter-persistent service failing after reboot

Discussion in 'Installation/Configuration' started by sam1989, Apr 1, 2022.

  1. sam1989

    sam1989 New Member

    Hello,

    I am running an Ubuntu 20.04 server installed following the perfect server guide.
    For more than a month it is working fine.
    Yesterday I rebooted the server after updating it and updating ISPConfig to its latest version,
    then a few hours later I noticed something wasn’t working as Postfix wasn’t running.
    I didn’t find any error for Postfix, only restarting it made it work, I had this problem in the past with a previous setup that was fixed by reinstalling everything but it seems this problem is back.

    But while doing systemctl to check if there was other services not running, I had 2 errors:

    And also netfilter-persistent was in failed status and it’s log shows these errors:
    How can I solve these 2 problems?
    Is there anything that could explain the Postfix failure when the system reboots but which then works perfectly when manually restarting it ?
    I did some research I found the same advice of adding -w or -n for netfilter-persistent but I’d like to be sure I won’t break anything that was configured by ISPconfig and to be sure where I should add it.
    Thanks
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Start with this and post the report in CODE tags. https://www.howtoforge.com/community/threads/please-read-before-posting.58408/
    Try finding more info with
    Code:
    systemctl status [email protected]
    Code:
    man [email protected]
    You wrote you updated, I guess updated the Ubuntu OS? Read the log to see what happened during upgrade, pay attention to warnings and strange goings on. The log is in /var/log/dpkg.log or /var/log/dpkg.log.1.
    Did you during ISPConfig update allow it to reconfigure services? Was there any error or warning during update?
     
  3. sam1989

    sam1989 New Member

    Hi,
    Thanks for the help.
    For the update, I ran apt-get upgrade and for ISPConfig I did reconfigure the services and there was no errors all went fine.

    For the [email protected], it reported the error:
    Code:
    Failed to create /user.slice/user-1000.slice/[email protected]/init.scope control group: Permission denied
    I found a fix by reconfiguring the permissions, I rebooted the system and this error is gone.
    The one with netfilter-persistent is still the same and postfix is still not working after a reboot, right after a reboot it says:
    Code:
      postfix.service                                          loaded active exited    Postfix Mail Transport Agent                                            
    ● [email protected]                                        loaded failed failed    Postfix Mail Transport Agent (instance -)    
    I don't see errors in the postfix logs.

    The report:
    (the ISPConfig port error is because it is configured to use a different port)
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 20.04.4 LTS
     
    [INFO] uptime:  18:57:02 up 1 day, 13:55,  1 user,  load average: 0.10, 0.12, 0.
    12
     
    [INFO] memory:
                  total        used        free      shared  buff/cache   available
    Mem:          8.0Gi       1.9Gi       4.6Gi        72Mi       1.5Gi       6.1Gi
    Swap:            0B          0B          0B
     
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.8p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.4.3
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.4.3
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Apache 2 (PID 1899)
    [INFO] I found the following mail server(s):
        Postfix (PID 31043)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 400)
    [INFO] I found the following imap server(s):
        Dovecot (PID 400)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 809)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [anywhere]:25        (31043/master)
    [localhost]:953        (404/named)
    [anywhere]:993        (400/dovecot)
    [anywhere]:995        (400/dovecot)
    [localhost]:11332        (417/rspamd:)
    [localhost]:11333        (417/rspamd:)
    [localhost]:11334        (417/rspamd:)
    [localhost]:10023        (545/postgrey)
    [localhost]:10024        (712/amavisd-new)
    [localhost]:10025        (31043/master)
    [localhost]:10026        (712/amavisd-new)
    [localhost]:10027        (31043/master)
    [anywhere]:587        (31043/master)
    [localhost]:6379        (536/redis-server)
    ***.***.***.***:11211        (403/memcached)
    [anywhere]:110        (400/dovecot)
    [anywhere]:1103        (490/sshd:)
    [anywhere]:143        (400/dovecot)
    [anywhere]:111        (1/init)
    [anywhere]:465        (31043/master)
    [anywhere]:21        (809/pure-ftpd)
    ***.***.***.***:53        (404/named)
    ***.***.***.***:53        (404/named)
    [localhost]:53        (404/named)
    ***.***.***.***:53        (180/systemd-resolve)
    [anywhere]:22        (490/sshd:)
    *:*:*:*::*:25        (31043/master)
    *:*:*:*::*:953        (404/named)
    *:*:*:*::*:443        (1899/apache2)
    *:*:*:*::*:993        (400/dovecot)
    *:*:*:*::*:995        (400/dovecot)
    *:*:*:*::*:11332        (417/rspamd:)
    *:*:*:*::*:11333        (417/rspamd:)
    *:*:*:*::*:11334        (417/rspamd:)
    *:*:*:*::*:10023        (545/postgrey)
    *:*:*:*::*:10024        (712/amavisd-new)
    *:*:*:*::*:3306        (533/mysqld)
    *:*:*:*::*:10026        (712/amavisd-new)
    *:*:*:*::*:587        (31043/master)
    *:*:*:*::*:6379        (536/redis-server)
    *:*:*:*::*:8078        (1899/apache2)
    [localhost]10        (400/dovecot)
    [localhost]103        (490/sshd:)
    [localhost]43        (400/dovecot)
    [localhost]11        (1/init)
    *:*:*:*::*:80        (1899/apache2)
    *:*:*:*::*:465        (31043/master)
    *:*:*:*::*:8081        (1899/apache2)
    *:*:*:*::*:21        (809/pure-ftpd)
    *:*:*:*::*:53        (404/named)
    *:*:*:*::*53        (404/named)
    *:*:*:*::*:53        (404/named)
    *:*:*:*::*:22        (490/sshd:)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    f2b-pure-ftpd  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 21
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain f2b-pure-ftpd (1 references)
    target     prot opt source               destination        
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination        
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***          [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    
    
    
    ##### LET'S ENCRYPT #####
    Certbot is installed in /usr/bin/letsencrypt
    
    the dpkg log:
    Code:
    2022-04-01 04:48:02 startup archives unpack
    2022-04-01 04:48:05 upgrade rsync:amd64 3.1.3-8ubuntu0.1 3.1.3-8ubuntu0.3
    2022-04-01 04:48:05 status half-configured rsync:amd64 3.1.3-8ubuntu0.1
    2022-04-01 04:48:05 status unpacked rsync:amd64 3.1.3-8ubuntu0.1
    2022-04-01 04:48:05 status half-installed rsync:amd64 3.1.3-8ubuntu0.1
    2022-04-01 04:48:05 status triggers-pending systemd:amd64 245.4-4ubuntu3.15
    2022-04-01 04:48:05 status triggers-pending man-db:amd64 2.9.1-1
    2022-04-01 04:48:06 status unpacked rsync:amd64 3.1.3-8ubuntu0.3
    2022-04-01 04:48:06 upgrade alsa-ucm-conf:all 1.2.2-1ubuntu0.11 1.2.2-1ubuntu0.12
    2022-04-01 04:48:06 status half-configured alsa-ucm-conf:all 1.2.2-1ubuntu0.11
    2022-04-01 04:48:06 status unpacked alsa-ucm-conf:all 1.2.2-1ubuntu0.11
    2022-04-01 04:48:06 status half-installed alsa-ucm-conf:all 1.2.2-1ubuntu0.11
    2022-04-01 04:48:07 status unpacked alsa-ucm-conf:all 1.2.2-1ubuntu0.12
    2022-04-01 04:48:07 upgrade goaccess:amd64 1:1.5.5-focal 1:1.5.6-focal
    2022-04-01 04:48:07 status half-configured goaccess:amd64 1:1.5.5-focal
    2022-04-01 04:48:07 status unpacked goaccess:amd64 1:1.5.5-focal
    2022-04-01 04:48:07 status half-installed goaccess:amd64 1:1.5.5-focal
    2022-04-01 04:48:07 status unpacked goaccess:amd64 1:1.5.6-focal
    2022-04-01 04:48:07 upgrade rspamd:amd64 3.1-1~focal 3.2-1~focal
    2022-04-01 04:48:07 status half-configured rspamd:amd64 3.1-1~focal
    2022-04-01 04:48:08 status unpacked rspamd:amd64 3.1-1~focal
    2022-04-01 04:48:08 status half-installed rspamd:amd64 3.1-1~focal
    2022-04-01 04:48:09 status unpacked rspamd:amd64 3.2-1~focal
    2022-04-01 04:48:10 startup packages configure
    2022-04-01 04:48:10 configure alsa-ucm-conf:all 1.2.2-1ubuntu0.12 <none>
    2022-04-01 04:48:10 status unpacked alsa-ucm-conf:all 1.2.2-1ubuntu0.12
    2022-04-01 04:48:10 status half-configured alsa-ucm-conf:all 1.2.2-1ubuntu0.12
    2022-04-01 04:48:10 status installed alsa-ucm-conf:all 1.2.2-1ubuntu0.12
    2022-04-01 04:48:10 configure goaccess:amd64 1:1.5.6-focal <none>
    2022-04-01 04:48:10 status unpacked goaccess:amd64 1:1.5.6-focal
    2022-04-01 04:48:10 status half-configured goaccess:amd64 1:1.5.6-focal
    2022-04-01 04:48:10 status installed goaccess:amd64 1:1.5.6-focal
    2022-04-01 04:48:10 configure rspamd:amd64 3.2-1~focal <none>
    2022-04-01 04:48:10 status unpacked rspamd:amd64 3.2-1~focal
    2022-04-01 04:48:10 status half-configured rspamd:amd64 3.2-1~focal
    2022-04-01 04:48:12 status installed rspamd:amd64 3.2-1~focal
    2022-04-01 04:48:12 configure rsync:amd64 3.1.3-8ubuntu0.3 <none>
    2022-04-01 04:48:12 status unpacked rsync:amd64 3.1.3-8ubuntu0.3
    2022-04-01 04:48:12 status half-configured rsync:amd64 3.1.3-8ubuntu0.3
    2022-04-01 04:48:15 status installed rsync:amd64 3.1.3-8ubuntu0.3
    2022-04-01 04:48:15 trigproc man-db:amd64 2.9.1-1 <none>
    2022-04-01 04:48:15 status half-configured man-db:amd64 2.9.1-1
    2022-04-01 04:48:24 status installed man-db:amd64 2.9.1-1
    2022-04-01 04:48:24 trigproc systemd:amd64 245.4-4ubuntu3.15 <none>
    2022-04-01 04:48:24 status half-configured systemd:amd64 245.4-4ubuntu3.15
    2022-04-01 04:48:25 status installed systemd:amd64 245.4-4ubuntu3.15
    
    Thanks
     
  4. sam1989

    sam1989 New Member

    Hi,

    Since, I tried a couple of things but I noticed the user manager error came back again and after a reboot the firewall was blocking everything and postfix was again not working.

    In the postfix logs I found the following:
    Code:
    Apr  9 18:45:45 server01 dovecot: auth: Error: auth worker: Aborted PASSV request for [email protected]: Lookup timed out
    Apr  9 18:45:45 server01 dovecot: auth: Warning: auth workers: Auth request was queued for 54 seconds, 3 left in queue (see auth_worker_max_count)
    Apr  9 18:45:45 server01 dovecot: auth-worker(547): Error: sql([email protected],2a01:xxxxx:xxxx:xxxx:xxx:ba27,<6TSwbTvcm+Qxxxxxx>): Password query failed: Not connected to database
    Apr  9 18:45:45 server01 dovecot: auth-worker(547): Warning: conn unix:auth-worker (pid=542,uid=0): auth-worker<1>: Auth master disconnected us while handling request for [email protected] for 60 secs (result=FAIL)
    Apr  9 18:45:45 server01 dovecot: auth-worker(772): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 1 seconds before retry
    Apr  9 18:45:45 server01 dovecot: auth-worker(772): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 1 seconds before retry
    Apr  9 18:45:46 server01 dovecot: auth-worker(772): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 5 seconds before retry
    Apr  9 18:45:46 server01 dovecot: auth-worker(772): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 5 seconds before retry
    It always works after a manual restart of the services.
    Could all of these be a problem with the database ?
     
    Last edited: Apr 13, 2022

Share This Page