Error: WEB_SYSTEM is not enabled and Apache/Apache2 Service is Missing

Hello there, i had a problem to my HestiaCP Panel, before…everything was running smoothly, sometimes i also running the sudo apt dist-upgrade command to make the server updated, so far i’m already this server around 5 months, until one day one of the website SSL Certificate is expired, so i try to renew the let’s encrypt ssl, but seems it not succeed, it had error that said Error: WEB_SYSTEM is not enabled, also i realize and i check that my service for apache/apache2 service is missing, before everything was there. but the website still accessible until now, any help guys?

Here is the image

Any references or solution due to the error will very appreciate. Thanks

Hi @BobTheBuilder,

That’s pretty weird.

Show the output of these commands.

v-list-sys-config json | tr -d '"' | sed 's/^\s*//' | grep -E '^WEB_|^PROXY_'
systemctl status apache2 --no-pager -l
root@vps:~# v-list-sys-config json | tr -d '"' | sed 's/^\s*//' | grep -E '^WEB_|^PROXY_'
systemctl status apache2 --no-pager -l
WEB_SYSTEM: apache2,
WEB_RGROUPS: www-data,
WEB_PORT: 8080,
WEB_SSL: mod_ssl,
WEB_SSL_PORT: 8443,
WEB_BACKEND: php-fpm,
PROXY_SYSTEM: nginx,
PROXY_PORT: 80,
PROXY_SSL_PORT: 443,
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-05-31 23:25:01 WIB; 2h 42min ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 784 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 836 (apache2)
      Tasks: 56 (limit: 1012)
     Memory: 16.6M
        CPU: 1.503s
     CGroup: /system.slice/apache2.service
             ├─836 /usr/sbin/apache2 -k start
             ├─838 /usr/sbin/apache2 -k start
             ├─872 /usr/sbin/apache2 -k start
             └─873 /usr/sbin/apache2 -k start

May 31 23:24:59 vps.mydomain.com systemd[1]: Starting The Apache HTTP Server...
May 31 23:25:00 vps.mydomain.com apachectl[803]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using vps.mydomain.com. Set the 'ServerName' directive globally to suppress this message
May 31 23:25:01 vps.mydomain.com systemd[1]: Started The Apache HTTP Server.
root@vps:~#

Output from both commands looks good.

Show the services:

v-list-sys-services
root@vps:~# v-list-sys-services
NAME        STATE    CPU  MEM  UPTIME
----        -----    ---  ---  ------
php7.4-fpm  running  0    8    169
php8.2-fpm  running  0    9    169
php8.3-fpm  running  0    563  169
nginx       running  0    26   170
bind9       running  0    33   170
exim4       running  0    16   169
dovecot     running  0    0    169
mariadb     running  0    554  169
vsftpd      running  0    1    169
cron        running  0    0    169
ssh         running  1.2  14   169
iptables    running  0    0    0
fail2ban    running  0.2  150  170
root@vps:~#

Weird…

What’s your OS and Hestia version?

Hi @sahsanu , currently i’m running Hestia Control Panel v1.8.11, and Operating System Ubuntu Server 22.04 LTS (x64), with the specifications are 1 VCPU, 1 GB RAM, and 25 GB Disk Hosted on DigitalOcean.

Ok, I need to debug it.

Show me the output of these commands:

v-list-sys-service json | cat -A

And this one will produce a large output so I’ve redirected the output to file /tmp/v-list-sys-services.debug and you should upload it to some site and provide a link or use something like pastebin, gist from Github, etc.

bash -x /usr/local/hestia/bin/v-list-sys-services &>/tmp/v-list-sys-services.debug

root@vps:~# v-list-sys-service json | cat -A
v-list-sys-service: command not found

root@vps:~# bash -x /usr/local/hestia/bin/v-list-sys-services &>/tmp/v-list-sys-services.debug

here is the output :

I mistyped it, the right command is:

v-list-sys-services json | cat -A

I’ll take a look to the output.

Ok, show the output of these three commands:

