After restart apache2 and clamav-daemon not start automatic

hello

i have installed fresh hestiacp panel on contabo hosting, im facing some issue everytime im restart the server, when it comeback online apache2 and clamav-daemon not start automatically, but if i start it then it start,

Second if im login as SSH root its worked fine, but when im try to login root user via filezilla its not working,

error : Status:	Using username "root". 
Status:	Connected to *****
Error:	Could not connect to server
Status:	Waiting to retry...
Status:	Connecting to *****...
Response:	fzSftp started, protocol_version=11
Command:	open "root@*****" 22
Status:	Using username "root". 
Command:	Pass: **************
Status:	Connected to ****.27
Error:	Could not connect to server

whats wrong ? on fresh install have many bugs ?

im using custom config for new installation, here is screen shorts, please help me


Hi,

Check the messages on boot for both services:

journalctl -b -u apache2
journalctl -b -u clamav-daemon

Usually Contabo is the problem :stuck_out_tongue:

Show the output of this command:

grep -Ev '^$|^#|^\s$' /etc/ssh/sshd_config
journalctl -b -u apache2
Aug 14 23:34:06 .com systemd[1]: Starting The Apache HTTP Server...
Aug 14 23:34:07 .com apachectl[712]: [Thu Aug 14 23:34:07.028855 2025] [ssl:warn] [pid 712:tid 712] AH02532: SSLProtocol: Protocol 'all' overrides already set parameter(s)>
Aug 14 23:34:07 s.com apachectl[712]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using com. Set the 'Ser>
Aug 14 23:34:07 .com systemd[1]: Started The Apache HTTP Server.
journalctl -b -u clamav-daemon

have 32GB ram


Aug 14 23:34:44 .com systemd[1]: Starting Clam AntiVirus userspace daemon...
Aug 14 23:34:44 .com systemd[1]: Started Clam AntiVirus userspace daemon.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: Global time limit set to 120000 milliseconds.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: Global size limit set to 104857600 bytes.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: File size limit set to 26214400 bytes.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: Recursion level limit set to 16.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: Files limit set to 10000.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: Core-dump limit is 0.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxPartitions limit set to 50.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxIconsPE limit set to 100.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: MaxRecHWP3 limit set to 16.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: PCREMatchLimit limit set to 10000.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: PCRERecMatchLimit limit set to 5000.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Limits: PCREMaxFileSize limit set to 26214400.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Archive support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Image (graphics) scanning support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Detection using image fuzzy hash enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> AlertExceedsMax heuristic detection disabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Heuristic alerts enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Portable Executable support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> ELF support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Mail files support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> OLE2 support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> PDF support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> SWF support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> HTML support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> XMLDOCS support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> HWP3 support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> OneNote support enabled.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Self checking every 3600 seconds.
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> Listening daemon: PID: 3028
Aug 14 23:34:58 .com clamd[3028]: Thu Aug 14 23:34:58 2025 -> MaxQueue set to: 100
:~# grep -Ev '^$|^#|^\s$' /etc/ssh/sshd_config
Include /etc/ssh/sshd_config.d/*.conf
LoginGraceTime 1m
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
DebianBanner no
AcceptEnv LANG LC_*
Subsystem sftp internal-sftp-server
PermitRootLogin yes
HostKeyAlgorithms +ssh-rsa
Match User sftp_dummy99,admin...,admin...
    ChrootDirectory /srv/jail/%u
    X11Forwarding no
    AllowTCPForwarding no
    ForceCommand internal-sftp -d /home/%u
:~#

The logs show that both services (apache2 and clamav-daemon) started on boot.

Regarding root and sftp, execute these commands and try again:

sed -i -E 's/internal-sftp.*/internal-sftp/' /etc/ssh/sshd_config
systemctl restart ssh

thanks root can login now via filezilla

other issue check screen short i have restart the server and after come back now apache2 worked but [ clamav-daemon ] not start,

