node.js - 'express' 的 Openshift haproxy 错误没有可用的服务器

标签 node.js express openshift haproxy

我从 Openshift 创建了一个基本的 Nodejs 应用程序,并且随机地,该服务在几天内自行终止了几次。我的 Nodejs 模块没有错误消息,但仅在自动安装的 haproxy 中。

来自 haproxy.log 的消息是:

[WARNING] 184/001333 (193501) : Server express/local-gear is DOWN for maintenance.
[WARNING] 184/010106 (483047) : config : log format ignored for proxy 'stats' since it has no log address.
[WARNING] 184/010106 (483047) : config : log format ignored for proxy 'express' since it has no log address.
[WARNING] 184/010106 (483047) : Server express/local-gear is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 184/010106 (483047) : proxy 'express' has no server available!
[WARNING] 184/010110 (483047) : Server express/local-gear is DOWN for maintenance.
[WARNING] 184/010115 (483047) : Server express/local-gear is UP (leaving maintenance).
[WARNING] 184/010116 (483047) : Server express/local-gear is DOWN, reason: Layer7 wrong status, code: 500, info: "Internal Server Error", check duration: 43ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 184/010116 (483047) : proxy 'express' has no server available! 

haproxy_ctld.log

E, [2014-07-03T12:12:59.557445 #97055] ERROR -- : Could not connect to the application.  Check if the application is stopped.
E, [2014-07-03T12:13:04.557968 #97055] ERROR -- : Could not connect to the application.  Check if the application is stopped.
E, [2014-07-03T12:13:09.558480 #97055] ERROR -- : Could not connect to the application.  Check if the application is stopped.

最佳答案

检查:Openshift Layer4 connection, App Won't Start

问题可能是您在 express 应用程序的根目录中没有提供任何服务,因此您需要修改 haproxy 配置文件,找到提到 express 和 httpchk 的文件,并将/更改为响应请求的内容。

或者,只需在/上提供一些东西,这样 HAProxy 就不会继续重新启动您的服务。

关于node.js - 'express' 的 Openshift haproxy 错误没有可用的服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24570032/

相关文章:

angularjs - 如果我使用自定义 id 在 mongoDB 中插入记录,则无法通过 findOne() 获取记录

java - Tomcat 不适用于 openshift origin。无法加载 server.xml

javascript - Nodejs可以处理的负载是多少

javascript - 检查 Jest 中数组不包含虚假值

javascript - 对 mongoose 返回的结果使用 lodash 时输出不正确

java - OpenShift:Java maven build "Generic Build failure"但日志显示没有错误

java - 想要在 openshift 上托管 JAVA 中的原始套接字程序

javascript - 如何使用 browserify 和 gulp 输出多个包

node.js - Socket.io 实时聊天——管理用户好友

node.js - 如何使用 Nginx 在 MEAN 堆栈应用程序上正确设置 HTTPS/SSL