type v-list-sys-services
grep WEB_SYSTEM /usr/local/hestia/bin/v-list-sys-services
md5sum /usr/local/hestia/bin/v-list-sys-services
1 Like

root@vps:~# v-list-sys-services json | cat -A
{$
“php7.4-fpm”: {$
“SYSTEM”: “backend server”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “8”,$
“RTIME”: “958”$
},$
“php8.2-fpm”: {$
“SYSTEM”: “backend server”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “9”,$
“RTIME”: “958”$
},$
“php8.3-fpm”: {$
“SYSTEM”: “backend server”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “9”,$
“RTIME”: “958”$
},$
“nginx”: {$
“SYSTEM”: “reverse proxy”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “26”,$
“RTIME”: “958”$
},$
“bind9”: {$
“SYSTEM”: “dns server”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “33”,$
“RTIME”: “958”$
},$
“exim4”: {$
“SYSTEM”: “mail server”,$
“STATE”: “running”,$
“CPU”: “0.9”,$
“MEM”: “50”,$
“RTIME”: “958”$
},$
“dovecot”: {$
“SYSTEM”: “imap/pop3 server”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “0”,$
“RTIME”: “958”$
},$
“mariadb”: {$
“SYSTEM”: “database server”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “565”,$
“RTIME”: “958”$
},$
“vsftpd”: {$
“SYSTEM”: “ftp server”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “1”,$
“RTIME”: “958”$
},$
“cron”: {$
“SYSTEM”: “job scheduler”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “0”,$
“RTIME”: “958”$
},$
“ssh”: {$
“SYSTEM”: “ssh server”,$
“STATE”: “running”,$
“CPU”: “0.1”,$
“MEM”: “7”,$
“RTIME”: “957”$
},$
“iptables”: {$
“SYSTEM”: “firewall”,$
“STATE”: “running”,$
“CPU”: “0”,$
“MEM”: “0”,$
“RTIME”: “0”$
},$
“fail2ban”: {$
“SYSTEM”: “brute-force protection”,$
“STATE”: “running”,$
“CPU”: “0.2”,$
“MEM”: “150”,$
“RTIME”: “958”$
}$
}$
root@vps:~#

root@vps:~# type v-list-sys-services
v-list-sys-services is /usr/local/hestia/bin/v-list-sys-services

root@vps:~# grep WEB_SYSTEM /usr/local/hestia/bin/v-list-sys-services
if [ -n “$WEB_SYSTEM” ] && [ “$WEB_SYSTEM” != ‘remote’ ]; then
get_srv_state $WEB_SYSTEM
data=“NAME=‘$WEB_SYSTEM’ SYSTEM=‘web server’ STATE=‘$state’ CPU=‘$cpu’”

root@vps:~# md5sum /usr/local/hestia/bin/v-list-sys-services
fb8dc37932fce3eab10c75585881cbec /usr/local/hestia/bin/v-list-sys-services

The problem seems it is caused by this function source_conf "$HESTIA/conf/hestia.conf" because it is not loading variable WEB_SYSTEM and I would like to know the reason.

Show the output of this command:

