我正在 Openshift RHC v3 上启动并运行一个简单的 NodeJS-Mongo 应用程序(应用程序代码只有 20MB)。我可以看到我的 mongo db 正在运行并且我的节点服务器正在监听。但构建仍在运行中,并未完成。40 分钟后,日志会弹出以下错误:
warning: Failed to remove container "openshift_s2i-build_nodejs-mongo-persistent-
知道这是什么以及需要做些什么来解决它吗?我在 OS v2 上工作过,但 v3 对我来说很难。我是 Kubernetes 新手。我还删除了 healthcheck API,以便它可以运行。直到构建运行 40 分钟后,我才看到任何错误。
任何帮助都会有很大帮助。谢谢你。
编辑:添加更多图片和日志数据:
正如您在图片中看到的,“正在侦听...”是我的控制台,表明它运行良好。
但在日志上方,您可以看到它是“一小时前创建的”
一旦构建失败,如果我尝试查看日志文件,我会看到整个日志被以下内容覆盖:
error streaming logs from build pod: shantikuteer/nodejs-mongo-persistent-3-build container: , container "sti-build" in pod "nodejs-mongo-persistent-3-build" is not available
这里还有我运行时的构建日志的副本:
Pulling image "registry.access.redhat.com/rhscl/nodejs-4-rhel7@sha256:XXXXXXXXXX" ...
---> Installing application source ...
---> Building your Node application from source
npm WARN deprecated connect@2.3.9: connect 2.x series is deprecated
npm WARN deprecated mongodb@1.3.19: Please upgrade to 2.2.19 or higher
> kerberos@0.0.3 install /opt/app-root/src/node_modules/connect-mongoskin/node_modules/mongoskin/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/opt/app-root/src/node_modules/connect-mongoskin/node_modules/mongoskin/node_modules/mongodb/node_modules/kerberos/build'
SOLINK_MODULE(target) Release/obj.target/kerberos.node
SOLINK_MODULE(target) Release/obj.target/kerberos.node: Finished
COPY Release/kerberos.node
make: Leaving directory `/opt/app-root/src/node_modules/connect-mongoskin/node_modules/mongoskin/node_modules/mongodb/node_modules/kerberos/build'
> bson@0.2.2 install /opt/app-root/src/node_modules/connect-mongoskin/node_modules/mongoskin/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/opt/app-root/src/node_modules/connect-mongoskin/node_modules/mongoskin/node_modules/mongodb/node_modules/bson/build'
CXX(target) Release/obj.target/bson/ext/bson.o
make: Leaving directory `/opt/app-root/src/node_modules/connect-mongoskin/node_modules/mongoskin/node_modules/mongodb/node_modules/bson/build'
fs@0.0.1-security node_modules/fs
ejs@2.5.7 node_modules/ejs
mongoskin@2.1.0 node_modules/mongoskin
path@0.12.7 node_modules/path
├── process@0.11.10
└── util@0.10.3 (inherits@2.0.1)
body-parser@1.18.2 node_modules/body-parser
├── content-type@1.0.4
├── bytes@3.0.0
├── depd@1.1.1
├── qs@6.5.1
├── on-finished@2.3.0 (ee-first@1.1.1)
├── raw-body@2.3.2 (unpipe@1.0.0)
├── http-errors@1.6.2 (setprototypeof@1.0.3, inherits@2.0.3, statuses@1.4.0)
├── debug@2.6.9 (ms@2.0.0)
├── iconv-lite@0.4.19
└── type-is@1.6.15 (media-typer@0.3.0, mime-types@2.1.17)
express@4.16.2 node_modules/express
├── content-type@1.0.4
├── escape-html@1.0.3
├── array-flatten@1.1.1
├── setprototypeof@1.1.0
├── cookie-signature@1.0.6
├── utils-merge@1.0.1
├── encodeurl@1.0.1
├── merge-descriptors@1.0.1
├── methods@1.1.2
├── fresh@0.5.2
├── etag@1.8.1
├── parseurl@1.3.2
├── path-to-regexp@0.1.7
├── vary@1.1.2
├── serve-static@1.13.1
├── range-parser@1.2.0
├── cookie@0.3.1
├── content-disposition@0.5.2
├── statuses@1.3.1
├── safe-buffer@5.1.1
├── depd@1.1.1
├── qs@6.5.1
├── on-finished@2.3.0 (ee-first@1.1.1)
├── finalhandler@1.1.0 (unpipe@1.0.0)
├── debug@2.6.9 (ms@2.0.0)
├── proxy-addr@2.0.2 (forwarded@0.1.2, ipaddr.js@1.5.2)
├── send@0.16.1 (destroy@1.0.4, ms@2.0.0, mime@1.4.1, http-errors@1.6.2)
├── type-is@1.6.15 (media-typer@0.3.0, mime-types@2.1.17)
└── accepts@1.3.4 (negotiator@0.6.1, mime-types@2.1.17)
mongodb@2.2.33 node_modules/mongodb
├── es6-promise@3.2.1
├── readable-stream@2.2.7 (inherits@2.0.3, buffer-shims@1.0.0, process-nextick-args@1.0.7, util-deprecate@1.0.2, core-util-is@1.0.2, isarray@1.0.0, string_decoder@1.0.3)
└── mongodb-core@2.1.17 (require_optional@1.0.1, bson@1.0.4)
universal-analytics@0.4.16 node_modules/universal-analytics
├── uuid@3.1.0
└── request@2.83.0 (aws-sign2@0.7.0, forever-agent@0.6.1, tunnel-agent@0.6.0, oauth-sign@0.8.2, safe-buffer@5.1.1, is-typedarray@1.0.0, caseless@0.12.0, stringstream@0.0.5, aws4@1.6.0, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.1, performance-now@2.1.0, qs@6.5.1, mime-types@2.1.17, combined-stream@1.0.5, tough-cookie@2.3.3, form-data@2.3.1, hawk@6.0.2, http-signature@1.2.0, har-validator@5.0.3)
moment@2.19.4 node_modules/moment
mongoose@4.13.7 node_modules/mongoose
├── ms@2.0.0
├── lodash.get@4.4.2
├── sliced@1.0.1
├── regexp-clone@0.0.1
├── hooks-fixed@2.0.2
├── muri@1.3.0
├── mpromise@0.5.5
├── kareem@1.5.0
├── mpath@0.3.0
├── bson@1.0.4
├── mquery@2.3.3 (sliced@0.0.5, debug@2.6.9, bluebird@3.5.0)
└── async@2.1.4 (lodash@4.17.4)
connect-mongoskin@0.1.2 node_modules/connect-mongoskin
├── connect@2.3.9 (fresh@0.1.0, bytes@0.1.0, crc@0.2.0, cookie@0.0.4, qs@0.4.2, debug@3.1.0, send@0.0.3, formidable@1.0.11)
└── mongoskin@0.6.1 (mongodb@1.3.19)
Running post commit hook ...
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
> OpenShift-Sample-App@1.0.0 test /opt/app-root/src
> node server.js
Listening ........
编辑:添加更多图片 -
我的应用程序中没有包含任何运行状况检查 API,并且从 Openshift 部署中删除了相同的 API。