我一直在nginx.error.log中收到此错误:2016/06/06 20:14:02 [error] 907#0: *1 connect() to unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock failed (111: Connection refused) while conne...
我一直在nginx.error.log中收到此错误:
2016/06/06 20:14:02 [error] 907#0: *1 connect() to unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock failed (111: Connection refused) while connecting to upstream, client: 50.100.162.19, server: , request: "GET / HTTP/1.1", upstream: "http://unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock:/", host: "appname.com"
(here it is with manually added newlines for your convenience)
2016/06/06 20:14:02 [error] 907#0: *1 connect() to
unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock failed
(111: Connection refused) while connecting to upstream, client:
50.100.162.19, server: , request: "GET / HTTP/1.1", upstream:
"http://unix:///home/user/apps/appname/shared/tmp/sockets/appname-
puma.sock:/", host: "appname.com"
这是我的nginx.conf:
upstream puma {
server unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock;
}
server {
listen 80 default_server deferred;
# server_name example.com;
root /home/user/apps/appname/current/public;
access_log /home/user/apps/appname/current/log/nginx.access.log;
error_log /home/user/apps/appname/current/log/nginx.error.log info;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://puma;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}
我究竟做错了什么?
我跟着Digital Ocean’s tutorial设立了Capistrano,Nginx和Puma.
解决方法:
所以解决方案是重启puma.
cap production deploy:restart
每次我重启服务器,我都需要重启puma.
沃梦达教程
本文标题为:ruby-on-rails-4 – Rails / Nginx / Capistrano / Puma:(111:连接被拒绝)连接到上游
基础教程推荐
猜你喜欢
- R语言-如何将科学计数法表示的数字转化为文本 2022-11-23
- swift 字符串String的使用方法 2023-07-05
- R语言数可视化Split violin plot小提琴图绘制方法 2022-12-10
- ruby-on-rails-使用Nginx的Rails的多阶段环境 2023-09-21
- Go web部署报错panic: listen tcp xxxxxxx:8090: bind: cannot assign requested address 2023-09-05
- asm基础——汇编指令之in/out指令 2023-07-06
- UEFI开发基础HII代码示例 2023-07-07
- R包ggtreeExtra绘制进化树 2022-12-14
- swift版webview加载网页进度条效果 2023-07-05
- R语言基于Keras的MLP神经网络及环境搭建 2022-12-10