Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Challenges with PHP-FPM: FCGI: attempt to connect to Unix domain socket fail

Discussion in 'EasyApache' started by billmcollam, May 13, 2017.

  1. billmcollam

    billmcollam Member

    Joined:
    Jan 12, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Ontario Canada
    cPanel Access Level:
    Reseller Owner
    My problem is similar to the one on this thread, but the not entirely - so I created this new thread.

    I wanted to override the fpm pool config. So I updated /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml as so:

    Code:
    pm: dynamic
    pm_max_children: 25
    pm_spare_servers: 2
    pm_start_servers: 2
    pm_max_spare_servers: 3
    pm_max_requests: 250
    pm_process_idle_timeout: 10
    slowlog: /var/logs/apache2/slowlog
    request_slowlog_timeout: { name: 'php_admin_value[request_slowlog_timeout]', value: 10s }
    And /var/cpanel/ApachePHPFPM/system.yaml:

    Code:
    daemonize: yes
    emergency_restart_threshold: 10
    emergency_restart_interval: 1m
    process_control_timeout: 10
    I then ran /scripts/php_fpm_config --rebuild --domain=mydomain.com

    This semed to go okay:
    Code:
    root@vps [/var/cpanel/ApachePHPFPM]# /scripts/php_fpm_config --rebuild --domain=mydomain.com
    info [php_fpm_config] rebuild_files: working on domain (mydomain.com)
    info [php_fpm_config] php-fpm: rebuild_files: restart fpm services for Apache
    info [php_fpm_config] php-fpm: fpm services restarted
    info [php_fpm_config] Rebuilding apache conf
    info [php_fpm_config] ensure_all_fpm_versions_start_on_reboot: started
    info [php_fpm_config] php-fpm: rebuild_files: attempting to have ea-php71-php-fpm start on reboot
    info [php_fpm_config] ensure_all_fpm_versions_start_on_reboot: completed
    But I immediately got the following errors in the apachelog

    Code:
    [Sat May 13 12:38:18.315586 2017] [proxy:error] [pid 20550:tid 139889074964224] (2)[B]No such file or directory[/B]: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php71/root/usr/var/run/php-fpm/e052082a6e5649ecf631cbb5460a54c838adacd4.sock (*) failed
    [Sat May 13 12:38:18.315669 2017] [proxy_fcgi:error] [pid 20550:tid 139889074964224] [client 213.233.148.8:57683] AH01079: failed to make connection to backend: httpd-UDS, referer: xxxxxx
    [Sat May 13 12:38:19.648054 2017] [proxy:error] [pid 20493:tid 139889179862784] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php71/root/usr/var/run/php-fpm/e052082a6e5649ecf631cbb5460a54c838adacd4.sock (*) failed
    Per the other thread - I did check that the directorys and files for the sockets existed. They did. So I'm not sure how to approach?
     
    #1 billmcollam, May 13, 2017
    Last edited by a moderator: May 13, 2017
  2. billmcollam

    billmcollam Member

    Joined:
    Jan 12, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Ontario Canada
    cPanel Access Level:
    Reseller Owner
    I also looked at the socket.... and all seemed to be in order.. myuser is the domain owner. (not sure what that '=' sign is at the end though.)

    srw-rw---- 1 myuser nobody 0 May 13 17:13 e052082a6e5649ecf631cbb5460a54c838adacd4.sock=
     
  3. billmcollam

    billmcollam Member

    Joined:
    Jan 12, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Ontario Canada
    cPanel Access Level:
    Reseller Owner
    Consider this solved. Although I'm still not positive why. I eventually started overriding the specific domain pool instead of the system pool. Had the same problem... so I changed one config option at a time. Each one worked fine until I had them all the way I wanted. In retrospect - I must have had some kind of formatting issue in the beginning... (I was cutting and pasting from a text file via putty-ssh).
     
  4. cPanelJasonT

    cPanelJasonT Level 2 Technical Analyst
    Staff Member

    Joined:
    Oct 21, 2014
    Messages:
    55
    Likes Received:
    6
    Trophy Points:
    83
    cPanel Access Level:
    Root Administrator
    Hello,
    Thank you for the update. Formatting is important, and sometimes when pasting into PuTTY it is easy to paste in extra characters.
     
Loading...

Share This Page