2011-04-18 112 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