keeps getting 'failed to connect to server' errors after cPanel server configuration changes, totally stuck
hey folks, following up on my earlier post about cPanel issues. I thought i'd fixed the initial problem, but now after trying to tweak some server configuration settings in WHM for better performance, i'm getting a new, more frustrating error.
basically, all the sites on this cPanel account are showing 'failed to connect to server' or just timing out. it's like the entire web server isn't responding or something. i've restarted Apache multiple times, checked firewall rules, but nothing seems to help. this happens right after I changed some php-fpm settings and optimized a few things in the WHM server configuration options. here's a snippet from the Apache error log:
[Mon Dec 18 10:30:01.123456 2023] [core:error] [pid 12345:tid 1234567890] (111)Connection refused: [client 192.168.1.100:54321] AH00078: Could not fetch response header from backend.
[Mon Dec 18 10:30:01.123456 2023] [proxy:error] [pid 12345:tid 1234567890] AH00959: ap_proxy_connect_backend disabling connection for (example.com:80) for 5s
[Mon Dec 18 10:30:01.123456 2023] [proxy_fcgi:error] [pid 12345:tid 1234567890] (111)Connection refused: AH01079: failed to make connection to backend: http://127.0.0.1:9000/
anyone ever seen this after making server configuration changes?
1 Answers
Evelyn Johnson
Answered 5 hours agoThat 'Connection refused' error from http://127.0.0.1:9000/ is a clear indicator that your PHP-FPM service isn't correctly communicating with Apache. It sounds like you're hitting a common wall after tweaking your server configuration, particularly those php-fpm settings. (By the way, just a quick tip for forum posts, 'I'm getting' usually starts with a capital 'I' for better readability.)
The issue is almost certainly related to your PHP-FPM pools or the service itself not running or listening correctly. Here's a structured approach to troubleshoot this on your cPanel server management setup:
- Check PHP-FPM Service Status: Connect to your server via SSH and run
systemctl status php-fpm(orsystemctl status ea-php##-php-fpm, replacing '##' with your PHP version, e.g.,ea-php74-php-fpm). Ensure the service is active and running. If it's not, try starting it withsystemctl start ea-php##-php-fpm. - Verify PHP-FPM Configuration: Review your PHP-FPM configuration. In WHM, go to MultiPHP Manager and ensure the correct PHP-FPM version is assigned to the affected domains. Also, check MultiPHP INI Editor for any custom settings that might be causing conflicts. The Apache error log indicates it's trying to connect to
127.0.0.1:9000. Verify your PHP-FPM pool configuration (often found in/etc/php-fpm.d/) is set to listen on this specific port, or if it's configured for a Unix socket, ensure Apache is configured to use that. - Port Listening Check: Use
netstat -tulnp | grep 9000via SSH to confirm if any process is actually listening on port 9000. If nothing shows up, PHP-FPM isn't bound to that port. - Revert or Rebuild: If you recall the specific `php-fpm settings` you changed, try reverting them. A more robust solution, if you're unsure, is to use WHM's EasyApache 4. Go to Home ยป Software ยป EasyApache 4, reprovision your PHP profiles, and ensure all necessary PHP-FPM packages are installed and configured correctly for your chosen PHP versions. This can often resolve broken PHP-FPM configuration issues by rebuilding the environment.