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

    should I reinstall the certbot Sir?
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    No you should run "ispconfig_update.sh --force" and provide the correct information to the script.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    And its important that you let the update reconfigure services and that you choose yes when the updater asks if you want to get a new SSL cert.
     
  4. Ashari Gumelar

    Ashari Gumelar New Member

    :( still not running Sir

    Code:
    --------------------------------------------------------------------------------
     _____ ___________   _____              __ _         ____
    |_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
      | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
     _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
     \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                                  __/ |
                                                 |___/
    --------------------------------------------------------------------------------
    
    
    >> Update
    
    Operating System: Debian 10.0 (Buster) or compatible
    
    This application will update ISPConfig 3 on your server.
    
    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]:
    
    Creating backup of "/usr/local/ispconfig" directory...
    Creating backup of "/etc" directory...
    Creating backup of "/etc/letsencrypt" directory...
    PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user 'ispconfig'@'localhost' (using password: YES) in /tmp/update_runner.sh.wfw6hMCE6J/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.wfw6hMCE6J/install/lib/mysql.lib.php on line 113
    Checking MariaDB version 10.3.39 .. OK
    Checking ISPConfig database .. OK
    Starting incremental database update.
    Loading SQL patch file: /tmp/update_runner.sh.wfw6hMCE6J/install/sql/incremental/upd_dev_collection.sql
    Reconfigure Permissions in master database? (yes,no) [no]:
    
    Service 'mail_server' has been detected (currently disabled) do you want to enable and configure it?  (yes,no) [no]:
    
    Service 'dns_server' has been detected (currently disabled) do you want to enable and configure it?  (yes,no) [no]:
    
    Service 'firewall_server' has been detected (currently disabled) do you want to enable and configure it?  (yes,no) [no]:
    
    Reconfigure Services? (yes,no,selected) [yes]:
    
    Configuring Pureftpd
    Configuring Apache
    Configuring vlogger
    Configuring Apps vhost
    Configuring Jailkit
    Configuring AppArmor
    Configuring Database
    Updating ISPConfig
    ISPConfig Port [8090]:
    
    Create new ISPConfig SSL certificate (yes,no) [no]: yes
    
    Checking / creating certificate for webserver1.pangandarankab.go.id
    Using certificate path /etc/letsencrypt/live/webserver1.pangandarankab.go.id
    Server's public ip(s) (36.91.134.193) not found in A/AAAA records for webserver1.pangandarankab.go.id:
    Ignore DNS check and continue to request certificate? (y,n) [n]: y
    
    Using apache for certificate validation
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator webroot, Installer None
    Attempting to parse the version 1.9.0 renewal configuration file found at /etc/letsencrypt/renewal/demodesa.pangandarankab.go.id.conf with version 0.31.0 of Certbot. This might not work.
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for webserver1.pangandarankab.go.id
    Using the webroot path /usr/local/ispconfig/interface/acme for all unmatched domains.
    Waiting for verification...
    Cleaning up challenges
    Failed authorization procedure. webserver1.pangandarankab.go.id (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: 36.91.134.193: Fetching http://webserver1.pangandarankab.go.id/.well-known/acme-challenge/t_2DUR9GMfHeh_o-MYGApz0XkbkcMNFPh35xSsD2Fhw: Connection refused
    Issuing certificate via certbot failed. Please check log files and make sure that your hostname can be verified by letsencrypt
    Could not issue letsencrypt certificate, falling back to self-signed.
    Generating a RSA private key
    .....................................................................................................................................................................................................................................................................++++
    .......................++++
    writing new private key to '/usr/local/ispconfig/interface/ssl/ispserver.key'
    -----
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.
    -----
    Country Name (2 letter code) [AU]:ID
    State or Province Name (full name) [Some-State]:West Java
    Locality Name (eg, city) []:Parigi
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:Kominfo
    Organizational Unit Name (eg, section) []:Command Center
    Common Name (e.g. server FQDN or YOUR name) []:webserver1
    Email Address []:[email protected]
    Symlink ISPConfig SSL certs to Postfix? (y,n) [y]:
    
    Symlink ISPConfig SSL certs to Pure-FTPd? Creating dhparam file may take some time. (y,n) [y]:
    
    Reconfigure Crontab? (yes,no) [yes]: no
    
    Restarting services ...
    Update finished.
    
     
  5. Ashari Gumelar

    Ashari Gumelar New Member

    Should I reinstall my PHP 7.3 ? based on Debian 10 on my VM
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    No. This problem is neither related to the PHP nor Debian version. And using an outdated OS makes no sense anyway.

    You mentioned there were no errors during update, but the output you posted now is full of errors. First, your hostname
    webserver1.pangandarankab.go.id is not pointing to the IP of this server in DNS with an A-Record, so you can not get an SSL certificate from let#s encrypt. Fix your DNS settings and check that webserver1.pangandarankab.go.id really points to this server's IP address.

    Then you seem to have altered the SQL password from ISPConfig, either in ISPConfig it in MySQL/mariadb, so that ISPConfig can not connect to its database anymore. In the file /usr/local/ispconfig/server/lib/config.inc.php is the password for the mysql user with the name ispconfig. This user must be able to connect to the dbispconfig database. Take the password from that config file and set it in mysql for the user ispconfig and then test with mysql command that the connection works.

    After fixing that and the DNS setup of your hostname, run the update again.
     
  7. Ashari Gumelar

    Ashari Gumelar New Member

    Oke sir, I'll try
     
  8. Ashari Gumelar

    Ashari Gumelar New Member

    Thanks Sir my ispconfig was running now. But the new problem is one of my website show error http 500. What wrong with this?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look into the error.log of the website.
     
    Ashari Gumelar likes this.
  10. Ashari Gumelar

    Ashari Gumelar New Member

    Code:
    root@webserver1:/var/log/apache2# tail /var/log/apache2/error.log
    [Thu Apr 18 13:59:15.192948 2024] [:error] [pid 14899] python_init: Python path being used '/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
    [Thu Apr 18 13:59:15.192967 2024] [:notice] [pid 14899] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Thu Apr 18 13:59:15.192973 2024] [:notice] [pid 14899] mod_python: using mutex_directory /tmp
    [Thu Apr 18 13:59:15.207899 2024] [mpm_prefork:notice] [pid 14899] 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
    [Thu Apr 18 13:59:15.207939 2024] [core:notice] [pid 14899] AH00094: Command line: '/usr/sbin/apache2'
    [ 2024-04-18 13:59:15.2420 14847/7f176a112980 age/Cor/CoreMain.cpp:967 ]: Passenger core shutdown finished
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/memcache.so.so (/usr/lib/php/20180731/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/memcache.so.so (/usr/lib/php/20180731/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/memcache.so.so (/usr/lib/php/20180731/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/memcache.so.so (/usr/lib/php/20180731/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    
    This is from apache2 log Sir.
    Is my PHP broken?
     
  11. Ashari Gumelar

    Ashari Gumelar New Member

    Code:
    systemctl status php7.3-fpm
    ● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
       Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
       Active: active (running) since Thu 2024-04-18 13:56:01 WIB; 8min ago
         Docs: man:php-fpm7.3(8)
      Process: 14076 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73 (code=exited, status=0/SUCCESS)
     Main PID: 14049 (php-fpm7.3)
       Status: "Processes active: 0, idle: 18, Requests: 677, slow: 0, Traffic: 0.1req/sec"
        Tasks: 20 (limit: 4915)
       Memory: 102.7M
       CGroup: /system.slice/php7.3-fpm.service
               ├─14049 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
               ├─14057 php-fpm: pool web1
               ├─14058 php-fpm: pool web1
               ├─14059 php-fpm: pool web2
               ├─14060 php-fpm: pool web2
               ├─14061 php-fpm: pool web23
               ├─14062 php-fpm: pool web23
               ├─14063 php-fpm: pool web3
               ├─14064 php-fpm: pool web3
               ├─14065 php-fpm: pool web4
               ├─14066 php-fpm: pool web4
               ├─14067 php-fpm: pool web5
               ├─14068 php-fpm: pool web5
               ├─14070 php-fpm: pool web6
               ├─14071 php-fpm: pool web6
               ├─14072 php-fpm: pool web7
               ├─14073 php-fpm: pool web7
               ├─14074 php-fpm: pool www
               ├─14075 php-fpm: pool www
               └─16191 php-fpm: pool web11
    
    Apr 18 13:56:01 webserver1 systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
    Apr 18 13:56:01 webserver1 php-fpm7.3[14049]: [18-Apr-2024 13:56:01] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.s
    Apr 18 13:56:01 webserver1 php-fpm7.3[14049]: [18-Apr-2024 13:56:01] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.s
    Apr 18 13:56:01 webserver1 systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
    
    My PHP 7.3 status Sir
     
  12. Ashari Gumelar

    Ashari Gumelar New Member

    Code:
    systemctl status apache2.service
    ● apache2.service - The Apache HTTP Server
       Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
       Active: active (running) since Thu 2024-04-18 13:59:15 WIB; 7min ago
         Docs: https://httpd.apache.org/docs/2.4/
      Process: 14839 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
        Tasks: 66 (limit: 4915)
       Memory: 91.8M
       CGroup: /system.slice/apache2.service
               ├─14899 /usr/sbin/apache2 -k start
               ├─14900 vlogger (access log)
               ├─14901 /usr/sbin/apache2 -k start
               ├─14902 Passenger watchdog
               ├─14905 Passenger core
               ├─14910 Passenger ust-router
               ├─14959 /usr/sbin/apache2 -k start
               ├─14982 /usr/sbin/apache2 -k start
               ├─14984 /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
               ├─14989 /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
               ├─14993 /usr/sbin/apache2 -k start
               ├─15003 /usr/sbin/apache2 -k start
               ├─15004 /usr/sbin/apache2 -k start
               ├─15608 /usr/sbin/apache2 -k start
               ├─15613 /usr/sbin/apache2 -k start
               ├─15956 /usr/sbin/apache2 -k start
               ├─16015 /usr/sbin/apache2 -k start
               ├─16405 /usr/sbin/apache2 -k start
               └─16457 /usr/sbin/apache2 -k start
    
    Apr 18 13:59:14 webserver1 systemd[1]: Starting The Apache HTTP Server...
    Apr 18 13:59:14 webserver1 apachectl[14839]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7
    Apr 18 13:59:15 webserver1 systemd[1]: Started The Apache HTTP Server.
    My apache2.service status
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It may be missing the PHP module that provides memcache. What shows command
    Code:
    apt policy php-memcache php-memcached php7.3-memcache
    Did the system work previously? What could have removed PHP module/modules?
    Reading this thread, you seemed eager to try random things to fix issues. That is seldom a good policy. Find what exactly is wrong, and examine the real way to fix that issue.
     

Share This Page