Apache stop working

Discussion in 'Installation/Configuration' started by pecka33, Sep 24, 2023.

  1. pecka33

    pecka33 Member

    Hello,
    on my server apache stop working, when i use system failed i can see

    Code:
    ● apache2.service          loaded failed failed The Apache HTTP Server
    ● clamav-clamonacc.service loaded failed failed ClamAV On-Access Scanner
    ● php8.0-fpm.service       loaded failed failed The PHP 8.0 FastCGI Process Manager
    
    I am using latest debian and ispconfig. One thing what i did yesterday was i changed
    Configuration for the additional PHP versions in isp config - change path for fpm and fastcgi as you can see here How to install PHP 5.6 and 7.0 - 8.2 with PHP-FPM and FastCGI mode for ISPConfig 3.2 with apt on Ubuntu 18.04 - 22.04 (howtoforge.com)

    I tried to reconfigure services and does not help.

    When i did reboot server, after that is for example faled php 8.0, when i reboot again is this services fine and failed for example php 8.2.

    Thank you for help
     
  2. pecka33

    pecka33 Member

    I tried to check apache status and get
    Code:
    × apache2.service - The Apache HTTP Server
         Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
         Active: failed (Result: exit-code) since Sun 2023-09-24 13:40:25 CEST; 1min 18s ago
           Docs: https://httpd.apache.org/docs/2.4/
        Process: 23620 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
            CPU: 15ms
    
    Sep 24 13:40:25 samantos systemd[1]: Starting apache2.service - The Apache HTTP Server...
    Sep 24 13:40:25 samantos apachectl[23630]: AH00526: Syntax error on line 20 of /etc/apache2/sites-enabled/000-apps.vhost:
    Sep 24 13:40:25 samantos apachectl[23630]: Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
    Sep 24 13:40:25 samantos apachectl[23620]: Action 'start' failed.
    Sep 24 13:40:25 samantos apachectl[23620]: The Apache error log may have more information.
    Sep 24 13:40:25 samantos systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    Sep 24 13:40:25 samantos systemd[1]: apache2.service: Failed with result 'exit-code'.
    Sep 24 13:40:25 samantos systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
    Sep 24 13:40:31 samantos systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.
    Sep 24 13:40:36 samantos systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.
    
    and
    Code:
    Syntax error on line 20 of /etc/apache2/sites-enabled/000-apps.vhost:
    Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
    
     
  3. pecka33

    pecka33 Member

    I solved it by
    Code:
    a2enmod rewrite
    systemctl restart apache2
    Now is apache working, but still problem with failed clamav and php
    Code:
    ● clamav-clamonacc.service loaded failed failed ClamAV On-Access Scanner
    ● php8.0-fpm.service       loaded failed failed The PHP 8.0 FastCGI Process Manager
    
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    You reported a lot or problems recently, various threads. When did them all started? Any clue?

    By the way, try to supply ISPConfig server report (check the read-before-posting thread) to help pointing to the right direction as I suspected that there are something else that may need to be rectified.

    I never had clamav failures before but I did with php. Ubuntu server seems to have these php failures a lot, so I have been using monit to restart them automatically. In my notes they mostly happened after php updates.

    Clamav problem mainly due to insufficient assigned memory in swap file, other than too low in RAM. One may need 2gb in RAM, and 4gb in swap file for it to work nicely. Of course more in ram is better.
     
  5. pecka33

    pecka33 Member

    Thank you. Right now i have problem only with apache - php version. For example
    Code:
    systemctl status php7.2
    Unit php7.2.service could not be found.
    root@samantos:~# systemctl status php7.2-fpm
    × php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
         Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; preset: enabled)
         Active: failed (Result: signal) since Sun 2023-09-24 14:49:48 CEST; 6min ago
           Docs: man:php-fpm7.2(8)
        Process: 785 ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf (code=killed, signal=SEGV)
        Process: 828 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.2/fpm/pool.d/www.conf 72 (code=exited, status=0/SUCCESS)
       Main PID: 785 (code=killed, signal=SEGV)
            CPU: 16ms
    
    Sep 24 14:49:46 samantos systemd[1]: Starting php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager...
    Sep 24 14:49:48 samantos systemd[1]: php7.2-fpm.service: Main process exited, code=killed, status=11/SEGV
    Sep 24 14:49:48 samantos systemd[1]: php7.2-fpm.service: Failed with result 'signal'.
    Sep 24 14:49:48 samantos systemd[1]: Failed to start php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager.
    
    Maybe i should change in ispconfig path to php version? In this case - where in case i can not get ispconfig?
     
  6. pecka33

    pecka33 Member

    Now i have another problem but dont know where to check it. I reinstall all php version, reboot my server and there are no errors in log, all services working, but sites still not working. What should i check? Dont know where, apache is working and no errors.
     
  7. pecka33

    pecka33 Member

    At all. I still have with apache. When i reboot server, after start is always one of services failed - always failed
    >
    ● clamav-clamonacc.service loaded failed failed ClamAV On-Access Scanner
    and

    ● php7.1-fpm.service loaded failed failed The PHP 7.1 FastCGI Process Man>
    With every rebooty is php version which failed different.

    When i did reinstall of php, apache working fine, this failed service is gone, but websites still does not work and when i did reboot, problem is still here - apache wont start.
     
  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Check whether you are setting them (all the php configs) correctly in the ISPConfig Panel.
     
  9. pecka33

    pecka33 Member

    Yes. But problem is i can not get to ISP Config. Site does not work. Tried reconfigure services etc.
     
  10. pecka33

    pecka33 Member

    For example, i reboot server and php 7.2 is failed. I checked status of php 7.2 service and get

    Code:
    × php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
         Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; preset: enabled)
         Active: failed (Result: signal) since Sun 2023-09-24 16:37:08 CEST; 1min 54s ago
           Docs: man:php-fpm7.2(8)
        Process: 778 ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf (code=killed, signal=SEGV)
        Process: 853 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.2/fpm/pool.d/www.conf 72 (code=exited, status=0/SUCCESS)
       Main PID: 778 (code=killed, signal=SEGV)
            CPU: 28ms
    
    Sep 24 16:37:05 samantos systemd[1]: Starting php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager...
    Sep 24 16:37:08 samantos systemd[1]: php7.2-fpm.service: Main process exited, code=killed, status=11/SEGV
    Sep 24 16:37:08 samantos systemd[1]: php7.2-fpm.service: Failed with result 'signal'.
    Sep 24 16:37:08 samantos systemd[1]: Failed to start php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager.
    
     
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  12. pecka33

    pecka33 Member

    Thank you, Taleman. Thats was first what i did. I tried to do everything from this post, but nothing works. I dont know why. After reboot of my server is failed clamav-clamonacc.service loaded failed failed ClamAV On-Access Scanner - Always and one of PHP fpm version - every reboot - different php is failed.
    When i did reinstall php, from failed list is gone, but still does not work website and after reboot same problem.
     
  13. pecka33

    pecka33 Member

    Right now after reinstall all PHP version and all of packages, after reboot is failed only one - clamav-clamonacc.service. Apache etc. is enable, not failed, but ispconfig and other website still does not work.
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    One of the things the Read before posting tells to do is to post the common issues report.
     
  15. pecka33

    pecka33 Member

    Thank you.
    Right now
    Code:
    systemctl --failed
      UNIT                     LOAD   ACTIVE SUB    DESCRIPTION
    ● clamav-clamonacc.service loaded failed failed ClamAV On-Access Scanner
    
    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.
    1 loaded units listed.
    
    I did reconfigure services for ispconfig via command, reinstall completely all php versions with fpm and fastcgi, spets i wrote in my posts here, check lets ecnrypt settings, check if i have set default PHP version, check apache logs, install all package from this The Perfect Server - Debian 12 (Bookworm) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.2 (howtoforge.com)
    install packages for php.

    I dont know where could be problem, my server working more than 2 years without problems.

    All services are working, only problem with clamav-clamonacc.service. I donw know what i should to with this. In my error log is nothing else. I dont know, looks like that all services working, but ispconfig and website does not works.
     
  16. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    You still did not provide us with your server report.
     
  17. pecka33

    pecka33 Member

    Thank you, but i am not sure which logs, because i didnt see any errors, all services are running to
     
  18. pecka33

    pecka33 Member

    For example about clamav is in syslog
    Code:
    2023-09-24T19:11:16.642259+02:00 samantos kernel: [  525.302182] audit: type=1400 audit(1695575476.636:20): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/sbin/clamd" pid=23788 comm="apparmor_parser"
    2023-09-24T19:11:16.653149+02:00 samantos systemd[1]: Reloading.
    2023-09-24T19:11:17.334663+02:00 samantos systemd[1]: Reloading.
    2023-09-24T19:11:17.754299+02:00 samantos systemd[1]: clamav-daemon.socket - Socket for Clam AntiVirus userspace daemon was skipped because of an unmet condition check (ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}).
    2023-09-24T19:11:17.754421+02:00 samantos systemd[1]: clamav-daemon.service - Clam AntiVirus userspace daemon was skipped because of an unmet condition check (ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}).
    2023-09-24T19:11:17.755551+02:00 samantos systemd[1]: clamav-daemon.socket - Socket for Clam AntiVirus userspace daemon was skipped because of an unmet condition check (ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}).
    2023-09-24T19:11:17.968056+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:17 2023 -> Testing database: '/var/lib/clamav/tmp.d037b0ce92/clamav-4123c93733edb771f891e2819be8047d.tmp-daily.cvd' ...
    2023-09-24T19:11:21.482725+02:00 samantos postfix/smtps/smtpd[2403]: connect from unknown[46.148.40.90]
    2023-09-24T19:11:22.082376+02:00 samantos postfix/smtps/smtpd[1623]: connect from unknown[46.148.40.189]
    2023-09-24T19:11:22.216288+02:00 samantos postfix/smtps/smtpd[2401]: connect from unknown[46.148.40.148]
    2023-09-24T19:11:23.227425+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 -> Database test passed.
    2023-09-24T19:11:23.227608+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 -> daily.cvd updated (version: 27041, sigs: 2041425, f-level: 90, builder: raynman)
    2023-09-24T19:11:23.227662+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 -> main database available for download (remote version: 62)
    2023-09-24T19:11:23.290313+02:00 samantos freshclam[23397]: WARNING: Sun Sep 24 19:11:23 2023 -> Can't download main.cvd from https://database.clamav.net/main.cvd
    2023-09-24T19:11:23.290399+02:00 samantos freshclam[23397]: WARNING: Sun Sep 24 19:11:23 2023 -> FreshClam received error code 429 from the ClamAV Content Delivery Network (CDN).
    2023-09-24T19:11:23.290442+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 -> This means that you have been rate limited by the CDN.
    2023-09-24T19:11:23.290487+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->  1. Run FreshClam no more than once an hour to check for updates.
    2023-09-24T19:11:23.290520+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->     FreshClam should check DNS first to see if an update is needed.
    2023-09-24T19:11:23.290551+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->  2. If you have more than 10 hosts on your network attempting to download,
    2023-09-24T19:11:23.290628+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->     it is recommended that you set up a private mirror on your network using
    2023-09-24T19:11:23.290664+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->     cvdupdate (https://pypi.org/project/cvdupdate/) to save bandwidth on the
    2023-09-24T19:11:23.290694+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->     CDN and your own network.
    2023-09-24T19:11:23.290728+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->  3. Please do not open a ticket asking for an exemption from the rate limit,
    2023-09-24T19:11:23.290787+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 ->     it will not be granted.
    2023-09-24T19:11:23.290819+02:00 samantos freshclam[23397]: WARNING: Sun Sep 24 19:11:23 2023 -> You are on cool-down until after: 2023-09-25 19:11:23
    2023-09-24T19:11:23.290869+02:00 samantos freshclam[23397]: Sun Sep 24 19:11:23 2023 -> bytecode database available for download (remote version: 334)
    2023-09-24T19:11:23.364139+02:00 samantos postfix/smtps/smtpd[19375]: warning: unknown[46.148.40.61]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
    
     
  19. pecka33

    pecka33 Member

    Now i have a new problem - can not use command. For example i wrote apt update and get
    Segmentation fault
     
  20. pecka33

    pecka33 Member

    I found that problem will be problably here

    FCGI: attempt to connect to Unix domain socket /run/php/php8.2-fpm.sock (*:80) failed
    but donw know where i can change it.
     

Share This Page