root@:~# journalctl -b -u clamav-daemon
-- No entries --
root@:~#

Once you reboot your server, execute these commands and show the output:

systemctl status apache2 --no-pager -l
systemctl status clamav-daemon --no-pager -l
pidof apache2
pidof clamd
v-list-sys-services
free -h
systemctl status apache2 --no-pager -l
:~# systemctl status apache2 --no-pager -l
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2025-08-15 00:09:11 CEST; 57s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 754 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 848 (apache2)
      Tasks: 56 (limit: 28741)
     Memory: 14.9M
        CPU: 79ms
     CGroup: /system.slice/apache2.service
             β”œβ”€848 /usr/sbin/apache2 -k start
             β”œβ”€850 /usr/sbin/apache2 -k start
             β”œβ”€854 /usr/sbin/apache2 -k start
             └─855 /usr/sbin/apache2 -k start

Aug 15 00:09:11 domain.com systemd[1]: Starting The Apache HTTP Server...
Aug 15 00:09:11 domain.com apachectl[800]: [Fri Aug 15 00:09:11.954836 2025] [ssl:warn] [pid 800:tid 800] AH02532: SSLProtocol: Protocol 'all' overrides already set parameter(s). Check if a +/- prefix is missing.
Aug 15 00:09:11 domain.com apachectl[800]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using domain.com. Set the 'ServerName' directive globally to suppress this message
Aug 15 00:09:11 domain.com systemd[1]: Started The Apache HTTP Server.

systemctl status clamav-daemon --no-pager -l

