Bug 1144114 - Mongodb Client Disappeared
Summary: Mongodb Client Disappeared
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
: 1144135 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-18 17:21 UTC by Panagiotis Xinos
Modified: 2016-05-05 18:38 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-18 16:50:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Panagiotis Xinos 2014-09-18 17:21:35 UTC
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:

Comment 1 Michal Fojtik 2014-09-19 09:05:00 UTC
*** Bug 1144135 has been marked as a duplicate of this bug. ***

Comment 3 Michal Fojtik 2014-09-19 09:13:05 UTC
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 :-)

Comment 6 Michal Fojtik 2014-09-19 10:19:36 UTC
PR: https://github.com/openshift/origin-server/pull/5824

Comment 7 Panagiotis Xinos 2014-09-19 13:55:25 UTC
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.

Comment 8 Michal Fojtik 2014-09-19 14:28:40 UTC
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.

Comment 9 openshift-github-bot 2014-09-19 14:42:46 UTC
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

Comment 10 info 2014-09-19 18:02:20 UTC
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.

Comment 11 Andy Grimm 2014-09-19 18:50:54 UTC
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

Comment 15 Michal Fojtik 2014-09-26 14:35:15 UTC
This was fixed manually in PROD and we have code already pushed for OSE.

Comment 19 techgeek503 2016-05-05 18:38:31 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.