'HTTP: failed to make connection to backend: localhost

/var/log/apache2/error.log:[Thu Jul 12 14:52:47.565151 2018] [proxy:error] pid 29746:tid 139938330822400Connecti on refused: AH00957: HTTP: attempt to connect to [::1]:3001 (localhost) failed /var/log/apache2/error.log:[Thu Jul 12 14:52:47.565213 2018] [proxy:error] [pid 29746:tid 139938330822400] AH00959: app roxyconnectbackend disabling worker for (localhost) for 60s /var/log/apache2/error.log:[Thu Jul 12 14:52:47.565220 2018] [proxyhttp:error] [pid 29746:tid 139938330822400] [client 123.136.118.89:31478] AH01114: HTTP: failed to make connection to backend: localhost, referer: https://sizzia.com/login. html /var/log/apache2/error.log:[Thu Jul 12 14:52:50.786689 2018] [proxy:error] [pid 29746:tid 139938435008256] AH00940: HTTP : disabled connection for (localhost)

things checked: 1)apache2 is active 2) ps aux | grep node" result:

son 30660 0.0 0.0 14224 936 ttyS0 S+ 15:14 0:00 grep --color=auto node

Process -user able to log in into dashboard

Current result -browser gave output 503 -maintain in log in page

background process is not working and browser show 503 error service unavailable.. did googling and still not working..



Solution 1:[1]

I had problem with docker-composer.yml port settings. I downloaded Wordpress docker ready version and did not notice the port settings were different to what I am used to.
Here is what I had (-) and what I changed (+) to fix it:

-      - ${IP}:8100:80 # before fix
+      - 8100:80       # after fix !!!

This command led me to the solution of the issue: netstat --tcp --listen --numeric-ports.

Before fix:

me@digitalocean:~$ netstat --tcp --listen --numeric-ports
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:8100          0.0.0.0:*               LISTEN

me@digitalocean:~$ nc -vz localhost 8100
nc: connect to localhost port 8100 (tcp) failed: Connection refused 

After fix:

me@digitalocean:~$ netstat --tcp --listen --numeric-ports
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp6       0      0 [::]:8100               [::]:*                  LISTEN 

me@digitalocean:~$ nc -vz localhost 8100
Connection to localhost 8100 port [tcp/*] succeeded!   

To restart docker don't forget to docker-composer down; docker-composer up -d

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nedvajz