Bug 1015623 - Unable to connect to mongodb cartridge
Summary: Unable to connect to mongodb cartridge
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-04 15:57 UTC by Chris Ryan
Modified: 2015-05-14 23:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-07 14:52:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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