Description of problem: Should not give out error message when running 'mongo' command with correct parameters in the application Version-Release number of selected component (if applicable): puddle [2.1.1/2014-05-29.3] rubygem-openshift-origin-node-1.23.9.8-1.el6op.noarch How reproducible: 100% Steps to Reproduce: 1.Create a app with mongo cartridge #rhc app create nodejs nodejs mongo -s 2.access the database in the app >set -x >mongo -u $OPENSHIFT_MONGODB_DB_USERNAME -p $OPENSHIFT_MONGODB_DB_PASSWORD 538d7121a9c071d2420002a1-test.ose21-auto.com.cn:53676/nodejs Actual results: Output: + scl enable mongodb24 'mongo -u' admin -p 5tdzukdgS5va 538d7121a9c071d2420002a1-test.ose21-auto.com.cn:53676/xiaom3 Unable to open /etc/scl/prefixes/mongo -u! Expected results: Should connect the database Additional info:
"mongo" is pretty broken regardless. If you invoke the scl directly it is still missing something. I've tried this with a nodejs app, a python 3.3 app, and a python 2.6 app: $ scl enable mongodb24 v8314 "mongo -u $OPENSHIFT_MONGODB_DB_USERNAME -p $OPENSHIFT_MONGODB_DB_PASSWORD mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/$OPENSHIFT_APP_NAME" MongoDB shell version: 2.4.9 connecting to: mongodb://538d1e3be659c5effb000032-demo.openshift.example.com:41766/py26 Mon Jun 2 21:05:44.251 Assertion failure _setName.size() src/mongo/client/dbclientinterface.h 211 0x699181 0x67a03f 0x664d36 0x5c64a0 0x5ba1ad 0x6540bf 0x6377ce 0x7f11429f3b12 0x388e9f20618e mongo(_ZN5mongo15printStackTraceERSo+0x29) [0x699181] mongo(_ZN5mongo10logContextEPKc+0x5e) [0x67a03f] mongo(_ZN5mongo12verifyFailedEPKcS1_j+0x124) [0x664d36] mongo(_ZN5mongo16ConnectionStringC1ENS0_14ConnectionTypeERKSsS3_+0x148) [0x5c64a0] mongo(_ZN5mongo16ConnectionString5parseERKSsRSs+0xb1) [0x5ba1ad] mongo(_ZN5mongo17mongoConsExternalEPNS_7V8ScopeERKN2v89ArgumentsE+0x28c) [0x6540bf] mongo(_ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE+0x136) [0x6377ce] /opt/rh/v8314/root/usr/lib64/libv8.so.v8314-3.14.5(+0xb2b12) [0x7f11429f3b12] [0x388e9f20618e] Mon Jun 2 21:05:44.253 Error: assertion src/mongo/client/dbclientinterface.h:211 at src/mongo/shell/mongo.js:147 exception: connect failed I thought it might be something to do with invoking an SCL inside an SCL invocation, but given the same thing occurred in a python-2.6 gear, I don't think that's the case. This could just be an upstream bug, or more likely something else about the gear environment is lacking.
I think the problem in Comment #3 is a mongo client bug: https://jira.mongodb.org/browse/SERVER-3254 If you take mongodb:// off the example above it works as expected. I still think we should fix the original problem. However, given there are workarounds for people that need to do clever things and there's a 'mongo' shell function that magically works I'm lowering the priority for this to medium.
I didn't run "mongo" command on openshift, but I run nodejs scripts for cron jobs. And it suddenly broke after June 4 with the same error message, even I didn't change anything. Below is the part of the logs: __________________________________________________________________________ Wed Jun 4 12:01:26 EDT 2014: START hourly cron run __________________________________________________________________________ /var/lib/openshift/5372405fe0b8cd5ad30000b6/app-root/runtime/repo//.openshift/cron/hourly/search-on-web.js: ...... __________________________________________________________________________ Wed Jun 4 12:01:33 EDT 2014: END hourly cron run - status=0 __________________________________________________________________________ __________________________________________________________________________ Fri Jun 6 12:01:28 EDT 2014: START hourly cron run __________________________________________________________________________ /var/lib/openshift/5372405fe0b8cd5ad30000b6/app-root/runtime/repo//.openshift/cron/hourly/search-on-web.js: node: error while loading shared libraries: libv8.so.v8314-3.14.5: cannot open shared object file: No such file or directory __________________________________________________________________________ Fri Jun 6 12:01:28 EDT 2014: END hourly cron run - status=0 __________________________________________________________________________ Then I tried to login to the system via ssh and run some node commands, the same error message is displayed. I am pretty sure that I could run node commands successfully before. So I guess there might be the same root cause for these situations.
I believe the bug in Comment #6 is related to https://bugzilla.redhat.com/show_bug.cgi?id=1104922. I will clone that to OpenShift Enterprise.
Thank you, Brenton. I think what you think is right.
Just for the record, work for this continues in https://github.com/openshift/origin-server/pull/5441/
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/f6b5e0700cd45b0a1c1eae7680e61d8843698122 mongodb cart: Support non-SCL systems Bug 1104072 https://bugzilla.redhat.com/show_bug.cgi?id=1104072 This commit updates the cart spec file to conditionally call the `mkjournal` script with or without SCL mongo, updates `mongodb_context` to support non-scl mongo and tweaks `rhcsh` in a similar manner. Additional fixes include: * modify the `mongo` function in `rhcsh` to properly quote user-specified parameters for passing to `scl enable mongodb24` * conditionally publish path elements so the correct `mongo*` binaries are preferred in scaled and non-scaled environments * defensively quote user-specified parameters in function `mongo` in `rhcsh` so that things like exotic passwords that contain spaces are passed to the `mongo` binary without being erroneously split into multiple arguments
Enterprise fix pending merge of https://github.com/openshift/enterprise-server/pull/352
Check on puddle [2.1.z/2014.08.28.1] 1.Create a app with mongo cartridge #rhc app create nodejs nodejs mongo -s 2.access the database in the app >mongo -u $OPENSHIFT_MONGODB_DB_USERNAME -p $OPENSHIFT_MONGODB_DB_PASSWORD 53ffe1dbdb26c8794500004c-domtest.ose21z-manual.com.cn:50616/nodejs 3. run 'node --version' in the app >node --version v0.10.25 4. add cron cartridge to the app #rhc cartridge add cron -a nodejs 5. add the cron script and deploy the app #cat .openshift/cron/minutely/version.sh mongo --version >>$OPENSHIFT_DATA_DIR/version.log node --version >>$OPENSHIFT_DATA_DIR/version.log #git add. ; git commit -amx; git push 6. check the $OPENSHIFT_DATA_DIR/version.log file >cat app-root/data/version.log MongoDB shell version: 2.4.9 v0.10.25 MongoDB shell version: 2.4.9 v0.10.25
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1183.html