Apache 2 does not want to restart

Discussion in 'Installation/Configuration' started by Ashari Gumelar, Apr 16, 2024.

  1. Ashari Gumelar

    Ashari Gumelar New Member

    Hello,
    This morning I made a reboot of my dedicated server and when I was started apache2 its shows

    Code:
    Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
    See “systemctl status apache2.service” and “journalctl -xe” for details.
    failed!
    If I do journalctl -u apache2 I have:

    Code:
    -- Logs begin at Tue 2024-04-16 09:43:35 WIB, end at Tue 2024-04-16 10:14:01 WIB. --
    Apr 16 09:43:40 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 09:43:45 webserver1 apachectl[855]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 09:43:45 webserver1 apachectl[855]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 09:43:45 webserver1 apachectl[855]: Action 'start' failed.
    Apr 16 09:43:45 webserver1 apachectl[855]: The Apache error log may have more information.
    Apr 16 09:43:45 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 09:43:45 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 09:43:45 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 09:44:16 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 09:44:16 webserver1 apachectl[1823]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 09:44:16 webserver1 apachectl[1823]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 09:44:16 webserver1 apachectl[1823]: Action 'start' failed.
    Apr 16 09:44:16 webserver1 apachectl[1823]: The Apache error log may have more information.
    Apr 16 09:44:16 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 09:44:16 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 09:44:16 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 09:56:15 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 09:56:15 webserver1 apachectl[2266]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 09:56:15 webserver1 apachectl[2266]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 09:56:15 webserver1 apachectl[2266]: Action 'start' failed.
    Apr 16 09:56:15 webserver1 apachectl[2266]: The Apache error log may have more information.
    Apr 16 09:56:15 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    I'm beginner so if you could help me make apache redemare thank you very much
     
  2. Ashari Gumelar

    Ashari Gumelar New Member

    Sorry Here's the full Journalctl

    Code:
    -- Logs begin at Tue 2024-04-16 09:43:35 WIB, end at Tue 2024-04-16 10:32:01 WIB. --
    Apr 16 09:43:40 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 09:43:45 webserver1 apachectl[855]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 09:43:45 webserver1 apachectl[855]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 09:43:45 webserver1 apachectl[855]: Action 'start' failed.
    Apr 16 09:43:45 webserver1 apachectl[855]: The Apache error log may have more information.
    Apr 16 09:43:45 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 09:43:45 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 09:43:45 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 09:44:16 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 09:44:16 webserver1 apachectl[1823]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 09:44:16 webserver1 apachectl[1823]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 09:44:16 webserver1 apachectl[1823]: Action 'start' failed.
    Apr 16 09:44:16 webserver1 apachectl[1823]: The Apache error log may have more information.
    Apr 16 09:44:16 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 09:44:16 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 09:44:16 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 09:56:15 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 09:56:15 webserver1 apachectl[2266]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 09:56:15 webserver1 apachectl[2266]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 09:56:15 webserver1 apachectl[2266]: Action 'start' failed.
    Apr 16 09:56:15 webserver1 apachectl[2266]: The Apache error log may have more information.
    Apr 16 09:56:15 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 09:56:15 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 09:56:15 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 10:01:46 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 10:01:46 webserver1 apachectl[2439]: AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 10:01:46 webserver1 apachectl[2439]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 10:01:46 webserver1 apachectl[2439]: Action 'start' failed.
    Apr 16 10:01:46 webserver1 apachectl[2439]: The Apache error log may have more information.
    Apr 16 10:01:46 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 10:01:46 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 10:01:46 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 10:02:26 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 10:02:26 webserver1 apachectl[2465]: AH00526: Syntax error on line 23 of /etc/apache2/sites-enabled/000-apps.vhost:
    Apr 16 10:02:26 webserver1 apachectl[2465]: SSLCertificateKeyFile: file '/usr/local/ispconfig/interface/ssl/ispserver.key' does not exist or is empty
    Apr 16 10:02:26 webserver1 apachectl[2465]: SSLCertificateKeyFile: file '/usr/local/ispconfig/interface/ssl/ispserver.key' does not exist or is empty
    Apr 16 10:02:26 webserver1 apachectl[2465]: Action 'start' failed.
    Apr 16 10:02:26 webserver1 apachectl[2465]: The Apache error log may have more information.
    Apr 16 10:02:26 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 10:02:26 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 10:02:26 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 10:03:02 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 10:03:02 webserver1 apachectl[2492]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-
    Apr 16 10:03:02 webserver1 apachectl[2492]: AH00112: Warning: DocumentRoot [/var/www/ispconfig/] does not exist
    Apr 16 10:03:02 webserver1 apachectl[2492]: AH00526: Syntax error on line 65 of /etc/apache2/sites-enabled/000-ispconfig.vhost:
    Apr 16 10:03:02 webserver1 apachectl[2492]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Apr 16 10:03:02 webserver1 apachectl[2492]: Action 'start' failed.
    Apr 16 10:03:02 webserver1 apachectl[2492]: The Apache error log may have more information.
    Apr 16 10:03:02 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 10:03:02 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 10:03:02 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    Apr 16 10:03:59 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 16 10:03:59 webserver1 apachectl[2512]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-
    Apr 16 10:03:59 webserver1 apachectl[2512]: AH00112: Warning: DocumentRoot [/var/www/ispconfig/] does not exist
    Apr 16 10:04:00 webserver1 apachectl[2512]: Action 'start' failed.
    Apr 16 10:04:00 webserver1 apachectl[2512]: The Apache error log may have more information.
    Apr 16 10:04:00 webserver1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 16 10:04:00 webserver1 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 16 10:04:00 webserver1 systemd[1]: Failed to start The Apache HTTP Server.
    
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if your ISPConfig SSL certificate has been deleted. Run:

    ispconfig_update.sh --force

    and let the updater recreate the SSL certificate.
     
    Ashari Gumelar likes this.
  4. Ashari Gumelar

    Ashari Gumelar New Member

    Thanks Sir,

    I've to try this command
    Code:
    ispconfig_update.sh --force
    -bash: ispconfig_update.sh: command not found
    but command not found, plese help :(
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    It seems as if you deleted iSPConfig from your server then. or you are not logged in as root user.

    Please run the output of:

    ls -la /usr/local/ispconfig/interface/ssl/
     
    Ashari Gumelar likes this.
  6. Ashari Gumelar

    Ashari Gumelar New Member

    Here the results Sir
    Code:
    ls -la /usr/local/ispconfig/interface/ssl/
    ls: cannot access '/usr/local/ispconfig/interface/ssl/': No such file or directory
    
     
  7. Ashari Gumelar

    Ashari Gumelar New Member

    Can I restore that file?
    Code:
    ispconfig_webserver1.pangandarankab.go.id_2021-02-23_10-46
    ispconfig_webserver1.pangandarankab.go.id_2021-11-19_12-29
    ispconfig_webserver1.pangandarankab.go.id_2022-02-18_11-26
    ispconfig_webserver1.pangandarankab.go.id_2022-06-06_13-53
    ispconfig_webserver1.pangandarankab.go.id_2022-08-23_11-29
    ispconfig_webserver1.pangandarankab.go.id_2023-08-23_15-40
    ispconfig_webserver1.pangandarankab.go.id_2023-08-29_21-58
    ispconfig_webserver1.pangandarankab.go.id_2023-08-29_22-02
    ispconfig_webserver1.pangandarankab.go.id_2023-09-13_16-26
    ispconfig_webserver1.pangandarankab.go.id_2023-09-13_16-33
    ispconfig_webserver1.pangandarankab.go.id_2023-11-08_14-11
    
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, and what is the result of this:

    ls -la /usr/local/ispconfig
     
    Ashari Gumelar likes this.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    It's not just a single file that is missing. We must try to find out what else got deleted.
     
    Ashari Gumelar likes this.
  10. Ashari Gumelar

    Ashari Gumelar New Member

    like this Sir
    Code:
    ls -la /usr/local/ispconfig
    total 12
    drwxr-xr-x  3 root root 4096 Apr 16 13:45 .
    drwxr-xr-x 11 root root 4096 Apr 16 13:45 ..
    drwxr-xr-x  3 root root 4096 Apr 16 13:45 server
    
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so it seems as if the whole ISPConfig interface folder was deleted. You should find a tar.gz of the whole /usr/local/ispconfig folder as tar.gz in the backup folder ispconfig_webserver1.pangandarankab.go.id_2023-11-08_14-11 you posted above. You can use that to restore the data.
     
    Ashari Gumelar likes this.
  12. Ashari Gumelar

    Ashari Gumelar New Member

    Done Sir, ispconfig has been updated but ispconfig cannt running

    upload_2024-4-16_14-53-49.png
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try to make a ISPConfig update:

    ispconfig_update.sh --force
     
    Ashari Gumelar likes this.
  14. Ashari Gumelar

    Ashari Gumelar New Member

    Yes Sir I do, the update was succsessful but ispconfig cannt running on website

    Edit:
    Other website has running except ispconfig
     
    Last edited: Apr 16, 2024
  15. Ashari Gumelar

    Ashari Gumelar New Member

    Until now this problem didnt solved :(
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the apache error.log to see which error message you get now and also check which errors you get on the shell when you restart apache.
     
    Ashari Gumelar likes this.
  17. Ashari Gumelar

    Ashari Gumelar New Member

    Code:
    tail /var/log/apache2/error.log
    [Wed Apr 17 12:28:22.782911 2024] [mpm_prefork:notice] [pid 11451] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 Phusion_Passenger/5.0.30 OpenSSL/1.1.1n mod_python/3.3.1 Python/2.7.16 configured -- resuming normal operations
    [Wed Apr 17 12:28:22.782949 2024] [core:notice] [pid 11451] AH00094: Command line: '/usr/sbin/apache2'
    [ 2024-04-17 12:28:22.7852 11399/7f1babc08980 age/Cor/CoreMain.cpp:967 ]: Passenger core shutdown finished
    [Wed Apr 17 13:22:13.838591 2024] [fcgid:warn] [pid 28060] [client 192.168.203.1:54573] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to a member function queryOneRecord() on bool in /usr/local/ispconfig/interface/lib/app.inc.php:173
    [Wed Apr 17 13:22:13.838670 2024] [fcgid:warn] [pid 28060] [client 192.168.203.1:54573] mod_fcgid: stderr: Stack trace:
    [Wed Apr 17 13:22:13.838677 2024] [fcgid:warn] [pid 28060] [client 192.168.203.1:54573] mod_fcgid: stderr: #0 /usr/local/ispconfig/interface/lib/app.inc.php(97): app->conf('interface', 'session_timeout')
    [Wed Apr 17 13:22:13.838683 2024] [fcgid:warn] [pid 28060] [client 192.168.203.1:54573] mod_fcgid: stderr: #1 /usr/local/ispconfig/interface/lib/app.inc.php(411): app->initialize_session()
    [Wed Apr 17 13:22:13.838689 2024] [fcgid:warn] [pid 28060] [client 192.168.203.1:54573] mod_fcgid: stderr: #2 /usr/local/ispconfig/interface/web/login/index.php(430): require_once('/usr/local/ispc...')
    [Wed Apr 17 13:22:13.838694 2024] [fcgid:warn] [pid 28060] [client 192.168.203.1:54573] mod_fcgid: stderr: #3 {main}
    [Wed Apr 17 13:22:13.838721 2024] [fcgid:warn] [pid 28060] [client 192.168.203.1:54573] mod_fcgid: stderr:   thrown in /usr/local/ispconfig/interface/lib/app.inc.php on line 173
    
    like this Sir
     
  18. Ashari Gumelar

    Ashari Gumelar New Member

    Heres the full log
     

    Attached Files:

  19. Ashari Gumelar

    Ashari Gumelar New Member

    When update ispconfig I found PHP warning like this, thats the problem?

    Code:
    PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user 'ispconfig'@'localhost' (using password: YES) in /tmp/update_runner.sh.oawKTA70Zf/install/lib/mysql.lib.php on line 112
    PHP Warning:  mysqli_query() expects parameter 1 to be mysqli, bool given in /tmp/update_runner.sh.oawKTA70Zf/install/lib/mysql.lib.php on line 113
    
    but the update was successful
     
  20. pyte

    pyte Well-Known Member HowtoForge Supporter

    There are multiple issues with this system it seems. However this is an issue you either provided the wrong user or password for the database.
    You should provide the correct information wenn running "ispconfig_update.sh --force"

    The log hints that there are still issues with the certificate. You seem to use a self signed certificate:
    Code:
    [Wed Apr 17 12:28:22.762500 2024] [ssl:warn] [pid 11451] AH01906: webserver1.pangandarankab.go.id:8090:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Wed Apr 17 12:28:22.762531 2024] [ssl:warn] [pid 11451] AH01909: webserver1.pangandarankab.go.id:8090:0 server certificate does NOT include an ID which matches the server name
    [Wed Apr 17 12:28:22.762680 2024] [ssl:error] [pid 11451] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate!
     
    Ashari Gumelar likes this.

Share This Page