root@:~# systemctl status clamav-daemon --no-pager -l
β—‹ clamav-daemon.service - Clam AntiVirus userspace daemon
     Loaded: loaded (/lib/systemd/system/clamav-daemon.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/clamav-daemon.service.d
             └─extend.conf
     Active: inactive (dead)
TriggeredBy: β—‹ clamav-daemon.socket
       Docs: man:clamd(8)
             man:clamd.conf(5)
             https://docs.clamav.net/
root@:~#
root@:~# pidof apache2
855 854 850 848
root@:~#

show nothing

root@:~# pidof clamd
root@~#
:~# v-list-sys-services
NAME           STATE    CPU  MEM  UPTIME
----           -----    ---  ---  ------
apache2        running  0.5  656  6
php5.6-fpm     running  0    10   6
php7.0-fpm     running  0    8    6
php7.1-fpm     running  0    13   6
php7.2-fpm     running  0    8    6
php7.3-fpm     running  0    28   6
php8.0-fpm     running  0    9    6
php8.1-fpm     running  0    9    6
php8.2-fpm     running  0    11   6
php8.3-fpm     running  0    11   6
php8.4-fpm     running  0    11   6
nginx          running  0.5  31   6
bind9          running  0    181  6
exim4          running  0    19   6
dovecot        running  0    0    6
clamav-daemon  stopped  0    0    0
spamassassin   running  0.2  280  6
mariadb        running  0.3  670  6
proftpd        running  0    1    6
cron           running  0    0    6
ssh            running  0    7    6
iptables       running  0    0    0
fail2ban       running  0.3  134  6
free -h
               total        used        free      shared  buff/cache   available
Mem:            23Gi       553Mi        22Gi        73Mi       587Mi        22Gi
Swap:             0B          0B          0B
systemctl enable clamav-daemon
freshclam

And reboot again

now come online after restart but apache2 stop im try 3 time to restart server , same result, apache not start automatically . need start manually

clamav-daemon

do i re.installed panal ?

No.

What do the logs say when apache doesn’t start?

im try restart from contabo panel when it come back same apache not start, where do i check logs, ?

journalctl -b -u apache2 --no-pager -l
systemctl status apache2 --no-pager -l
journalctl -b -u apache2 --no-pager -l
root@:~# journalctl -b -u apache2 --no-pager -l
Aug 15 00:36:11 domain.com systemd[1]: Starting The Apache HTTP S                                                                                                                                         erver...
Aug 15 00:36:11 domain.com apachectl[707]: [Fri Aug 15 00:36:11.7                                                                                                                                         16114 2025] [ssl:warn] [pid 707:tid 707] AH02532: SSLProtocol: Protocol 'all' ov                                                                                                                                         errides already set parameter(s). Check if a +/- prefix is missing.
Aug 15 00:36:11 domain.com apachectl[707]: AH00558: apache2: Coul                                                                                                                                         d not reliably determine the server's fully qualified domain name, using domain. Set the 'ServerName' directive globally to suppress this mes                                                                                                                                         sage
Aug 15 00:36:11 domain.com apachectl[707]: (99)Cannot assign requ                                                                                                                                         ested address: AH00072: make_sock: could not bind to address ...7:8443
Aug 15 00:36:11 domain.com apachectl[707]: no listening sockets a                                                                                                                                         vailable, shutting down
Aug 15 00:36:11 domain.com apachectl[707]: AH00015: Unable to ope                                                                                                                                         n logs
Aug 15 00:36:11 domain.com systemd[1]: apache2.service: Control p                                                                                                                                         rocess exited, code=exited, status=1/FAILURE
Aug 15 00:36:11 domain.com systemd[1]: apache2.service: Failed wi                                                                                                                                         th result 'exit-code'.
Aug 15 00:36:11 domain.com systemd[1]: Failed to start The Apache                                                                                                                                          HTTP Server.
root@:~#
systemctl status apache2 --no-pager -l
Starting The Apache HTTP Server...
Aug 15 00:36:11 .com apachectl[707]: [Fri Aug 15 00:36:11.716114 2025] [ssl:warn] [pid 707:tid 707] AH02532: SSLProtocol: Protocol 'all' overrides already set parameter(s). Check if a +/- prefix is missing.
Aug 15 00:36:11 .com apachectl[707]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using .....com. Set the 'ServerName' directive globally to suppress this message
Aug 15 00:36:11 .com apachectl[707]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address 95.....:8443
Aug 15 00:36:11 .com apachectl[707]: no listening sockets available, shutting down
Aug 15 00:36:11 .com apachectl[707]: AH00015: Unable to open logs
Aug 15 00:36:11 .com systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Aug 15 00:36:11 .com systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 15 00:36:11 .com systemd[1]: Failed to start The Apache HTTP Server.

Is there any other service listening on port 8443?

lsof -Pn +c0 -i:8080,8443 -sTCP:LISTEN

no its fresh installed not add anything yet.

lsof -Pn +c0 -i:8080,8443 -sTCP:LISTEN

nothing show. after restart same, apache not start.

Then that means apache is trying to start when the ip has not been assigned yet so it fails.

Edit the apache2 service:

systemctl edit apache2.service

and add this:

[Unit]
After=network-online.target
Wants=network-online.target

It will look like this:

### Editing /etc/systemd/system/apache2.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Unit]
After=network-online.target
Wants=network-online.target

### Lines below this comment will be discarded
[...]

Save the file.

Now check whether one of these services is available and enable the service only if it’s available:

systemctl status systemd-networkd-wait-online.service
systemctl enable systemd-networkd-wait-online.service

or

systemctl status NetworkManager-wait-online.service
systemctl enable NetworkManager-wait-online.service

Now reboot again.

1 Like

finally its worked now, thank you so much for help.

1 Like

i need some more help about restore my backup,

i was take out all backup from /backup

files look like, example:
1: admin123.2025-08-13_05-22-52.tar
2: admin123.log

i have upload backup file to /backup

now i have create username: admin123

after login user panel, cant see these files in backup option to restore all data,

how to do that ? how to restore it please help

You must restore the backup from command line.

v-restore-user admin123 admin123.2025-08-13_05-22-52.tar

mean after upload file files in /backup then run this command SSH root ?
each user do same way ? right just need to create same username as the backup have ?