J
J
Jamiroquai2017-12-17 19:01:27
Nginx
Jamiroquai, 2017-12-17 19:01:27

502 Bad Gateway nginx/1.10.3 (Ubuntu)?

I'm trying to deploy a Rails project using pumu.
I get a 502 error in the browser when I try to open a page by ip address, but the page is not found at all by the server name.
It gives the following error in the logs:

2017/12/17 20:46:08 [error] 12589#12589: *4 connect() failed (113: No route to host) while connecting to upstream, client: 10.50.60.2, server: 10.12.4.245, request: "GET /favicon.ico HTTP/1.1", upstream: "http://10.12.4.245:80/favicon.ico", host: "10.12.4.242", referrer: "http://10.12.4.242/"

Puma is running and so is nginx.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vreitech, 2017-12-17
@fzfx

The ip address of the server that nginx is trying to connect to by the client belongs to a different subnet than the ip address of the nginx server, and there is no route to this subnet on the nginx server. you need to either fix the subnet mask on one or both servers, or the ip address on one or both servers, or figure out the routing between these two subnets.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question