0

I've been running into an issue with PHP-FPM pools not being able to start up if they're not on port 9000. I get the following error when I try to start a second pool on, say, port 9001:

Jun 13 12:40:49 localhost.localdomain systemd[1]: Starting The PHP FastCGI Process Manager... Jun 13 12:40:49 localhost.localdomain php-fpm[12862]: [13-Jun-2014 12:40:49] ERROR: unable to bind listening socket for address '127.0.0.1:8255': Permission denied (13) Jun 13 12:40:49 localhost.localdomain php-fpm[12862]: [13-Jun-2014 12:40:49] ERROR: FPM initialization failed Jun 13 12:40:49 localhost.localdomain systemd[1]: php-fpm.service: main process exited, code=exited, status=78/n/a Jun 13 12:40:49 localhost.localdomain systemd[1]: Failed to start The PHP FastCGI Process Manager. Jun 13 12:40:49 localhost.localdomain systemd[1]: Unit php-fpm.service entered failed state.

I've tried on numerous ports, but the only one that I can get to work at all is port 9000.

I can't find anything to indicate that port 9001 is actually in use on the system. Apache works fine, PHP itself works fine, even FPM works great as long as I'm only on port 9000.

I've encountered this issue on both Fedora 20 and CentOS 6.5.

I've set up two FPM pools, one running on port 9000 and one on another port. Other than that single configuration change, the pools are identical. I've tried running the other port's pool as the same user as port 9000 and a different user; that doesn't seem to make any difference.

Is there a specific setting I'm missing?

3
  • Check your logs, of course. Commented Jun 13, 2014 at 16:34
  • @MichaelHampton I got the error above from /var/log/php-fpm/error.log; it's immediately succeeded by an error stating that FPM initialization failed. Similarly, journalctl gives nothing past what I could find in the FPM error log. I've posted more extended logs above to add some context. Commented Jun 13, 2014 at 16:41
  • @MichaelHampton Never mind! Looks like audit.log had some useful information. Thanks. Commented Jun 13, 2014 at 17:00

1 Answer 1

1

This issue is caused by the port not having the appropriate SELinux security context. Running sudo semanage port -a -t http_port_t -p tcp 8255 would open up port 8255 to be allowed to serve properly.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.