[SOLVED] Apache service failing to start

Discussion in 'Server Operation' started by anark10n, Feb 13, 2023.

Tags:
  1. anark10n

    anark10n Member

    Hey there. As the title says. I'm not able to start apache2 service.
    systemctl status apache2.service shows:
    Code:
    ● apache2.service - The Apache HTTP Server
         Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Mon 2023-02-13 11:25:01 UTC; 22s ago
           Docs: https://httpd.apache.org/docs/2.4/
        Process: 4676 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
            CPU: 225ms
    
    Feb 13 11:25:01 [hostname] apachectl[4676]: The Apache error log may have more information.
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Killing process 4694 (PassengerAgent) with signal SIGKILL.
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Killing process 4727 (PassengerAgent) with signal SIGKILL.
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Killing process 4694 (PassengerAgent) with signal SIGKILL.
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Killing process 4727 (PassengerAgent) with signal SIGKILL.
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Failed with result 'exit-code'.
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Unit process 4694 (PassengerAgent) remains running after unit stopped.
    Feb 13 11:25:01 [hostname] systemd[1]: apache2.service: Unit process 4727 (PassengerAgent) remains running after unit stopped.
    Feb 13 11:25:01 [hostname] systemd[1]: Failed to start The Apache HTTP Server.
    
    /var/log/apache2/error.log reports:
    Code:
    [ 2023-02-14 04:32:47.6529 353516/7f992aa77980 age/Wat/WatchdogMain.cpp:1291 ]: Starting Passenger watchdog...
    [ 2023-02-14 04:32:47.6911 353519/7fa5a50be980 age/Cor/CoreMain.cpp:982 ]: Starting Passenger core...
    [ 2023-02-14 04:32:47.6913 353519/7fa5a50be980 age/Cor/CoreMain.cpp:235 ]: Passenger core running in multi-application mode.
    [ 2023-02-14 04:32:47.6940 353519/7fa5a50be980 age/Cor/CoreMain.cpp:732 ]: Passenger core online, PID 353519
    [ 2023-02-14 04:32:47.7323 353524/7f4e122d5980 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
    [ 2023-02-14 04:32:47.7440 353524/7f4e122d5980 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 353524
    AH00016: Configuration Failed
    
    [ 2023-02-14 04:32:47.7792 353519/7fa59ffff700 age/Cor/CoreMain.cpp:531 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
    [ 2023-02-14 04:32:47.7794 353519/7fa5a50be980 age/Cor/CoreMain.cpp:900 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
    
    [ 2023-02-14 04:32:47.7795 353524/7f4e121e3700 age/Ust/UstRouterMain.cpp:421 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
    [ 2023-02-14 04:32:47.7797 353519/7fa59f7fe700 Ser/Server.h:816 ]: [ServerThr.2] Freed 128 spare client objects
    [ 2023-02-14 04:32:47.7798 353519/7fa59f7fe700 Ser/Server.h:464 ]: [ServerThr.2] Shutdown finished
    [ 2023-02-14 04:32:47.7813 353519/7fa59effd700 Ser/Server.h:816 ]: [ApiServer] Freed 0 spare client objects
    [ 2023-02-14 04:32:47.7813 353519/7fa59effd700 Ser/Server.h:464 ]: [ApiServer] Shutdown finished
    [ 2023-02-14 04:32:47.7814 353519/7fa59ffff700 Ser/Server.h:816 ]: [ServerThr.1] Freed 128 spare client objects
    [ 2023-02-14 04:32:47.7814 353519/7fa59ffff700 Ser/Server.h:464 ]: [ServerThr.1] Shutdown finished
    
    Both apache2ctl configtest and apachectl -t reports
    Code:
    Syntax OK
    
    What else can I check that could be causing this issue?
    Edit: I had posted the incomplete apache2 error logs. Fixed.
     
    Last edited: Feb 14, 2023
  2. anark10n

    anark10n Member

    I thought it might be the PassengerAgent, but when i disable that particular module (or reinstall it), it just throws the same error message for but for vlogger:
    Code:
    Feb 13 20:24:20 hostname systemd[1]: apache2.service: Killing process 106112 (vlogger) with signal SIGKILL.
    
    How would i disable vlogger since it doesn't seem to be an apache module like PassengerAgent in order to try and identify the real cause of the issue?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    It is very unlikely that vlogger is the issue, vlogger is just a perl script that receives the access.log data. The line you posted just tells you that vlogger was successfully stopped by apache at the time apache was stopped. The most likely reason for your problem is a broken SSL cert as this will make apache fail without any kind of error in the logs. What did you do in the config before the issue started?
     
  4. anark10n

    anark10n Member

    Yeah, it's not vlogger. I edited my original post with full apache log of the error, it wasn't the complete one. I'll post it here:
    Code:
    [ 2023-02-14 04:32:47.6529 353516/7f992aa77980 age/Wat/WatchdogMain.cpp:1291 ]: Starting Passenger watchdog...
    [ 2023-02-14 04:32:47.6911 353519/7fa5a50be980 age/Cor/CoreMain.cpp:982 ]: Starting Passenger core...
    [ 2023-02-14 04:32:47.6913 353519/7fa5a50be980 age/Cor/CoreMain.cpp:235 ]: Passenger core running in multi-application mode.
    [ 2023-02-14 04:32:47.6940 353519/7fa5a50be980 age/Cor/CoreMain.cpp:732 ]: Passenger core online, PID 353519
    [ 2023-02-14 04:32:47.7323 353524/7f4e122d5980 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
    [ 2023-02-14 04:32:47.7440 353524/7f4e122d5980 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 353524
    AH00016: Configuration Failed
    
    [ 2023-02-14 04:32:47.7792 353519/7fa59ffff700 age/Cor/CoreMain.cpp:531 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
    [ 2023-02-14 04:32:47.7794 353519/7fa5a50be980 age/Cor/CoreMain.cpp:900 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
    
    [ 2023-02-14 04:32:47.7795 353524/7f4e121e3700 age/Ust/UstRouterMain.cpp:421 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
    [ 2023-02-14 04:32:47.7797 353519/7fa59f7fe700 Ser/Server.h:816 ]: [ServerThr.2] Freed 128 spare client objects
    [ 2023-02-14 04:32:47.7798 353519/7fa59f7fe700 Ser/Server.h:464 ]: [ServerThr.2] Shutdown finished
    [ 2023-02-14 04:32:47.7813 353519/7fa59effd700 Ser/Server.h:816 ]: [ApiServer] Freed 0 spare client objects
    [ 2023-02-14 04:32:47.7813 353519/7fa59effd700 Ser/Server.h:464 ]: [ApiServer] Shutdown finished
    [ 2023-02-14 04:32:47.7814 353519/7fa59ffff700 Ser/Server.h:816 ]: [ServerThr.1] Freed 128 spare client objects
    [ 2023-02-14 04:32:47.7814 353519/7fa59ffff700 Ser/Server.h:464 ]: [ServerThr.1] Shutdown
    
    It appears to be a problem with the Passenger configuration, but i don't know which configuration it is, and the Passenger verification tool didn't report an error. I had changed some of my sites' to auto-subdomain settings and had been waiting for the settings update to complete, but I had to force my server to reboot before it completed because it had completely frozen up (I had a terminal open and top running, and it had become unresponsive: couldn't quit, top wasn't updating). On rebooting, I was the sites were still operational for about ten minutes, but then the apache2 service just stopped, and has been in this state since.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Go to /etc/apache2/sits-enabled/, this folder contains just symlinks to the sites config files. Delete the symlinks for the sites you worked on and try to start apache again. The symlinks can be recreated later by either changing something in site settings in ISPConfig later or by using Tools > resync to run for all sites.
     
  6. anark10n

    anark10n Member

    Apache is now running but i can't get access ispconfig panel, i get the "Problem loading page error" even if i try using my server IP address.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Which errors do you get in the apache error.log when you access ISPConfig? And you did not remove the symlinks with ispconfig in name in apache sites-enabled folder?
     
  8. anark10n

    anark10n Member

    Apache error.log has now new error messages since I got it back up running. Just the same errors regarding the Passenger UstRouter as posted above. I've removed everything in the sites-enabled folder.
     
  9. anark10n

    anark10n Member

    This is only affecting https. I can get to the default apache web page using http, but as soon as I switch to https, i get the following error:
    Code:
    Secure Connection Failed
    An error occurred during a connection to openitmation.com. SSL received a record that exceeded the maximum permissible length.
    Error code: SSL_ERROR_RX_RECORD_TOO_LONG
    
    And when I try adding the port number for ispconfig control panel, i get the following:
    Code:
    Unable to connect
    An error occurred during a connection to mysite.com:8080.
    
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    This wasn't such a good decision as this must break the setup. That's why I asked you only to remove the affected sites. You must manually create the symlinks again that you removed, at least the ones for ISPConfig. These are the symlinks you must create again:

    Code:
    000-apps.vhost -> ../sites-available/apps.vhost
    000-ispconfig.conf -> /etc/apache2/sites-available/ispconfig.conf
    000-ispconfig.vhost -> /etc/apache2/sites-available/ispconfig.vhost
    999-acme.conf -> /etc/apache2/sites-available/acme.conf
     
  11. anark10n

    anark10n Member

    Ah, my mistake, I hadn't read your instructions as closely as I first thought. Everything's working again. Thank you so much for the assist.
     
    ahrasis likes this.

Share This Page