Emails stop working if system is not updated

Discussion in 'Installation/Configuration' started by senormedia, Jun 10, 2020.

  1. senormedia

    senormedia Member HowtoForge Supporter

    I have installed ispconfig in various servers, everything works fine till the system requires an update then all the emails stop working
    is there a way to prevent this

    is it because that software requires the update, how would this work for people who dont update their debian for example every so often

    can someone let me know how can i prevent this
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Never seen any Debian system that stops working when there is a pending update and all my mail systems use Debian for more than 15 years. Please describe the exact error that you get.
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What kind of update? How do you install that update?
     
  4. senormedia

    senormedia Member HowtoForge Supporter

    To do the update i usually just do apt update && apt upgrade, the usual
    this is the last update, none of my emails where working or my clients, also wordpress would not send emails till i did this upgrade

    this upgrade was done on main server, which has emails and dns
    the second slave server that has nginx that has the sites would also not send emails till this update

    Commandline: apt upgrade
    Upgrade: linux-image-4.19.0-9-cloud-amd64:amd64 (4.19.118-2, 4.19.118-2+deb10u1), linux-libc-dev:amd64 (4.19.118-2, 4.19.118-2+deb10u1), clamav-docs:amd64 (0.102.2+dfsg-0+deb10u1, 0.102.3+dfsg-0+deb10u1), clamav:amd64 (0.102.2+dfsg-0+deb10u1, 0.102.3+dfsg-0+deb10u1), clamav-daemon:amd64 (0.102.2+dfsg-0+deb10u1, 0.102.3+dfsg-0+deb10u1), clamdscan:amd64 (0.102.2+dfsg-0+deb10u1, 0.102.3+dfsg-0+deb10u1), clamav-freshclam:amd64 (0.102.2+dfsg-0+deb10u1, 0.102.3+dfsg-0+deb10u1), libgnutls30:amd64 (3.6.7-4+deb10u3, 3.6.7-4+deb10u4), ca-certificates:amd64 (20190110, 20200601~deb10u1), clamav-base:amd64 (0.102.2+dfsg-0+deb10u1, 0.102.3+dfsg-0+deb10u1), libclamav9:amd64 (0.102.2+dfsg-0+deb10u1, 0.102.3+dfsg-0+deb10u1)
    End-Date: 2020-06-09 20:01:30

    command for last upgrade
    less /var/log/apt/history.log
     
  5. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    maybe clamav is not running after the update. see
    Code:
    service clamav-daemon status
     
  6. elmacus

    elmacus Active Member

  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Debian systems do not tend to stop working after updates, so there must be a general issue with your system installation if it behaves like this. In case it happens again, check the logs to find out what fails and why it fails and solve the initial reason for the failure so it won't fail on the next update again.
     
  8. senormedia

    senormedia Member HowtoForge Supporter

    till, you are correct i looked into the issue and its another error, probably just stopped working the same time i needed an update

    florian030, i ran
    service clamav-daemon status, the restarted it,

    have you gotten this error before

    I just ran the same command on my clients server an he had no errors

    is there something that makes this stop working?

    root@service:~# service clamav-daemon status
    ● clamav-daemon.service - Clam AntiVirus userspace daemon
    Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/clamav-daemon.service.d
    └─extend.conf
    Active: failed (Result: exit-code) since Thu 2020-06-11 10:01:55 UTC; 20h ago
    Docs: man:clamd(8)
    man:clamd.conf(5)
    https://www.clamav.net/documents/
    Process: 510 ExecStartPre=/bin/mkdir /run/clamav (code=exited, status=0/SUCCESS)
    Process: 589 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
    Process: 598 ExecStart=/usr/sbin/clamd --foreground=true (code=exited, status=1/FAILURE)
    Main PID: 598 (code=exited, status=1/FAILURE)

    Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.


    root@service:~# service clamav-daemon status
    ● clamav-daemon.service - Clam AntiVirus userspace daemon
    Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/clamav-daemon.service.d
    └─extend.conf
    Active: active (running) since Fri 2020-06-12 06:08:56 UTC; 2s ago
    Docs: man:clamd(8)
    man:clamd.conf(5)
    https://www.clamav.net/documents/
    Process: 25362 ExecStartPre=/bin/mkdir /run/clamav (code=exited, status=1/FAILURE)
    Process: 25363 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
    Main PID: 25365 (clamd)
    Tasks: 1 (limit: 1167)
    Memory: 278.1M
    CGroup: /system.slice/clamav-daemon.service
    └─25365 /usr/sbin/clamd --foreground=true

    Jun 12 06:08:56 service.cabanasecure.com systemd[1]: Starting Clam AntiVirus userspace daemon...
    Jun 12 06:08:56 service.cabanasecure.com mkdir[25362]: /bin/mkdir: cannot create directory ‘/run/clamav’: File exists
    Jun 12 06:08:56 service.cabanasecure.com systemd[1]: Started Clam AntiVirus userspace daemon.
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Yes.
    Look in log files for errors or clues on why it does not work. Possible log files:
    • /var/log/syslog
    • /var/log/clamav/clamav.log
    If those have nothing useful, see other log files.
    Also check with
    Code:
    systemctl --state=failed
    if other services are also failing.
     
  10. senormedia

    senormedia Member HowtoForge Supporter

    i think i figured out why the emails stop working when the update
    for the reason that its running out of memory
    I currently have the 5$ droplet at digital ocean
    memory_and_cpu - 1 GB / 1 CPU
    disk 25 GB / SSD disk
    bandwidth 1000 GB

    i think the lack of memory and cpu might be causing it to crash

    let me know if correct, read that people disable it
    https://www.faqforge.com/linux/cont...ilter-and-antivirus-functions-in-ispconfig-3/

    if its to heavy, do you need it or is there alternatives etc..., i can just increase the ram

    @Taleman, got this from the clamv log - could i t be the running out of memory

    i found of your post but i cannot find it, but i did the steps and got success after i removed run/clamv
    Process: 28669 ExecStartPre=/bin/mkdir /run/clamav (code=exited, status=0/SUCCESS)
    Process: 28670 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
    Process: 28672 ExecStart=/usr/sbin/clamd --foreground=true (code=exited, status=1/FAILURE)

    then i run restart services and i get this error

    ● clamav-daemon.service - Clam AntiVirus userspace daemon
    Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/clamav-daemon.service.d
    └─extend.conf
    Active: active (running) since Sat 2020-06-13 01:15:39 UTC; 2s ago
    Docs: man:clamd(8)
    man:clamd.conf(5)
    https://www.clamav.net/documents/
    Process: 15642 ExecStartPre=/bin/mkdir /run/clamav (code=exited, status=1/FAILURE)
    Process: 15643 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
    Main PID: 15645 (clamd)
    Tasks: 1 (limit: 1167)
    Memory: 231.9M
    CGroup: /system.slice/clamav-daemon.service
    └─15645 /usr/sbin/clamd --foreground=true


    Fri Jun 12 07:02:01 2020 -> +++ Started at Fri Jun 12 07:02:01 2020
    Fri Jun 12 07:02:01 2020 -> Received 0 file descriptor(s) from systemd.
    Fri Jun 12 07:02:01 2020 -> clamd daemon 0.102.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
    Fri Jun 12 07:02:01 2020 -> Running as user clamav (UID 113, GID 121)
    Fri Jun 12 07:02:01 2020 -> Log file size limited to 4294967295 bytes.
    Fri Jun 12 07:02:01 2020 -> Reading databases from /var/lib/clamav
    Fri Jun 12 07:02:01 2020 -> Not loading PUA signatures.
    Fri Jun 12 07:02:01 2020 -> Bytecode: Security mode set to "TrustSigned".
    Fri Jun 12 07:02:06 2020 -> ERROR: Malformed database
    Sat Jun 13 01:15:39 2020 -> +++ Started at Sat Jun 13 01:15:39 2020
    Sat Jun 13 01:15:39 2020 -> Received 0 file descriptor(s) from systemd.
    Sat Jun 13 01:15:39 2020 -> clamd daemon 0.102.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
    Sat Jun 13 01:15:39 2020 -> Running as user clamav (UID 113, GID 121)
    Sat Jun 13 01:15:39 2020 -> Log file size limited to 4294967295 bytes.
    Sat Jun 13 01:15:39 2020 -> Reading databases from /var/lib/clamav
    Sat Jun 13 01:15:39 2020 -> Not loading PUA signatures.
    Sat Jun 13 01:15:39 2020 -> Bytecode: Security mode set to "TrustSigned
     
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Monitor memory usage with commands top and free -h. If your host runs out of memory, there should be messages about that in /var/log/syslog.
    1G memory is not much if running mail server and scanning for spam and viruses. Increase swap to 2 or 4 GB.
     
  12. senormedia

    senormedia Member HowtoForge Supporter

    i increase the droplet and then did status then worked perfect

    after that i put systemctl status clamav-daemon.service and it start but with an error

    i deleted run/clamv before restarting but still have an error but clamv is running

    Process: 2072 ExecStartPre=/bin/mkdir /run/clamav (code=exited, status=1/FAILURE)
    Process: 2073 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)

    the clamv logs

    Sat Jun 13 10:15:16 2020 -> +++ Started at Sat Jun 13 10:15:16 2020
    Sat Jun 13 10:15:16 2020 -> Received 0 file descriptor(s) from systemd.
    Sat Jun 13 10:15:16 2020 -> clamd daemon 0.102.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
    Sat Jun 13 10:15:16 2020 -> Running as user clamav (UID 113, GID 121)
    Sat Jun 13 10:15:16 2020 -> Log file size limited to 4294967295 bytes.
    Sat Jun 13 10:15:16 2020 -> Reading databases from /var/lib/clamav
    Sat Jun 13 10:15:16 2020 -> Not loading PUA signatures.
    Sat Jun 13 10:15:16 2020 -> Bytecode: Security mode set to "TrustSigned".
    Sat Jun 13 10:15:29 2020 -> Loaded 7171399 signatures.
    Sat Jun 13 10:15:32 2020 -> LOCAL: Unix socket file /var/run/clamav/clamd.ctl
    Sat Jun 13 10:15:32 2020 -> LOCAL: Setting connection queue length to 15
    Sat Jun 13 10:15:32 2020 -> Limits: Global time limit set to 120000 milliseconds.
    Sat Jun 13 10:15:32 2020 -> Limits: Global size limit set to 104857600 bytes.
    Sat Jun 13 10:15:32 2020 -> Limits: File size limit set to 26214400 bytes.
    Sat Jun 13 10:15:32 2020 -> Limits: Recursion level limit set to 16.
    Sat Jun 13 10:15:32 2020 -> Limits: Files limit set to 10000.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxPartitions limit set to 50.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxIconsPE limit set to 100.
    Sat Jun 13 10:15:32 2020 -> Limits: MaxRecHWP3 limit set to 16.
    Sat Jun 13 10:15:32 2020 -> Limits: PCREMatchLimit limit set to 10000.
    Sat Jun 13 10:15:32 2020 -> Limits: PCRERecMatchLimit limit set to 5000.
    Sat Jun 13 10:15:32 2020 -> Limits: PCREMaxFileSize limit set to 26214400.
    Sat Jun 13 10:15:32 2020 -> Archive support enabled.
    Sat Jun 13 10:15:32 2020 -> AlertExceedsMax heuristic detection disabled.
    Sat Jun 13 10:15:32 2020 -> Heuristic alerts enabled.
    Sat Jun 13 10:15:32 2020 -> Portable Executable support enabled.
    Sat Jun 13 10:15:32 2020 -> ELF support enabled.
    Sat Jun 13 10:15:32 2020 -> Mail files support enabled.
    Sat Jun 13 10:15:32 2020 -> OLE2 support enabled.
    Sat Jun 13 10:15:32 2020 -> PDF support enabled.
    Sat Jun 13 10:15:32 2020 -> SWF support enabled.
    Sat Jun 13 10:15:32 2020 -> HTML support enabled.
    Sat Jun 13 10:15:32 2020 -> XMLDOCS support enabled.
    Sat Jun 13 10:15:32 2020 -> HWP3 support enabled.
    Sat Jun 13 10:15:32 2020 -> Self checking every 3600 seconds.
     

Share This Page