• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

php-fpm.sock failed (13: Permission denied) while connecting to upstream

AbramS

Basic Pleskian
I recently acquired a brand-new CentOS 6.3 VPS with Plesk 11.0 pre-installed. After getting everything up and running and installing some additional PHP versions I noticed that Nginx worked but Nginx with PHP-FPM enabled caused 502 Bad Gateway errors.

Today I took the time to completely reinstall following these steps:
1. Reinstall CentOS6.3 / Plesk Image.
2. Activate Plesk panel 11.0
3. Yum Update all system and package files.
4. Update to Plesk 11.5.30 Update #8
5. Enable RoundCube through 'Add or Remove Components'
6. Check if all components are up to date through the panel
7. Check yum update once more
8. Install Remi and EPEL repo's and give them low priorities to prevent them updating all sorts of files.
9. Install PHP-FPM through 'Add or Remove Components'
10. Create new service plan
11. Create test domain inspyred.nl
12. Enable 'Serve static files directly by nginx' and 'Process PHP by nginx'
13. Create info.php (<?php phpinfo(); ?>) inside the default 'test' folder.
14. Navigate to inspyred.nl/test/info.php

The results remains the same: 502 bad gateway.

I then checked /var/log/php-fpm/error.log for errors:
Code:
[29-Jul-2013 18:24:50] NOTICE: fpm is running, pid 4682
[29-Jul-2013 18:24:50] NOTICE: ready to handle connections
Requested PHP-FPM status:
Code:
php-fpm (pid  4682) is running...
Restarted PHP-FPM:
Code:
Stopping php-fpm:                                          [  OK  ]
Starting php-fpm:                                          [  OK  ]
Requested nginx status:
Code:
nginx (pid  2570) is running...
Restarted nginx:
Code:
Starting nginx:                                            [  OK  ]
And finally checked /var/log/nginx/error.log for errors and found:
Code:
2013/07/29 18:29:04 [crit] 4592#0: *89 connect() to unix:/var/www/vhosts/system/inspyred.nl/php-fpm.sock failed (13: Permission denied) while connecting to upstream, client: xx.xx.xx.xx, server: inspyred.nl, request: "GET /test/info.php HTTP/1.1", upstream: "fastcgi://unix:/var/www/vhosts/system/inspyred.nl/php-fpm.sock:", host: "inspyred.nl"

I had already seen this in the previous installation so I have already tried adding additional group rights to nginx...

How can I fix this?
 
Thanks Nikolay that was the required change!

Do you also know of a way of keeping SELinux in 'enforcing' mode and having PHP-FPM work? Or is Plesk 11.5 safe enough without SELinux in enforce-mode?
 
If you would pull relevant records from audit.log that would help Parallels fix Plesk SELinux policy and/or generate additional rules you can apply for the time being. You can also use audit2allow utility to do that yourself.

That said it is a common recommendation to disable SELinux on servers with Plesk since there are often such kind of hiccups.
 
Okey, looks like I have managed to reproduce the issue.
Fix will be released later. (In one of the future updates for 11.5.30)
 
Last edited:
Back
Top