Apache crashed after adding new website. fails to restart

Discussion in 'ISPConfig 3 Priority Support' started by Jonathon Gilbert, Apr 20, 2022.

Tags:
  1. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    Hi guys,
    I have just tried setting up another domain and when i turned on ssl and changed php support to enable php the ISPconfig console has stopped and none of the websites will load.

    Emails are still working. just apache will not start.
    i have run
    mysql -u root -p
    SHOW DATABASES;

    and the database shows up.
    when i run the command to restart apache2 using /etc/init.d/apache2 restart
    i get the error
    Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exit ed with error code.
    See "systemctl status apache2.service" and "journalctl -xe" for details.
    failed!

    when i check - systemctl status apache2.service

    ● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Wed 2022-04-20 02:02:09 UTC; 11min ago
    Docs: https://httpd.apache.org/docs/2.4/
    Process: 4660 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

    Apr 20 02:02:09 itmail systemd[1]: Starting The Apache HTTP Server...
    Apr 20 02:02:09 itmail apachectl[4675]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.v>
    Apr 20 02:02:09 itmail apachectl[4660]: Action 'start' failed.
    Apr 20 02:02:09 itmail apachectl[4660]: The Apache error log may have more information.
    Apr 20 02:02:09 itmail systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Apr 20 02:02:09 itmail systemd[1]: apache2.service: Failed with result 'exit-code'.
    Apr 20 02:02:09 itmail systemd[1]: Failed to start The Apache HTTP Server.

    Any assistance?
    Thanks
     
  2. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    When i run
    journalctl -xe

    -- An ExecStart= process belonging to unit apache2.service has exited.
    --
    -- The process' exit code is 'exited' and its exit status is 1.
    Apr 20 02:18:30 itmail systemd[1]: apache2.service: Failed with result 'exit-code'.
    -- Subject: Unit failed
    -- Defined-By: systemd
    -- Support: http://www.ubuntu.com/support
    --
    -- The unit apache2.service has entered the 'failed' state with result 'exit-code'.
    Apr 20 02:18:30 itmail systemd[1]: Failed to start The Apache HTTP Server.
    -- Subject: A start job for unit apache2.service has failed
    -- Defined-By: systemd
    -- Support: http://www.ubuntu.com/support
    --
    -- A start job for unit apache2.service has finished with a failure.
    --
    -- The job identifier is 1114 and the job result is failed.
    Apr 20 02:18:31 itmail postfix/smtpd[2061]: connect from unknown[5.34.207.59]
    Apr 20 02:18:32 itmail postfix/smtpd[2082]: warning: unknown[5.34.207.91]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
    Apr 20 02:18:32 itmail postfix/smtpd[2072]: warning: unknown[5.34.207.59]: SASL LOGIN authentication failed: Connection lost to authentication server
    Apr 20 02:18:33 itmail postfix/smtpd[2082]: disconnect from unknown[5.34.207.91] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
    Apr 20 02:18:33 itmail postfix/smtpd[2072]: disconnect from unknown[5.34.207.59] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
     
  3. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    export from running test

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.4 LTS
    Release: 20.04
    Codename: focal

    PHP 7.4.28 (cli) (built: Feb 17 2022 16:06:35) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies


    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 20.04.4 LTS

    [INFO] uptime: 02:34:37 up 1:00, 1 user, load average: 0.09, 0.03, 0.01

    [INFO] memory:
    total used free shared buff/cache available
    Mem: 31Gi 2.2Gi 27Gi 45Mi 1.4Gi 28Gi
    Swap: 8.0Gi 0B 8.0Gi

    [INFO] systemd failed services status:
    UNIT LOAD ACTIVE SUB DESCRIPTION
    ● apache2.service loaded failed failed The Apache HTTP Server
    ● snap.lxd.activate.service loaded failed failed Service for snap application lxd.activate
    ● systemd-networkd-wait-online.service loaded failed failed Wait for Network to be Configured

    LOAD = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB = The low-level unit activation state, values depend on unit type.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Disable the newly added website by deleting the symlink of that site in the folder /etc/apache2/sites-enabled/ and then restart apache.

    The reason for the apache failure is most likely a faulty SSL certificate. I wonder why ISPConfig was not able to roll back to the last working config, which it normally does in such a case. is this a self-signed or Let#s encrypt SSL certificate that you used?
     
  5. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    It was attempting to add a LS cert and i also added the php support.
    when i look in /apache2/sites-enabled/ all the sites are .vhost - is that what i need to delete? the website i last worked on is there and the only .conf files in there are 000-default, 000-ispconfig, and 999-acme - obviously none of which relate to the website i was working on.

    i have looked through all the logs i can find and nothing says anything in particular failed. just says failed.
     
    Last edited: Apr 20, 2022
  6. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    i did find one error that says the python version was .1 version higher than it expected.
    and there were apparently 33 updates available to install. but i didnt want to mess with anything until i had checked with you guys.
    Im dying here in anxiety over this. lol
     
  7. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Just delete the vhost file of that website as I mentioned earlier, do not delete or change any other files, and restart apache. SSL errors in apache do not log any issues, so you can not find anything in the logs for an SSL error.
     
  9. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    You legend. deleting the vhost file has done it.
    Now if i recreate that website.... any precautions i should take?
     
  10. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    although i have just tried the website and it is working... but also ispconfig says it has LC ssl but when going to https:website... it says cert is invalid. so if i turn off ssl in ispconfig and readd it...?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the ssl folder of the website /var/www/domain.tld/ssl/ Does it contain symlinks for the SSL certs? if yes, remove them. Under System > Server config > web, is the apache config test enabled or disabled there? It should be on to prevent such issues.

    And finally, you can use debug mode when you enable the SSL cert again to see in details what#s going on in case the issue happens again: https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/
     
  12. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    Great thank you.
    i think part of the issue is because i set this domain up in the first place with the "automail" setup which has taken over the cert.
    so when i got to www.mydomain.com is has the cert for "autoconfig.mydomain.com"
    should i start a new thread to get assistance for changing this?
     
  13. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    never mind. ignore that last one. its having an issue making the cert for the website but the issue is not clear. i will do some searching and start a new thread if need be.
    Thank you for your assistance.
     

Share This Page