Bug 880921 - Couldn't connet to mongodb after snapshot saved for non-scalable app
Summary: Couldn't connet to mongodb after snapshot saved for non-scalable app
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-28 07:40 UTC by joycezhang
Modified: 2015-05-14 23:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-30 08:52:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description joycezhang 2012-11-28 07:40:08 UTC
Description of problem:
If try to snapshot save app with mongodb, then mongodb couldn't be connected anymore as below:

[ews2-dev2529.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.2.1
connecting to: 127.0.250.129:27017/admin
Wed Nov 28 02:07:27 Error: couldn't connect to server 127.0.250.129:27017 src/mongo/shell/mongo.js:93
exception: connect failed


Version-Release number of selected component (if applicable):
devenv_2528/devenv_2529
rhc-1.2.1.gem

How reproducible:
always

Steps to Reproduce:
1.Create an app
#rhc app create ews1 jbossews-1.0 -p xx
2.Add mongodb to this app
#rhc cartridge add mongodb-2.2 -p xx
3.SSH into this app and write some data via mongo shell
4.Take snapshot
#rhc snapshot save ews1 -p xx
5.SSH into app, then try to use mongo shell
  
Actual results:
Couldn't connect to mongodb after snapshot saved as below:
# rhc snapshot save ews2 -p -d 
Pulling down a snapshot to ews2.tar.gz...
Running extra dump for mongodb-2.2
MongoDB already running
Sending SIGTERM to jboss:11550 ...
kill -9 11550
Done
Creating and sending tar.gz
Running extra cleanup for mongodb-2.2
Removing existing catalina.properties
Removing existing context.xml
Removing existing logging.properties
Removing existing server.xml
Removing existing tomcat-users.xml
Removing existing web.xml
Found 127.0.250.129:8080 listening port
Done

RESULT:
Success


[ews2-dev2529.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.2.1
connecting to: 127.0.250.129:27017/admin
Wed Nov 28 02:07:31 Error: couldn't connect to server 127.0.250.129:27017 src/mongo/shell/mongo.js:93
exception: connect failed

Expected results:
Snapshot save works well for mongodb.

Additional info:
1. It works well for scalable app, like scalable perl app.
2. mongo process is running in this case:
[ews2-dev2529.dev.rhcloud.com ~]\> ps -ef|grep mongo
501        456 32764  0 02:22 pts/0    00:00:00 grep mongo
501      13415     1  0 02:06 ?        00:00:00 /usr/bin/mongod --auth --nojournal --smallfiles --quiet -f /var/lib/openshift/d996a70db7944b6cadee36615ca14c8c//mongodb-2.2//etc/mongodb.conf run
501      13423 13415  0 02:06 ?        00:00:00 /usr/bin/mongod --auth --nojournal --smallfiles --quiet -f /var/lib/openshift/d996a70db7944b6cadee36615ca14c8c//mongodb-2.2//etc/mongodb.conf run
501      13424 13423  0 02:06 ?        00:00:00 /usr/bin/mongod --auth --nojournal --smallfiles --quiet -f /var/lib/openshift/d996a70db7944b6cadee36615ca14c8c//mongodb-2.2//etc/mongodb.conf run
[ews2-dev2529.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.2.1
connecting to: 127.0.250.129:27017/admin
Wed Nov 28 02:24:12 Error: couldn't connect to server 127.0.250.129:27017 src/mongo/shell/mongo.js:93
exception: connect failed
[ews2-dev2529.dev.rhcloud.com ~]\> set -x
[ews2-dev2529.dev.rhcloud.com ~]\> mongo
+ mongo
+ test 0 -gt 0
+ uopt='--username admin'
+ '[' -n d7dkRzyass_L ']'
+ popt='--password d7dkRzyass_L'
+ egrep '\-\-host|127.0.250.129'
+ echo
+ '[' -n '' ']'
+ hopt=127.0.250.129:27017/admin
+ unset LD_LIBRARY_PATH
+ /usr/bin/mongo 127.0.250.129:27017/admin --username admin --password d7dkRzyass_L
MongoDB shell version: 2.2.1
connecting to: 127.0.250.129:27017/admin
Wed Nov 28 02:26:03 Error: couldn't connect to server 127.0.250.129:27017 src/mongo/shell/mongo.js:93
exception: connect failed

Comment 1 joycezhang 2012-11-30 08:52:16 UTC
Close this bug as it is not reproduced on latest devenv_2534. Thanks.


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