Bug 1015623 - Unable to connect to mongodb cartridge
Unable to connect to mongodb cartridge
Status: CLOSED NOTABUG
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dan Mace
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-04 11:57 EDT by Chris Ryan
Modified: 2015-05-14 19:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-07 10:52:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Ryan 2013-10-04 11:57:57 EDT
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 10:37:07 EDT
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 10:52:54 EDT
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.