Description of problem: While trying to connect on my gear mongodb by using the mongo client, I realized that the client disappeared. Actually the path was not included somehow cause in an other gear I found out that the path of mongo client was under /opt/rh/mongodb24/root/usr/bin/mongo. This path was not declared in PATH env variable any more and also OPENSHIFT_MONGODB_LD_LIBRARY_PATH_ELEMENT and OPENSHIFT_MONGODB_PATH_ELEMENT where missing. Even the LD_LIBRARY_PATH is missing the mongodb lib path. Version-Release number of selected component (if applicable): How reproducible: just login to the shell of chelseaselfcare-appbakery.rhcloud.com Steps to Reproduce: 1. export | grep -i mongo will show all the env variables declared so far there are several missing. Actual results: Expected results: Additional info:
*** Bug 1144135 has been marked as a duplicate of this bug. ***
Panagiotis Xinos is this new application (created within, let say 1 month, or old gear?) The correct *PATH* env vars should be: OPENSHIFT_MONGODB_LD_LIBRARY_PATH_ELEMENT=/opt/rh/v8314/root/usr/lib64:/opt/rh/mongodb24/root/usr/lib64 OPENSHIFT_MONGODB_PATH_ELEMENT=/opt/rh/mongodb24/root/usr/bin The the LD_LIBRARY_PATH includes these. Is you application scaled app? Thanks for reporting this problem, any details appreciated :-)
PR: https://github.com/openshift/origin-server/pull/5824
Hi Michal, This a 2 month old gear. No it is not scaled yet as it is in testing for now. But it will be production in the next few weeks. I managed to have mongo client running by declaring the missing paths/envs myself. Of course by disconnecting, everything was gone. I know the correct environmental variables and how to set them up. Question: do you think I can set the missing environmental variables using rhc env command? Would it interfere with future upgrades? Thank you for your prompt response.
Panagiotis Xinos yes, they will interfere with future upgrade (and fix for this issue). However, what you described might be a reasonable temporary workaround for the 'rhc ssh' command. You can also remove them when you will not need them (eg. running mongo) or when we push the update to OpenShift Online.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/ad1374e9bdb8bfc233fecd18def94fc7e690204b Bug 1144114 - Add compatible upgrade for mongodb to fix missing PATH
Same issue here (mongo not found). In my case it's a gear that was created last year. - So definitely older than a couple of months.
Workaround: export OPENSHIFT_MONGODB_PATH_ELEMENT=/opt/rh/mongodb24/root/usr/bin source mongodb/lib/mongodb_context export PATH=/opt/rh/mongodb24/root/usr/bin:$PATH LD_LIBRARY_PATH=/opt/rh/v8314/root/usr/lib64:/opt/rh/mongodb24/root/usr/lib64:$LD_LIBRARY_PATH mongo
This was fixed manually in PROD and we have code already pushed for OSE.
HI Is this issue fixed after port forwarding without any other changes. I am unable to connect to mongo with putty. I am connected to my app and I see MongoDB is already running on 'gear start'. I tried with and without port forwarding. Please help. Thanks.