Bug 968323 - Page was redirected to openshift.redhat.com when accessing an existing app via 8000 port on INT
Summary: Page was redirected to openshift.redhat.com when accessing an existing app vi...
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: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-29 13:17 UTC by Jianwei Hou
Modified: 2015-05-14 23:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 04:13:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jianwei Hou 2013-05-29 13:17:25 UTC
Description of problem:
Create a nodejs app with websocket supported, after INT was updated and migrated, when accessing the app via 8000 port, the page was redirected to openshift.redhat.com
This could happen to any existing apps on INT regardless it is websocket supported or not 

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

How reproducible:
Always

Steps to Reproduce:
1. Create an with quickstart - git://github.com/ramr/pacman.git
2. After INT is upgraded and migrated, access the app via 8000 port
http://pacman-jhou.int.rhcloud.com:8000/

3. Access the app via https and 844s port 
https://pacman-jhou.int.rhcloud.com:8443/

Actual results:
After step 2:
page is redirected to https://www.openshift.com/

After step 3:
The requested URL could not be retrieved

Expected results:
8000 and 8443 ports are reserved for websocket support, should be able to access via 8000/8443 port

Additional info:

Comment 1 Dan Mace 2013-05-29 18:34:37 UTC
Hou,

I had ops pull the /var/lib/openshift/.httpd.d/routes.json files from all the INT nodes to confirm the websocket mappings exist for your test application. I was unable to find 'pacman-jhou' in any of the routes files. I did find 'pacman-cdm' which must belong to someone else. I also confirmed with ops that the 'pacman-jhou' gear was not present on any INT nodes.

I was able to successfully migrate a v1 pacman app to v2 in a new devenv without issue, and the route file entry persisted.

Can you please confirm that your app still exists?

Comment 2 Jianwei Hou 2013-05-30 02:01:30 UTC
Dan, thanks for your confirmation.

But from my side, I was able to see the app with "rhc domain show", here is the app info
  pacman @ http://pacman-jhou.int.rhcloud.com/ (uuid: 51958b066cec0e0f3c000249)
  -----------------------------------------------------------------------------
    Created:         May 17  9:42 AM
    Gears:           1 (defaults to small)
    Git URL:         ssh://51958b066cec0e0f3c000249.rhcloud.com/~/git/pacman.git/
    Initial Git URL: git://github.com/ramr/pacman.git
    SSH:             51958b066cec0e0f3c000249.rhcloud.com
    Aliases:         pacman.pl.me

    nodejs-0.6 (Node.js 0.6)
    ------------------------
      Gears: Located with mongodb-2.2, rockmongo-1.1

    mongodb-2.2 (MongoDB NoSQL Database 2.2)
    ----------------------------------------
      Gears:          Located with nodejs-0.6, rockmongo-1.1
      Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
      Database Name:  pacman
      Password:       fMSagWi86gm2
      Username:       admin

    rockmongo-1.1 (RockMongo 1.1)
    -----------------------------
      Gears:          Located with nodejs-0.6, mongodb-2.2
      Connection URL: https://pacman-jhou.int.rhcloud.com/rockmongo/

$ ssh 51958b066cec0e0f3c000249.rhcloud.com
[pacman-jhou.int.rhcloud.com 51958b066cec0e0f3c000249]\> hostname 
ex-sml-node2.int.rhcloud.com

$ nslookup pacman-jhou.int.rhcloud.com
Server:		10.66.127.17
Address:	10.66.127.17#53

Non-authoritative answer:
pacman-jhou.int.rhcloud.com	canonical name = ex-sml-node2.int.rhcloud.com.
ex-sml-node2.int.rhcloud.com	canonical name = ec2-23-22-234-35.compute-1.amazonaws.com.
Name:	ec2-23-22-234-35.compute-1.amazonaws.com

And the app is accessible without specifying the 8000 port http://pacman-jhou.int.rhcloud.com/

In addition, when you pick up a random app and append :8000 to its url, it will be redirected to http://openshift.redhat.com/
eg:
http://rails-jhou.int.rhcloud.com/
http://rails-jhou.int.rhcloud.com:8000/

Comment 3 Jianwei Hou 2013-05-30 09:25:57 UTC
Tried this on devenv, and couldn't reproduce this issue after migration

Comment 4 Dan Mace 2013-05-30 20:36:17 UTC
Hou,

Our current theory is that the broken gears in INT are fallout from https://bugzilla.redhat.com/show_bug.cgi?id=965317, in which the route files were corrupted under certain conditions. Ops has run the `rhc-fix-missing-frontend` tool on all INT gears to repair the entries, and your apps' websocket routes are restored.

If you're able to reproduce these conditions again in INT, please let us know, as the related bug has already been resolved; any further problems mean we will need to do some more digging.

Thanks for your patience with this one.

Comment 5 Jianwei Hou 2013-05-31 01:38:57 UTC
Dan, Thanks for digging and fixing this problem. Now the app is fixed, mark this bug as verified.


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