Bug 831966
Summary: | cannot connect to mongo db via mongo shell for scalable jbosseap app | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | OKD | Reporter: | Meng Bo <bmeng> | ||||||||
Component: | Containers | Assignee: | Mrunal Patel <mpatel> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 2.x | CC: | mpatel, xtian | ||||||||
Target Milestone: | --- | Keywords: | Reopened, Triaged | ||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2012-06-25 18:27:16 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: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Meng Bo
2012-06-14 08:14:50 UTC
Was not able to reproduce. Could you provide mcollective/broker logs? Still can reproduce this issue on devenv_1850, sometimes, the mongo shell can connect to the instance mongodb but not the application's. Cannot get useful logs from instance. It is just the DNS propagating. If you keep retrying after a few seconds, it eventually succeeds. Checked this issue again on devenv_1860, issue still exist.
After embed mongodb to scalable jbosseap application, ssh to the application and run mongo shell. It will connect to the instance mongodb but not the applications.
[jbosseap1s-bmengdev.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.0.2
connecting to: test
PRIMARY> show dbs
admin (empty)
local 0.0546875GB
openshift_broker_dev 0.0546875GB
When trying to connect to the application mongodb with specified the db dns, it can connect to it.
[jbosseap1s-bmengdev.dev.rhcloud.com ~]\> mongo ef3f33e451-bmengdev.dev.rhcloud.com:35541
MongoDB shell version: 2.0.2
connecting to: ef3f33e451-bmengdev.dev.rhcloud.com:35541/test
> show dbs
Wed Jun 20 22:36:49 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
When trying to check the ENV vars of the application for mongodb info, get nothing about it.
[jbosseap1s-bmengdev.dev.rhcloud.com ~]\> env|grep -i nosql
[jbosseap1s-bmengdev.dev.rhcloud.com ~]\>
[jbosseap1s-bmengdev.dev.rhcloud.com .env]\> ls
JAVA_HOME OPENSHIFT_GEAR_DNS OPENSHIFT_JBOSS_CLUSTER OPENSHIFT_PROXY_PORT
M2_HOME OPENSHIFT_GEAR_NAME OPENSHIFT_JBOSS_CLUSTER_PORT OPENSHIFT_REPO_DIR
OPENSHIFT_APP_DNS OPENSHIFT_GEAR_TYPE OPENSHIFT_JBOSS_CLUSTER_PROXY_PORT OPENSHIFT_RUN_DIR
OPENSHIFT_APP_NAME OPENSHIFT_GEAR_UUID OPENSHIFT_JBOSS_CLUSTER_REMOTING OPENSHIFT_RUNTIME_DIR
OPENSHIFT_APP_UUID OPENSHIFT_HAPROXY_STATUS_IP OPENSHIFT_JBOSS_MESSAGING_PORT OPENSHIFT_TMP_DIR
OPENSHIFT_DATA_DIR OPENSHIFT_HOMEDIR OPENSHIFT_JBOSS_MESSAGING_THROUGHPUT_PORT PATH
OPENSHIFT_GEAR_CTL_SCRIPT OPENSHIFT_INTERNAL_IP OPENSHIFT_JBOSS_REMOTING_PORT USER_VARS
OPENSHIFT_GEAR_DIR OPENSHIFT_INTERNAL_PORT OPENSHIFT_LOG_DIR
[jbosseap1s-bmengdev.dev.rhcloud.com .uservars]\> ls
[jbosseap1s-bmengdev.dev.rhcloud.com .uservars]\>
Created attachment 593336 [details]
development log
Created attachment 593337 [details]
mcollective log
Created attachment 593338 [details]
mcollective-client log
Attached all the avaiable logs for help debug. Notes, if you only type mongo, the DB you connected is the mongo in the sever, not the mongo we add for the cartridge. Nosql connection hook was missing from the spec file. Submitted https://github.com/openshift/crankcase/pull/154 with the fix. Verified it on stage-2.0.13 [scalejbosseap2-domainxstg1.stg.rhcloud.com ~]\> mongo MongoDB shell version: 2.0.2 connecting to: 8ff7774e60-domainxstg1.stg.rhcloud.com:42181/admin > show dbs 'admin 0.03125GB local (empty) scalejbosseap2 0.03125GB > use scalejbosseap2 switched to db scalejbosseap2 |