HTTP2 do not work

Discussion in 'Installation/Configuration' started by Oitsuki, Oct 28, 2019.

  1. Oitsuki

    Oitsuki Member

    Hello,

    I try to activate the http2 but it do not work
    Server configuration ssl it's activated
    Website configuration ssl it's activated
    a2enmod http2 is activated
    inside my website.vhost I saw the protocol http 2 in 80 and 443
    Forget something ?
     
  2. Steini86

    Steini86 Active Member

    Provide proper log entries. Does not work is NOT an appropriate error message
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  4. Oitsuki

    Oitsuki Member

  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  6. Oitsuki

    Oitsuki Member

    result :
    HTTP/2 protocol is not supported.
    ALPN extension is not supported.
     
  7. Steini86

    Steini86 Active Member

    Restart apache2 and show the logs. Probably you are using mpm "prefork". You need mpm event or worker for http/2.
    Code:
    a2dismod mpm_prefork
    a2enmod mpm_event
    systemctl restart apache2
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    in addition to what @Steini86 posted, please take care that no website sues mod_php as pghp mode before you switch the mpm, switch all sites to php-fpm, otherwise apache will not start again.
     
  9. Oitsuki

    Oitsuki Member

    I try the command and I have this error
    note latest ispconfig version
    php 7.3 as default
    Code:
    root@xxxxxx:~# a2dismod mpm_prefork
    ERROR: The following modules depend on mpm_prefork and need to be disabled first: php7.0 php7.3
    root@xxxxxx:~# a2enmod mpm_event
    Considering conflict mpm_worker for mpm_event:
    Considering conflict mpm_prefork for mpm_event:
    ERROR: Module mpm_prefork is enabled - cannot proceed due to conflicts. It needs to be disabled first!
    
    on apt-get upgrade I have this :
    Code:
    apt-get upgrade
    Lecture des listes de paquets... Fait
    Construction de l'arbre des dépendances       
    Lecture des informations d'état... Fait
    Calcul de la mise à jour... Fait
    Les paquets suivants ont été conservés :
      libapache2-mod-php7.3 php-imagick php7.3-cgi php7.3-cli php7.3-common
      php7.3-curl php7.3-fpm php7.3-gd php7.3-gmp php7.3-intl php7.3-json
      php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-readline php7.3-soap
      php7.3-sqlite3 php7.3-xml php7.3-zip
    0 mis à jour, 0 nouvellement installés, 0 à enlever et 19 non mis à jour.
    
     
  10. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Run these first, before disabling prefork:
    Code:
    a2dismod php7.0 php7.3
    a2enconf php7.3-fpm
    (That is assuming your system default php version is 7.3, which is the case for debian 10 and I think ubuntu 18; otherwise change that to the correct version for your OS.)
     
  11. Steini86

    Steini86 Active Member

    Read -> Think -> Post

    - Change all websites from mod_php to php_fpm
    Code:
    a2dismod php7.0 php7.3
    a2dismod mpm_prefork
    a2enmod mpm_event
    systemctl restart apache2
     
  12. Oitsuki

    Oitsuki Member

    All my website displays an error 503, down, Go back to fast cgi for moment, work

    result :
    Code:
    2dismod php7.0 php7.3
    a2dismod mpm_prefork
    a2enmod mpm_event
    systemctl restart apache2
    root@xxxxx:/var/lib# a2enconf php7.3-fpm
    Conf php7.3-fpm already enabled
    
    I have noted something weird in ispconfig panel at this line (s[/code]
    PHP-FPM socket directory = /var/lib/php7.0-fpm
    Look the directory /var/lib/ and I have only php7.0-fpm
     
  13. Oitsuki

    Oitsuki Member

    seems work in fast cgi in http/2 but in fpm my website do not work
     
  14. Steini86

    Steini86 Active Member

    You don't (by any chance) want to tell us the error message in the error.log?
    Is php-fpm running? (systemctl status php7.3-fpm )

    You can use deepl.com for translations, has a very good French<->Englisch engine
     
  15. Oitsuki

    Oitsuki Member

    Code:
    root@xxxx:/var/lib# 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 prese
       Active: failed (Result: exit-code) since Tue 2019-10-29 18:06:02 UTC; 37min a
         Docs: man:php-fpm7.3(8)
      Process: 25099 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/
      Process: 15168 ExecReload=/bin/kill -USR2 $MAINPID (code=exited, status=0/SUCC
     Main PID: 25099 (code=exited, status=78)
       Status: "Processes active: 0, idle: 13, Requests: 9, slow: 0, Traffic: 0req/s
    
    oct. 29 18:04:10 xxxxxx systemd[1]: Reloaded The PHP 7.3 FastCGI Process Manag
    oct. 29 18:05:03 xxxxxx systemd[1]: Reloading The PHP 7.3 FastCGI Process Mana
    oct. 29 18:05:03 xxxxxx systemd[1]: Reloaded The PHP 7.3 FastCGI Process Manag
    oct. 29 18:06:02 xxxxxx systemd[1]: Reloading The PHP 7.3 FastCGI Process Mana
    oct. 29 18:06:02 xxxxxx systemd[1]: Reloaded The PHP 7.3 FastCGI Process Manag
    oct. 29 18:06:02 xxxxxx systemd[1]: php7.3-fpm.service: Main process exited, c
    oct. 29 18:06:02 xxxxxx systemd[1]: php7.3-fpm.service: Failed with result 'ex
    oct. 29 18:21:02 xxxxxx systemd[1]: php7.3-fpm.service: Unit cannot be reloade
    oct. 29 18:22:02 xxxxxx systemd[1]: php7.3-fpm.service: Unit cannot be reloade
    oct. 29 18:22:04 v systemd[1]: php7.3-fpm.service: Unit cannot be reloade
    lines 1-19/19 (END)...skipping...
    ● 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: failed (Result: exit-code) since Tue 2019-10-29 18:06:02 UTC; 37min ago
         Docs: man:php-fpm7.3(8)
      Process: 25099 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
      Process: 15168 ExecReload=/bin/kill -USR2 $MAINPID (code=exited, status=0/SUCCESS)
     Main PID: 25099 (code=exited, status=78)
       Status: "Processes active: 0, idle: 13, Requests: 9, slow: 0, Traffic: 0req/sec"
    
    oct. 29 18:04:10 xxxxxx systemd[1]: Reloaded The PHP 7.3 FastCGI Process Manager.
    oct. 29 18:05:03 xxxxxx systemd[1]: Reloading The PHP 7.3 FastCGI Process Manager.
    oct. 29 18:05:03 xxxxxx systemd[1]: Reloaded The PHP 7.3 FastCGI Process Manager.
    oct. 29 18:06:02 xxxxxx systemd[1]: Reloading The PHP 7.3 FastCGI Process Manager.
    oct. 29 18:06:02 xxxxxx systemd[1]: Reloaded The PHP 7.3 FastCGI Process Manager.
    oct. 29 18:06:02 xxxxxx systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/CONFIG
    oct. 29 18:06:02 xxxxxx systemd[1]: php7.3-fpm.service: Failed with result 'exit-code'.
    oct. 29 18:21:02 xxxxxx systemd[1]: php7.3-fpm.service: Unit cannot be reloaded because it is inactive.
    oct. 29 18:22:02 xxxxxxxxxxxx systemd[1]: php7.3-fpm.service: Unit cannot be reloaded because it is inactive.
    oct. 29 18:22:04 xxxxxx systemd[1]: php7.3-fpm.service: Unit cannot be reloaded because it is inactive.
     
  16. Oitsuki

    Oitsuki Member

    error.log
    Code:
    [Tue Oct 29 00:00:06.054085 2019] [ssl:warn] [pid 29413] AH01906: xxxxxx:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Tue Oct 29 00:00:06.058155 2019] [ssl:warn] [pid 29413] AH01906: xxxxxx:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Tue Oct 29 00:00:06.058267 2019] [http2:warn] [pid 29413] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands $
    [ 2019-10-29 00:00:06.0731 9393/7fdd53bf3980 age/Wat/WatchdogMain.cpp:1291 ]: Starting Passenger watchdog...
    [ 2019-10-29 00:00:06.0882 9396/7f039c563980 age/Cor/CoreMain.cpp:982 ]: Starting Passenger core...
    [ 2019-10-29 00:00:06.0883 9396/7f039c563980 age/Cor/CoreMain.cpp:235 ]: Passenger core running in multi-application mode.
    [ 2019-10-29 00:00:06.1090 9396/7f039c563980 age/Cor/CoreMain.cpp:732 ]: Passenger core online, PID 9396
    [ 2019-10-29 00:00:06.1440 9405/7fb08b241980 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
    [ 2019-10-29 00:00:06.1448 9405/7fb08b241980 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 9405
    [Tue Oct 29 00:00:06.174282 2019] [:error] [pid 29413] python_init: Python version mismatch, expected '2.7.5+', found '2.7.16'.
    [Tue Oct 29 00:00:06.174369 2019] [:error] [pid 29413] python_init: Python executable found '/usr/bin/python'.
    [Tue Oct 29 00:00:06.174375 2019] [:error] [pid 29413] 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/$
    [Tue Oct 29 00:00:06.174388 2019] [:notice] [pid 29413] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Tue Oct 29 00:00:06.174397 2019] [:notice] [pid 29413] mod_python: using mutex_directory /tmp
    [Tue Oct 29 00:00:06.183254 2019] [mpm_prefork:notice] [pid 29413] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1d Phusion_Passenger/5.0.30 mod_python/3.3.1 Python/2.7.16 configured -- resuming n$
    [Tue Oct 29 00:00:06.183270 2019] [core:notice] [pid 29413] AH00094: Command line: '/usr/sbin/apache2'
    [Tue Oct 29 00:00:06.183310 2019] [mpm_prefork:warn] [pid 29413] AH00167: long lost child came home! (pid 29414)
    [Tue Oct 29 00:00:06.183334 2019] [mpm_prefork:warn] [pid 29413] AH00167: long lost child came home! (pid 29415)
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: undefined symbol: php_explicit_bzero), /usr/lib/php/20180731$
    
    
     
  17. Steini86

    Steini86 Active Member

    Seems like it was running until 18:06:02, then you have messed up the configuration.
    Crazy: To solve your problem I found myself copying your error messages into google and pasting the answer for you into the thread ..... I think you should be able to do that by yourself, seems be straight forward now. If you can't undo your changes, purge the php-fpm package and reinstall
     
  18. Oitsuki

    Oitsuki Member

    I can do that:
    Code:
    dpkg -r debian-cd
    apt-get install php-fpm7.3
    Is it correct ?
    I have this problem also :
    Code:
    apt-get upgrade
    Lecture des listes de paquets... Fait
    Construction de l'arbre des dépendances       
    Lecture des informations d'état... Fait
    Calcul de la mise à jour... Fait
    Les paquets suivants ont été conservés :
      libapache2-mod-php7.3 php-imagick php7.3-cgi php7.3-cli php7.3-common
      php7.3-curl php7.3-fpm php7.3-gd php7.3-gmp php7.3-intl php7.3-json
      php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-readline php7.3-soap
      php7.3-sqlite3 php7.3-xml php7.3-zip
    0 mis à jour, 0 nouvellement installés, 0 à enlever et 19 non mis à jour.
     
  19. Steini86

    Steini86 Active Member

    no
    Code:
    apt remove --purge php*-fpm
    apt install php-fpm
    What problem?
     
    ahrasis likes this.
  20. Oitsuki

    Oitsuki Member

    Ok thank you, all seems to work now
     
    ahrasis and Steini86 like this.

Share This Page