OpenShift:“执行控制失败".在节点上的应用 [英] OpenShift: "Failed to execute control start" on node application

查看:82
本文介绍了OpenShift:“执行控制失败".在节点上的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我事先意识到这是一个模糊的问题,但是我对在这里还能尝试什么感到困惑……

I realize in advance this is kind of a vague question, but I'm stumped as to what else I can try here...

我一直在研究其他SO问题并遵循他们的建议,但到目前为止,还没有任何问题可以解决我的问题.

I've been going through other SO questions and following their recommendations but so far nothing has solved my issue yet.

这是我遇到的具体错误.

Here's the specific error I'm getting.

Stopping NodeJS cartridge
Fri Jul 10 2015 10:36:28 GMT-0400 (EDT): Stopping application 'appname' ...
Fri Jul 10 2015 10:36:29 GMT-0400 (EDT): Stopped Node application 'appname'

Starting NodeJS cartridge
Fri Jul 10 2015 10:36:30 GMT-0400 (EDT): Starting application 'appname' ...

Waiting for application port (8080) become available ...

Application 'appname' failed to start (port 8080 not available)

Failed to execute: 'control restart' for /var/lib/openshift/MYID/nodejs

我的package.json文件是最新的,将保留我的所有依赖关系,具有scripts: { start: 'node server.js' }属性,但是我仍然遇到此错误.

My package.json file is up to date will all my dependencies, has the scripts: { start: 'node server.js' } property and yet I'm still getting this error.

如果我通过SSH进入我的current/repo目录并运行node server.js,它将正常工作.但是,我不能只使用screen永久在后台运行它.

If I SSH in and go to my current/repo directory and run node server.js it works fine. However, I can't just use screen to run it in the background forever.

我也尝试过通过浏览器停止和重新启动,git push和重新启动.我为我还能尝试使我的(非常简单的)节点应用程序在OpenShift上运行而感到困惑.

I've also tried for stopping and restarting, git pushing, and restarting through the browser. I'm stumped as to what else I can try to get my (very simple) node application running on OpenShift.

任何建议都值得赞赏.

推荐答案

对于OpenShift Node应用程序,您需要将启动脚本指定为:main: "server.js"而不是使用scripts.这是由于使用 node-supervisor 在OpenShift上启动Node应用程序的方式.

For an OpenShift Node app you need to specify the start script as: main: "server.js" instead of using scripts. This is due to the way Node applications are started on OpenShift using node-supervisor.

这篇关于OpenShift:“执行控制失败".在节点上的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