2

Nearly two weeks I'm stuck with this LEMP problem in which I get only one error anywhere and I don't feel this error helps me to solve my problem:

*1 connect() failed (111: Connection refused) while connecting to upstream,
client: MY_IP_ADDRESS, server: example.com, request: "GET /
HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000".

nginx -t, access.log, and /etc/init.d/php*-fpm status returns no additional errors.

It's not the first time I get a "vague" connection refused error from Nginx while no other error log indicates what might be the source of the problem:

How to further debug Nginx in such circumstances?

BTW, I tried to contact the Nginx developers on this but they have shutted down any reasonable option to contact them (for example, they don't get emails from Gmail senders or GitHub issues).

1
  • You got what looks like a reasonable answer on that question 6 hours ago. Have you tried that suggestion? If you want help on Server Fault we ask that you include relevant configurations here, rather than links to other sites.
    – Tim
    Commented Apr 27, 2018 at 18:11

1 Answer 1

3

Your nginx config specifies that it is supposed to connect to PHP-FPM using TCP to 127.0.0.1:9000 but your PHP-FPM config specifies that it doesn't listen on TCP port 9000 but instead uses unix socket /run/php/php7.0-fpm.sock so you get connection refused.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .