0

I am getting a simple NodeJS-Mongo Application (Application code is just 20MB) up and running on the Openshift RHC v3. I can see that my mongo db is running and my node server is listening. But the Build is still on a run and does not complete. After 40mins the logs popup with the following error :

warning: Failed to remove container "openshift_s2i-build_nodejs-mongo-persistent-

Any idea what this is and what needs to be done to fix it? I have worked on OS v2 but v3 is turning out difficult to me. I am new to Kubernetes. I also removed the healthcheck API so that it can just run. I don't see any errors until post 40mins of the build running.

Any help would greatly help. Thank you.

EDIT: Adding some more pictures and log data :

As you can see in the image, 'Listening...' is my console which indicates it's running fine.

But above the log you can see it was 'created an hour ago'

Once the build fails if I try to view the log file I see that the whole log gets overwritten with the following :

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

Also here's a copy of my build log when it's running :

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 ........

EDIT : Adding some more pictures -

After an hour the build throws only this error

When I try to open the logs / click on View Logs

I have not included any healthcheck APIs in my application and same is removed from Openshift Deployments.

  • can you provide the logs of the pod? what are the other logs for containers ? – Suresh Vishnoi Dec 09 '17 at 16:34
  • Which OpenShift environment are you using? Is this Online Starter? If so which exact cluster? You can find the cluster name as part of the URL for the web console. – Graham Dumpleton Dec 09 '17 at 20:42
  • @GrahamDumpleton : Yes Openshift v3 Starter - S West (California) -us-west-1. – Shreyas Gombi Dec 11 '17 at 07:28
  • @SureshVishnoi : After 40-50mins of running the build it only throws the above error, i.e. `warning: Failed to remove container "openshift_s2i-build_nodejs-mongo-persistent-` – Shreyas Gombi Dec 11 '17 at 07:30
  • Is it reliably still happening? The end of last week they were still finishing up some upgrades and configuration changes so you might have been caught up in that. Also, your language is confusing. The build and deployment are separate steps. Is the build failing, or the deployment. Given you also have MongoDB, have you set the deployment strategy for the node application deployment to Recreate. If you don't you will not have enough resources to do a new deployment and it can hang. – Graham Dumpleton Dec 11 '17 at 07:44
  • @GrahamDumpleton It's only the build, I haven't mentioned anything about deployment yet, I haven't reached there. :P :P – Shreyas Gombi Dec 11 '17 at 11:34
  • As I asked, is it still failing all the time? If it is in the build, what do the last part (dozen lines) of the build logs show? – Graham Dumpleton Dec 11 '17 at 19:56
  • Yes, it's failing all the time. I updated the question with the whole log. @GrahamDumpleton – Shreyas Gombi Dec 12 '17 at 08:05
  • The last message of ``Listening ........`` suggests that however you have setup your source code is automatically trying to run the node server after it has installed the packages. Not sure if this is to do tests, or it is trying to run the real application. Either way you can't do that. Make sure you don't have any hooks setup to run up the node server when packages are being installed. – Graham Dumpleton Dec 12 '17 at 11:54
  • If the message ``Running post commit hook`` is actually due to OpenShift ``postCommit`` hook, disable that, as your tests are the problem. Edit the YAML in the web console and find the ``postCommit`` section and remove it. – Graham Dumpleton Dec 12 '17 at 11:55
  • You can probably do that by running ``oc set build-hook bc/yourappname --post-commit --remove``. – Graham Dumpleton Dec 12 '17 at 11:57

0 Answers0