2011-04-18 111 views
12

我的獨角獸服務器運行良好,但已停止工作,我無法弄清楚如何讓它重新啓動。獨角獸nginx上游服務器不啓動

 
2011/04/18 15:23:42 [error] 11907#0: *4 connect() to unix:/tmp/sockets/unicorn.sock failed (111: Connection refused) while connecting to upstream, client: 71.131.237.122, server: localhost, request: "GET/HTTP/1.1", upstream: "http://unix:/tmp/sockets/unicorn.sock:/", host: "tacitus" 

我的配置文件是在:https://gist.github.com/926006

任何幫助,以什麼我的故障排除方法應該是將不勝感激。

最好,

+0

我有同樣的問題,你也許找到這個錯誤的原因? – sparrovv 2011-10-27 14:57:51

+0

這個ServerFault的問題似乎涵蓋了相同的主題: http://serverfault.com/questions/398972/need-to-increase-nginx-throughput-to-an-upstream-unix-socket-linux-kernel -tun – Tilo 2012-12-13 23:32:48

+0

請看看這個教程http://haidrali.com/lets-debug-nginx-unicorn-errors/ – 2015-10-15 19:00:44

回答

8

我曾與nginx的和麒麟設置類似的問題。

每天我在nginx的error.log中此錯誤看到

failed (11: Resource temporarily unavailable) while connecting to upstream 

我固定它是Unix套接字更改爲TCP套接字的方式。

這樣反而

upstream unicorn_app { 
    server unix:/tmp/sockets/unicorn.sock fail_timeout=0; 
} 

現在,我使用

upstream unicorn_app { 
    server 127.0.0.1:3000 fail_timeout=0; 
} 

希望它會幫助別人。

+7

我不明白這是怎麼解決這個問題的...... – Tilo 2012-12-13 22:50:03

+0

如果你有「unicorn_app」,這只是應用程序本身的名稱?或者你的意思是把字面意義上的「unicorn_app」放在那裏? – 2015-02-03 15:03:39