Bug 1015623

Summary: Unable to connect to mongodb cartridge
Product: OpenShift Online Reporter: Chris Ryan <cryan>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: dmace
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-07 14:52:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Chris Ryan 2013-10-04 15:57:57 UTC
Description of problem:
After creating an app and embedding a mongodb cartridge, I am unable to connect using either portforwarding, or on the gear itself.

Version-Release number of selected component (if applicable):
STG as of Oct. 4 2013

How reproducible:
Always

Steps to Reproduce:
1.Create an app with MongoDB embedded: rhc create-app p1 php-5.3 mongodb-2.2 
2. Try to connect either through portforwarding or on the gear:
mongo --username admin --password random_gen_pass --host ip_of_host
3. Login failed { throw 'login failed'; }, Error code 18

Actual results:
Login failed

Expected results:
Successful login

Additional info:

Comment 1 Dan Mace 2013-10-07 14:37:07 UTC
Chris,

Can you please provide more details about how you attempted connecting to the Mongo instance? I had no trouble in either the gear shell or a local port forwarding setup:

$ rhc app create mongotest php-5.3 mongodb-2.2 ...                         
Application Options
-------------------
  Namespace:  dmace
  Cartridges: php-5.3, mongodb-2.2
  Gear Size:  default
  Scaling:    no

==== gear shell test ====
[... 5252c515dbd93c5b7f000001]\> mongo -u $OPENSHIFT_MONGODB_DB_USERNAME -p $OPENSHIFT_MONGODB_DB_PASSWORD $OPENSHIFT_MONGODB_DB_HOST/$OPENSHIFT_APP_NAME
MongoDB shell version: 2.4.6
connecting to: .../mongotest
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
        http://docs.mongodb.org/
Questions? Try the support group
        http://groups.google.com/group/mongodb-user
> db.mongotest.find();
> exit
bye

==== local forwarding test ====

$ rhc port-forward -a mongotest -p ...                                        
Checking available ports ... done
Forwarding ports ...

To connect to a service running on OpenShift, use the Local address

Service Local                OpenShift
------- --------------- ---- -------------------
httpd   127.0.0.1:8080   =>  ...:8080
mongodb 127.0.0.1:27017  =>  ...:27017

Press CTRL-C to terminate port forwarding

$ mongo -u admin -p ... 127.0.0.1:27017/mongotest
MongoDB shell version: 2.4.5
connecting to: 127.0.0.1:27017/mongotest
>

Comment 2 Chris Ryan 2013-10-07 14:52:54 UTC
Dan,

Sorry, it appears we have some incorrect documentation for the test. I'll fix that, thanks.