Bug 1020770 - Unable to establish connection with scalable applications' db cartridges after migration
Summary: Unable to establish connection with scalable applications' db cartridges afte...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Mrunal Patel
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-18 09:20 UTC by Jianwei Hou
Modified: 2015-05-14 23:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:49:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jianwei Hou 2013-10-18 09:20:57 UTC
Description of problem:
After node upgrade and migration, ssh into a scalable app and try to connect to its db cartridges(eg: mongo, postgresql), connection was refused.

Version-Release number of selected component (if applicable):
On devenv_3912

How reproducible:
Always

Steps to Reproduce:
1. Create scalable applications with db cartridges added on devenv-stage_496
2. Upgrade the devevn-stage ami to latest devenv ami, which is devenv_3912
3. Migrate all gears with oo-admin-upgrade
4. Pick one scalable app which has a db cartridge, ssh to this app and connect to db

Actual results:
After step 4: Unable to establish connection DBs from the application gear, however, connection from the db gears theirselves are allowed
[python27s-migration2.dev.rhcloud.com 5260cc189acd5f8bf10003d9]\> psql
psql: could not connect to server: Connection refused
	Is the server running on host "5260cc199acd5f0a8e000028-migration2.dev.rhcloud.com" and accepting
	TCP/IP connections on port 38171?
[python27s-migration2.dev.rhcloud.com 5260cc189acd5f8bf10003d9]\> mongo
MongoDB shell version: 2.4.6
connecting to: test
Fri Oct 18 04:38:37.109 Error: 18 { code: 18, ok: 0.0, errmsg: "auth fails" } at src/mongo/shell/db.js:228
exception: login failed

[python27s-migration2.dev.rhcloud.com 5260cc189acd5f8bf10003d9]\> ssh $OPENSHIFT_POSTGRESQL_DB_GEAR_UUID@$OPENSHIFT_POSTGRESQL_DB_GEAR_DNS

....

[5260cc199acd5f0a8e000028-migration2.dev.rhcloud.com 5260cc199acd5f0a8e000028]\> psql
psql (8.4.13)
Type "help" for help.

python27s=# 

Expected results:
Should be able to connect to db gears from all gears of the application.

Additional info:

Comment 1 Mrunal Patel 2013-10-21 21:17:51 UTC
https://github.com/openshift/li/pull/2019

Comment 2 openshift-github-bot 2013-10-21 22:58:11 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/e1189234004d2f8c0e8b1016b3f721be617e1830
Bug 1020770: rhc-app-comm/nat getting flushed due to iptables restart.

Comment 3 Jianwei Hou 2013-10-22 06:30:10 UTC
Verified on devenv_3925
After upgraded to 3925 and migrate, the problem is gone. the connections to DBs can be established successfully on scalable application gears.

Comment 4 Andrei Colta 2014-01-18 10:40:58 UTC
Hello,

I have the similar issue, it seems i can't auth on mongo gear under scalable app.

Sat Jan 18 05:39:23.556 Error: couldn't connect to server hostname:38066 at src/mongo/shell/mongo.js:147
exception: connect failed
 

Could you please help?

Thank you in advance.


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