2014-12-22 6 views
0

나는 매일 같은 502 오류가 있지만 그 이유를 찾을 수 없습니다.Nginx + Rails + Unicorn을 사용하는 502 Bad Gateway를 피하는 방법은 무엇입니까?

2014/12/22 16:33:03 [error] 1697#0: *331 upstream prematurely closed connection while reading response header from upstream, client: 105.121.243.92, server: server01.domain.com, request: "GET /doco/in_documents HTTP/1.0", upstream: "http://unix:/tmp/unicorn.docs.sock:/doco/in_documents", host: "go.domain.com:443" 
2014/12/22 16:33:05 [error] 1697#0: *331 connect() failed (111: Connection refused) while connecting to upstream, client: 105.121.243.92, server: server01.domain.com, request: "GET /doco/in_documents HTTP/1.0", upstream: "http://10.213.0.46:80/doco/in_documents", host: "go.domain.com:443" 
2014/12/22 16:33:09 [error] 1697#0: *334 upstream prematurely closed connection while reading response header from upstream, client: 10.212.255.3, server: server01.domain.com, request: "GET /doco/in_documents HTTP/1.1", upstream: "http://unix:/tmp/unicorn.docs.sock:/doco/in_documents", host: "server01.domain.com" 
2014/12/22 16:33:09 [error] 1697#0: *334 connect() failed (111: Connection refused) while connecting to upstream, client: 10.212.255.3, server: server01.domain.com, request: "GET /doco/in_documents HTTP/1.1", upstream: "http://10.213.0.46:80/doco/in_documents", host: "server01.domain.com" 
2014/12/22 16:33:15 [info] 1697#0: *333 client closed connection while waiting for request, client: 10.212.255.3, server: 0.0.0.0:80 
2014/12/22 16:33:15 [info] 1697#0: *335 client closed connection while waiting for request, client: 10.212.255.3, server: 0.0.0.0:80 
2014/12/22 16:33:15 [info] 1697#0: *336 client closed connection while waiting for request, client: 10.212.255.3, server: 0.0.0.0:80 
2014/12/22 16:33:15 [info] 1697#0: *338 client closed connection while waiting for request, client: 10.212.255.3, server: 0.0.0.0:80 
2014/12/22 16:33:15 [info] 1697#0: *337 client closed connection while waiting for request, client: 10.212.255.3, server: 0.0.0.0:80 
2014/12/22 16:33:17 [info] 1697#0: *334 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 10.212.255.3, server: server01.domain.com, request: "GET /doco/in_documents HTTP/1.1", upstream: "http://unix:/tmp/unicorn.docs.sock:/doco/in_documents", host: "server01.domain.com" 
2014/12/22 16:33:19 [info] 1698#0: *343 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 105.121.243.92, server: server01.domain.com, request: "GET /doco/in_documents HTTP/1.0", upstream: "http://unix:/tmp/unicorn.docs.sock:/doco/in_documents", host: "go.domain.com:443" 
2014/12/22 16:33:35 [info] 1698#0: *347 client closed connection while waiting for request, client: 10.212.255.3, server: 0.0.0.0:80 
2014/12/22 16:33:35 [info] 1698#0: *346 client closed connection while waiting for request, client: 10.212.255.3, server: 0.0.0.0:80 

아이디어를 피하는 방법? 다른 질문에서 다른 방법을 시도했지만 효과가 없습니다.

+0

vhost 파일과 유니콘 구성 파일을 게시 할 수 있습니까? – tagCincy

답변

0

오류 로그와 반환 된 상태 (502)에 따르면 한 가지는 업스트림 서버가 응답을 돌려주지 않았 음을 확인하는 것입니다. 업스트림 구성, 주소, 포트 등을 확인하는 것이 좋습니다.

관련 문제