Error FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web9.sock (*) failed

Discussion in 'Installation/Configuration' started by muekno, Jul 17, 2021.

  1. muekno

    muekno Active Member HowtoForge Supporter

    Added a new website with ISPConfig, installed a TYPO3 website.
    System DEBIAN 10 latest patches, latest ISPConfig 3.2.5
    Installed ist PHP7.3 and PHp7.3-FPM
    So php5-fpm can not be found.
    it is not the first typo3 site I did, never hat real problems.
    the above listed error is from the error.log ../web9/log directory and ist followed by
    Code:
    failed to make connection to backend: httpd-UDS
    The website worked fin before with a dummy index.html with letsencrypt cert and redirect http to https
    I installed this site as I did often before. Even on this server. As I had a new version of this site and to not have old thing, I first deleted the site with ISPConfig. created a new one got the certs, everything worked fine till here. then set up the TYPO3 site and got Error 503
    Rainer

    P.S. I check the test server where I build the website other server but same debian an isp config same settings and works fine. Why does it look for php5 if php7 is installed
     
    Last edited: Jul 17, 2021
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you enter anything into the apache directives field of the website? If yes, what?
     
  3. muekno

    muekno Active Member HowtoForge Supporter

    No
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did you get error message
    Code:
    php5-fpm can not be found.
    somewhere? Any more info on that available?
    I assume you followed the read before posting article to rule out the usual suspects?
     
  5. muekno

    muekno Active Member HowtoForge Supporter

    No just from the log file. As I wrote a TYPO3 website was running on the server fine, but with only www.domain.tld. Es I would change to domain.tld with www autosubdomain and I had a second domain that should be routed too this site I delete every website. recreated the first and the the second with reroute both with autosubdomain an a dummyhello world index.html.
    Then I got the certs from letsencrypt for both, tested and everthing work fine, the I reinstalled TYPO3 estimating everything will work as before with the enhancements autosubdomain rerouting valid certs. Same as I do on other servers.
    If I change from PHP-FPM to another option I get a response from TYPO3 with excpected error messages
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to run:

    systemctl restart php7.3-fpm

    Maybe the FPM daemon is hanging and does not pick up the new. php5-fpm is just a directory name for the socket files which contains sockets for all PHP versions, not the PHP version used by that site.

    If thsi does not help, then please post the complete error messages from error.log of the website.
     
  7. muekno

    muekno Active Member HowtoForge Supporter

    php7.3-fpm starts without error
    dir restart apache2, still 503
    Code:
    [Sat Jul 17 11:12:14.845947 2021] [proxy:error] [pid 8922] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web9.sock (*) failed
    [Sat Jul 17 11:12:14.846014 2021] [proxy_fcgi:error] [pid 8922] [client 54.36.149.74:45520] AH01079: failed to make connection to backend: httpd-UDS
    [Sat Jul 17 11:13:51.598847 2021] [proxy:error] [pid 8881] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web9.sock (*) failed
    [Sat Jul 17 11:13:51.598903 2021] [proxy_fcgi:error] [pid 8881] [client 62.54.177.160:64951] AH01079: failed to make connection to backend: httpd-UDS
    [Sat Jul 17 11:13:53.146732 2021] [proxy:error] [pid 8959] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web9.sock (*) failed
    [Sat Jul 17 11:13:53.146808 2021] [proxy_fcgi:error] [pid 8959] [client 62.54.177.160:64952] AH01079: failed to make connection to backend: httpd-UDS
    [Sat Jul 17 11:15:50.763189 2021] [proxy:error] [pid 10388] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web9.sock (*) failed
    [Sat Jul 17 11:15:50.763281 2021] [proxy_fcgi:error] [pid 10388] [client 62.54.177.160:65142] AH01079: failed to make connection to backend: httpd-UDS
    
    62.54.177.160 ist my IP
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have multiple php versions installed as php-fpm? If yes, try to switch to another version, press save, wait a minute, and then switch back to PHP 7.3.
     
  9. muekno

    muekno Active Member HowtoForge Supporter

    service --status-all shows php7.0-fpm and
    php7.3-fpm running
    do not know how to select an other version, as php shows only default
    So stopped and disabled ver 7.0 and did a server reboot, same problem
    Code:
    PHP 7.3.29-1~deb10u1 (cli) (built: Jul  2 2021 04:04:33) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.3.29-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
    
    Logfile shoes same errors
     
  10. muekno

    muekno Active Member HowtoForge Supporter

    Directory php5-fpm does exist, but there is no web9.sock
    On the other site ISPConfig using php too rund on the same server the same ip address without any problem
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post teh content of the vhost file of the affected website.

    ISPConfig uses fastcgi mode. There must be something wrong with the php-fpm daemon on your system.
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So you do have multiple PHP versions installed, at least 7.0 and 7.3?
    Does the ISPConfig Panel in website settings show
    PHP: PHP-FPM
    and PHP version something?
     
  13. muekno

    muekno Active Member HowtoForge Supporter

    In the meantime I have remove (apt removed PHP7.0 and as written above disabled PHP7.0-FPM) But on my working server there is a /var/lib/php7.3-fpm with a webx.sock on the faultiy server only /var/lib/php5-fpm/ with webx.sock from 2019.
    [CODE|

    <Directory /var/www/max-eckstein.de>
    AllowOverride None
    Require all denied
    </Directory>

    <VirtualHost *:80>


    DocumentRoot /var/www/clients/client0/web9/web

    ServerName max-eckstein.de
    ServerAlias www.max-eckstein.de
    ServerAdmin [email protected]


    ErrorLog /var/log/ispconfig/httpd/max-eckstein.de/error.log

    Alias /error/ "/var/www/max-eckstein.de/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html


    <Directory /var/www/max-eckstein.de/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +SymlinksIfOwnerMatch
    AllowOverride All
    Require all granted
    </Directory>
    <Directory /var/www/clients/client0/web9/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +SymlinksIfOwnerMatch
    AllowOverride All
    Require all granted
    </Directory>




    # cgi enabled
    <Directory /var/www/clients/client0/web9/cgi-bin>
    AllowOverride All
    Require all granted
    </Directory>
    ScriptAlias /cgi-bin/ /var/www/clients/client0/web9/cgi-bin/
    <FilesMatch "\.(cgi|pl)$">
    SetHandler cgi-script
    </FilesMatch>
    # suexec enabled
    <IfModule mod_suexec.c>
    SuexecUserGroup web9 client0
    </IfModule>
    <IfModule mod_fastcgi.c>
    <Directory /var/www/clients/client0/web9/cgi-bin>
    Require all granted
    </Directory>
    <Directory /var/www/max-eckstein.de/web>
    <FilesMatch "\.php[345]?$">
    <If "-f '%{REQUEST_FILENAME}'">
    SetHandler php-fcgi
    </If>
    </FilesMatch>
    </Directory>
    <Directory /var/www/clients/client0/web9/web>
    <FilesMatch "\.php[345]?$">
    <If "-f '%{REQUEST_FILENAME}'">
    SetHandler php-fcgi
    </If>
    </FilesMatch>
    </Directory>
    Action php-fcgi /php-fcgi virtual
    Alias /php-fcgi /var/www/clients/client0/web9/cgi-bin/php-fcgi-*-80-max-eckstein.de
    FastCgiExternalServer /var/www/clients/client0/web9/cgi-bin/php-fcgi-*-80-max-eckstein.de -idle-timeout 300 -socket /var/lib/php5-fpm/web9.sock -pass-header Authorization -pass-header Content-Type
    </IfModule>
    <IfModule mod_proxy_fcgi.c>
    #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php5-fpm/web9.sock|fcgi://localhost//var/www/clients/client0/web9/web/$1
    <Directory /var/www/clients/client0/web9/web>
    <FilesMatch "\.php[345]?$">
    <If "-f '%{REQUEST_FILENAME}'">
    SetHandler "proxy:unix:/var/lib/php5-fpm/web9.sock|fcgi://localhost"
    </If>
    </FilesMatch>
    </Directory>
    </IfModule>


    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
    RewriteRule ^ - [END]
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
    AssignUserId web9 client0
    </IfModule>

    <IfModule mod_dav_fs.c>
    # Do not execute PHP files in webdav directory
    <Directory /var/www/clients/client0/web9/webdav>
    <ifModule mod_security2.c>
    SecRuleRemoveById 960015
    SecRuleRemoveById 960032
    </ifModule>
    <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
    </FilesMatch>
    </Directory>
    DavLockDB /var/www/clients/client0/web9/tmp/DavLock
    # DO NOT REMOVE THE COMMENTS!
    # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
    # WEBDAV BEGIN
    # WEBDAV END
    </IfModule>

    # skipping apache_directives, as that will be handled by the ssl vhost


    </VirtualHost>


    <VirtualHost *:443>


    DocumentRoot /var/www/clients/client0/web9/web

    ServerName max-eckstein.de
    ServerAlias www.max-eckstein.de
    ServerAdmin [email protected]

    <IfModule mod_http2.c>
    Protocols h2 http/1.1
    </IfModule>

    <IfModule mod_brotli.c>
    AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml application/xml+rss application/atom+xml application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon
    </IfModule>

    ErrorLog /var/log/ispconfig/httpd/max-eckstein.de/error.log

    Alias /error/ "/var/www/max-eckstein.de/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
    SSLEngine on
    SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
    # SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
    SSLHonorCipherOrder on
    # <IfModule mod_headers.c>
    # Header always add Strict-Transport-Security "max-age=15768000"
    # </IfModule>
    SSLCertificateFile /var/www/clients/client0/web9/ssl/max-eckstein.de-le.crt
    SSLCertificateKeyFile /var/www/clients/client0/web9/ssl/max-eckstein.de-le.key
    SSLUseStapling on
    SSLStaplingResponderTimeout 5
    SSLStaplingReturnResponderErrors off
    </IfModule>

    <Directory /var/www/max-eckstein.de/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +SymlinksIfOwnerMatch
    AllowOverride All
    Require all granted
    </Directory>
    <Directory /var/www/clients/client0/web9/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +SymlinksIfOwnerMatch
    AllowOverride All
    Require all granted
    </Directory>




    # cgi enabled
    <Directory /var/www/clients/client0/web9/cgi-bin>
    AllowOverride All
    Require all granted
    </Directory>
    ScriptAlias /cgi-bin/ /var/www/clients/client0/web9/cgi-bin/
    <FilesMatch "\.(cgi|pl)$">
    SetHandler cgi-script
    </FilesMatch>
    # suexec enabled
    <IfModule mod_suexec.c>
    SuexecUserGroup web9 client0
    </IfModule>
    <IfModule mod_fastcgi.c>
    <Directory /var/www/clients/client0/web9/cgi-bin>
    Require all granted
    </Directory>
    <Directory /var/www/max-eckstein.de/web>
    <FilesMatch "\.php[345]?$">
    <If "-f '%{REQUEST_FILENAME}'">
    SetHandler php-fcgi
    </If>
    </FilesMatch>
    </Directory>
    <Directory /var/www/clients/client0/web9/web>
    <FilesMatch "\.php[345]?$">
    <If "-f '%{REQUEST_FILENAME}'">
    SetHandler php-fcgi
    </If>
    </FilesMatch>
    </Directory>
    Action php-fcgi /php-fcgi virtual
    Alias /php-fcgi /var/www/clients/client0/web9/cgi-bin/php-fcgi-*-443-max-eckstein.de
    FastCgiExternalServer /var/www/clients/client0/web9/cgi-bin/php-fcgi-*-443-max-eckstein.de -idle-timeout 300 -socket /var/lib/php5-fpm/web9.sock -pass-header Authorization -pass-header Content-Type
    </IfModule>
    <IfModule mod_proxy_fcgi.c>
    #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php5-fpm/web9.sock|fcgi://localhost//var/www/clients/client0/web9/web/$1
    <Directory /var/www/clients/client0/web9/web>
    <FilesMatch "\.php[345]?$">
    <If "-f '%{REQUEST_FILENAME}'">
    SetHandler "proxy:unix:/var/lib/php5-fpm/web9.sock|fcgi://localhost"
    </If>
    </FilesMatch>
    </Directory>
    </IfModule>


    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
    RewriteRule ^ - [END]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
    AssignUserId web9 client0
    </IfModule>

    <IfModule mod_dav_fs.c>
    # Do not execute PHP files in webdav directory
    <Directory /var/www/clients/client0/web9/webdav>
    <ifModule mod_security2.c>
    SecRuleRemoveById 960015
    SecRuleRemoveById 960032
    </ifModule>
    <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
    </FilesMatch>
    </Directory>
    DavLockDB /var/www/clients/client0/web9/tmp/DavLock
    # DO NOT REMOVE THE COMMENTS!
    # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
    # WEBDAV BEGIN
    # WEBDAV END
    </IfModule>




    </VirtualHost>

    <IfModule mod_ssl.c>
    SSLStaplingCache shmcb:/var/run/ocsp(128000)
    </IfModule>
    [/CODE]
     
  14. muekno

    muekno Active Member HowtoForge Supporter

    Did a --reinstall of php7.3-fpm but there ist still no php7.3-fpm dir, but systemctl status php7.3-fpm looks fine
     
  15. muekno

    muekno Active Member HowtoForge Supporter

    Fixed! Thanks for all the help. After uninstall all of PHP7.0 and adding PHP7.3 to the alternate PHP Version under system and selecting PHP7.3 for the web site I can start at least the typo3 configuration page.
    absolut no idea why it worked before. And it must be running with php7.3 as is the minimum my TYPO3 version needs
     

Share This Page