Apache restart failed

Discussion in 'Installation/Configuration' started by ccerrillo, Jul 29, 2021.

  1. ccerrillo

    ccerrillo New Member

    Hi,
    I have installed a new server with Debian 11 bullseye with apache 2.4.48 and ISPConfig 3.2.5, following/adapting steps from Debian 10 Perfect server.
    But the problem is that if I restart apache (manually or when ISPConfig restarts after changes in configuration) i get this:
    Code:
    #systemctl restart apache2.service
    Job for apache2.service failed because the control process exited with error code.
    See "systemctl status apache2.service" and "journalctl -xe" for details.
    
    Code:
    #systemctl status apache2.service
    Failed to dump process list for 'apache2.service', ignoring: Input/output error
    ● apache2.service - The Apache HTTP Server
         Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
        Drop-In: /run/systemd/system/service.d
                 └─zzz-lxc-service.conf
         Active: failed (Result: exit-code) since Thu 2021-07-29 08:54:40 UTC; 1s ago
           Docs: https://httpd.apache.org/docs/2.4/
        Process: 14992 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
            CPU: 25ms
         CGroup: /system.slice/apache2.service
    
    jul 29 08:54:40 server apachectl[14995]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0>
    jul 29 08:54:40 server apachectl[14995]: no listening sockets available, shutting down
    jul 29 08:54:40 server apachectl[14995]: AH00015: Unable to open logs
    jul 29 08:54:40 server apachectl[14992]: Action 'start' failed.
    jul 29 08:54:40 server apachectl[14992]: The Apache error log may have more information.
    jul 29 08:54:40 server systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    jul 29 08:54:40 server systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error
    jul 29 08:54:40 server systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error
    jul 29 08:54:40 server systemd[1]: apache2.service: Failed with result 'exit-code'.
    jul 29 08:54:40 server systemd[1]: Failed to start The Apache HTTP Server.
    
    Code:
    #journalctl -xe
    jul 29 08:57:13 server systemd[1]: Stopping The Apache HTTP Server...
    ░░ Subject: A stop job for unit apache2.service has begun execution
    ░░ Defined-By: systemd
    ░░ Support: https://www.debian.org/support
    ░░ 
    ░░ A stop job for unit apache2.service has begun execution.
    ░░ 
    ░░ The job identifier is 3020.
    jul 29 08:57:13 server apachectl[15285]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites>
    jul 29 08:57:13 server systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output err>
    jul 29 08:57:13 server systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output err>
    jul 29 08:57:13 server systemd[1]: apache2.service: Succeeded.
    ░░ Subject: Unit succeeded
    ░░ Defined-By: systemd
    ░░ Support: https://www.debian.org/support
    ░░ 
    ░░ The unit apache2.service has successfully entered the 'dead' state.
    jul 29 08:57:13 server systemd[1]: Stopped The Apache HTTP Server.
    ░░ Subject: A stop job for unit apache2.service has finished
    ░░ Defined-By: systemd
    ░░ Support: https://www.debian.org/support
    ░░ 
    ░░ A stop job for unit apache2.service has finished.
    ░░ 
    ░░ The job identifier is 3020 and the job result is done.
    jul 29 08:57:13 server systemd[1]: Starting The Apache HTTP Server...
    ░░ Subject: A start job for unit apache2.service has begun execution
    ░░ Defined-By: systemd
    ░░ Support: https://www.debian.org/support
    ░░ 
    ░░ A start job for unit apache2.service has begun execution.
    ░░ 
    ░░ The job identifier is 3020.
    jul 29 08:57:13 server apachectl[15289]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites>
    jul 29 08:57:13 server apachectl[15289]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
    jul 29 08:57:13 server apachectl[15289]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
    jul 29 08:57:13 server apachectl[15289]: no listening sockets available, shutting down
    jul 29 08:57:13 server apachectl[15289]: AH00015: Unable to open logs
    jul 29 08:57:13 server apachectl[15286]: Action 'start' failed.
    jul 29 08:57:13 server apachectl[15286]: The Apache error log may have more information.
    jul 29 08:57:13 server systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    ░░ Subject: Unit process exited
    ░░ Defined-By: systemd
    ░░ Support: https://www.debian.org/support
    ░░ 
    ░░ An ExecStart= process belonging to unit apache2.service has exited.
    ░░ 
    ░░ The process' exit code is 'exited' and its exit status is 1.
    jul 29 08:57:13 server systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output err>
    jul 29 08:57:13 server systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output err>
    jul 29 08:57:13 server systemd[1]: apache2.service: Failed with result 'exit-code'.
    ░░ Subject: Unit failed
    ░░ Defined-By: systemd
    ░░ Support: https://www.debian.org/support
    ░░ 
    ░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
    jul 29 08:57:13 server systemd[1]: Failed to start The Apache HTTP Server.
    ░░ Subject: A start job for unit apache2.service has failed
    ░░ Defined-By: systemd
    ░░ Support: https://www.debian.org/support
    ░░ 
    ░░ A start job for unit apache2.service has finished with a failure.
    ░░ 
    ░░ The job identifier is 3020 and the job result is failed.
    
    But if I restart again it works, so on first restart fail and then the second goes well.
    I have isolated the problem, if i disable mod_fcgid this does not happen.
    The only workaround i have found is to edit /lib/systemd/system/apache2.service and add a sleep for 2 seconds before the start:
    Code:
    ExecStartPre=/bin/sleep 2
    
    Another workaround is to replace the graceful-stop to stop in ExecStop instead adding a sleep
    Code:
    ...replace....
    ExecStop=/usr/sbin/apachectl graceful-stop
    ...with...
    ExecStop=/usr/sbin/apachectl stop
    
    Can anyone throw some light about this?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ISPConfig 3.2 does not support Debian 11, so some breakage is expected. If you must run on Debian 11 you have to deal with the breakage.
    And Debian GNU/Linux 11 Bullseye is not realeased yet.
     
  3. ccerrillo

    ccerrillo New Member

    I know that ISPConfig 3.2 still does not support Debian 11, I like the risk :D, but since the Debian 11 release date is in 2 weeks, maybe someone from the team has encountered this already.
    At the moment with my workaround all works as expected and I haven't found any other breakage
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    FWIW, I have installed a test debian 11 system via the autoinstaller, as well as updated a couple live debian 10 systems to debian 11 and have not noticed or been able to recreate this problem.
     
    ccerrillo likes this.
  5. ccerrillo

    ccerrillo New Member

    mmmm, my debian is a clean install from the official iso before the bullseye released as stable, maybe the install has something corrupted, the problem is that tries to start before the graceful stop ends, can you post your /lib/systemd/system/apache2.service file?
     
  6. ccerrillo

    ccerrillo New Member

    it's related with wsgi module, if i'ts disabled this is not happen
     
  7. ccerrillo

    ccerrillo New Member

    Sorry, it's not wsgi modle, its fcgi module
     
  8. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    not sure about this problem, but you're installing ispconfig 3.2.5, which does not support debian 11.
    i'm not sure even the official 3.2.6 version does. what i have seen posted on here, is that the 3.2.6 nightly build does.
    maybe it's worth updating your 3.2.5 install to that and seeing if that resolves your issues.
     
    ahrasis likes this.
  9. ccerrillo

    ccerrillo New Member

    Yes, as soon as they published version 3.2.6 I updated, but still the same problem, I'm starting to think that during the installation of Debian, something happened, so I'm going to make a new installation and use the ISPConfig Autoinstaller to see if it is solved, say also that it's a proxmox container
     
    ahrasis likes this.
  10. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    If your container is running in unprivileged mode you'll have problems, I think you have to add config for every website jail (it becomes a nuisance - just switch to a vm and you gain live migrations as a bonus :).
     
    ccerrillo and ahrasis like this.
  11. ccerrillo

    ccerrillo New Member

    Yes, unprivileged mode is a real pain in the ass....
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess your error is more related to the VM than to ISPConfig. Especially as ISPConfig uses the normal system commands to restart and reload apache, if they fail, then something must be fundamentally wrong on that system, probably something (CPU or HD) is so slow that apache needs that sleep command. I had that years ago on a virtual system that did not have enough resources.
     
    ccerrillo likes this.
  13. ccerrillo

    ccerrillo New Member

    Yes i'm doing some tests and the problem is related to the proxmox server, i started the machine in another proxmox server with the next proxmox versión and the problem disappear.
    But i think is more related for to the proxmox versión than the resources, because both servers have similar CPU, HD, load and RAM
    What baffles me is that on the same server that gives me problems I have other ispconfig installs running without problems, but it's true that this is the first with Debian 11
    Thanks for your advice!
     
  14. ccerrillo

    ccerrillo New Member

    A simple reboot of the proxmox server solves the problemo_O
    Thanks to all
     
    till and ahrasis like this.

Share This Page