Apache proxy connection error: backend service unavailable

I’m experiencing a 503 service unavailable error when trying to access my web application. The Apache error logs indicate connection issues to my backend service.

Error details from the logs:

[Mon Aug 15 09:23:12.789456 2023] [proxy:error] [pid 12345:tid 140567891234567]
Connection refused: AH00957: HTTP: attempt to connect to [::1]:8080 (backend-server) failed
[Mon Aug 15 09:23:12.789523 2023] [proxy:error] [pid 12345:tid 140567891234567]
AH00959: app-proxy connection backend disabling worker for (backend-server) for 60s
[Mon Aug 15 09:23:12.789531 2023] [proxyhttp:error] [pid 12345:tid 140567891234567]
[client 192.168.1.100:45678] AH01114: HTTP: failed to make connection to backend: backend-server

What I’ve checked:

  • The Apache service is active
  • Verified Node.js processes with ps aux | grep node, but only see the grep command itself
  • Users can log into the dashboard but are stuck there

Current state:

  • The browser shows a 503 error
  • Users are still on the login page
  • It seems that the backend application is down

I have tried different solutions online, but nothing has resolved the issue. It appears the backend process is not running. How should I approach troubleshooting this connection problem to restore functionality to my application?

hmm, sounds like your node.js backend just died on you - that’s why ps aux isn’t showing anything. have you checked what actually killed it? maybe check journalctl or your app logs to see if it crashed? also curious, are you using pm2 or systemd to manage the backend process?

your backend definitley crashed mate. try restarting the node service manually first - sudo systemctl restart your-node-service or just node app.js if you dont have it as a service. also check if port 8080 is actually free with sudo netstat -tlnp

The error logs clearly show Apache cannot establish a connection to your backend service on port 8080. Since your Node.js process appears to be completely stopped, start by checking if something is already bound to that port using netstat -tlnp | grep 8080 or lsof -i :8080. If the port is free, examine your application’s startup script and configuration files to ensure they point to the correct port and interface. Before restarting your Node.js application, verify the application code itself by testing it independently outside of the Apache proxy setup. Once you confirm the backend starts properly and listens on the expected port, Apache should be able to establish the proxy connection successfully.