cat -A /usr/local/hestia/conf/hestia.conf
root@vps:~# cat -A /usr/local/hestia/conf/hestia.conf
API_ALLOWED_IP=''$
API_SYSTEM='1'$
API='yes'$
APP_NAME='VPS Control Panel'$
BACKEND_PORT='8083'$
BACKUP_GZIP='4'$
BACKUP_MODE='zstd'$
BACKUP_SYSTEM='local'$
CRON_SYSTEM='cron'$
DB_PMA_ALIAS='phpmyadmin'$
DB_SYSTEM='mysql'$
DEBUG_MODE='false'$
DISABLE_IP_CHECK='no'$
DISK_QUOTA='yes'$
DNS_CLUSTER_SYSTEM='hestia'$
DNS_SYSTEM='bind9'$
DOMAINDIR_WRITABLE='no'$
ENFORCE_SUBDOMAIN_OWNERSHIP='yes'$
FILE_MANAGER='true'$
FIREWALL_EXTENSION='fail2ban'$
FIREWALL_SYSTEM='iptables'$
FROM_EMAIL=''$
FROM_NAME=''$
FTP_SYSTEM='vsftpd'$
HIDE_DOCS='yes'$
IMAP_SYSTEM='dovecot'$
INACTIVE_SESSION_TIMEOUT='60'$
LANGUAGE='en'$
LOGIN_STYLE='old'$
MAIL_SYSTEM='exim4'$
PHPMYADMIN_KEY=''$
PLUGIN_APP_INSTALLER='true'$
POLICY_BACKUP_SUSPENDED_USERS='no'$
POLICY_CSRF_STRICTNESS='1'$
POLICY_SYNC_ERROR_DOCUMENTS='yes'$
POLICY_SYNC_SKELETON='yes'$
POLICY_SYSTEM_ENABLE_BACON='false'$
POLICY_SYSTEM_HIDE_ADMIN='no'$
POLICY_SYSTEM_HIDE_SERVICES='no'$
POLICY_SYSTEM_PASSWORD_RESET='no'$
POLICY_SYSTEM_PROTECTED_ADMIN='yes'$
POLICY_USER_CHANGE_THEME='no'$
POLICY_USER_DELETE_LOGS='yes'$
POLICY_USER_EDIT_DETAILS='yes'$
POLICY_USER_EDIT_DNS_TEMPLATES='yes'$
POLICY_USER_EDIT_WEB_TEMPLATES='yes'$
POLICY_USER_VIEW_LOGS='yes'$
POLICY_USER_VIEW_SUSPENDED='false'$
PROXY_PORT='80'$
PROXY_SSL_PORT='443'$
PROXY_SYSTEM='nginx'$
RELEASE_BRANCH='release'$
SERVER_SMTP_ADDR=''$
SERVER_SMTP_HOST=''$
SERVER_SMTP_PASSWD=''$
SERVER_SMTP_SECURITY=''$
SERVER_SMTP_USER=''$
STATS_SYSTEM='awstats'$
SUBJECT_EMAIL='{{subject}}'$
THEME='dark'$
TITLE='{{page}} - {{hostname}} - {{appname}}'$
UPDATE_HOSTNAME_SSL='yes'$
UPGRADE_SEND_EMAIL_LOG='false'$
UPGRADE_SEND_EMAIL='true'$
USE_SERVER_SMTP='false'$
VERSION='1.8.11'$
WEB_BACKEND='php-fpm'$
WEBMAIL_ALIAS='webmail'$
WEBMAIL_SYSTEM='roundcube'$
WEB_PORT='8080'$
WEB_RGROUPS='www-data'$
WEB_SSL='mod_ssl'$
WEB_SSL_PORT='8443'$
WEB_SYSTEM='apache2'
root@vps:~#

WEB_SYSTEM doesn’t have a line feed.

Execute this command:

v-change-sys-config-value WEB_SYSTEM apache2

And after that:

cat -A /usr/local/hestia/conf/hestia.conf | tail -n1

If you see the last dollar WEB_SYSTEM='apache2'$ then try to list the services again.

v-list-sys-services
1 Like
root@vps:~# v-change-sys-config-value WEB_SYSTEM apache2
root@vps:~# cat -A /usr/local/hestia/conf/hestia.conf | tail -n1
WEB_SYSTEM='apache2'$
root@vps:~# v-list-sys-services
NAME        STATE    CPU  MEM  UPTIME
----        -----    ---  ---  ------
apache2     running  0    456  4
php7.4-fpm  running  0    232  1479
php8.2-fpm  running  0    9    1479
php8.3-fpm  running  0    9    1479
nginx       running  0    26   1479
bind9       running  0    33   1479
exim4       running  0    50   1479
dovecot     running  0    0    1479
mariadb     running  0    586  1479
vsftpd      running  0    1    1479
cron        running  0    0    1479
ssh         running  0    5    1478
iptables    running  0    0    0
fail2ban    running  0.2  150  1479

Great, now it should be fixed.

1 Like

many thanks @sahsanu , seems all is back to normal again.
really appreciate for the efforts of troubleshooting and solution.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.