Bug 963057 - Ruby 1.9 App Instantiation Errors / 503 Service Temporarily unavailable
Ruby 1.9 App Instantiation Errors / 503 Service Temporarily unavailable
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Mac OS
unspecified Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-05-15 00:39 EDT by symon
Modified: 2015-05-14 22:20 EDT (History)
4 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description symon 2013-05-15 00:39:44 EDT
Description of problem: 503 Service Temporarily unavailable / Technical Errors on ruby / sinatra App creation.

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

How reproducible: App was not instantiated correctly, no specific error given

Steps to Reproduce:
1. go to simon-habitus.rhcloud.com
2. Notice that it ain't werkin? I get 503 error
3. App had errors on instantiation, wondering if it was something I did or didn't do, or something wrong on server side.
Actual results: 503 Service Temporarily unavailable

Expected results: No server errors

Additional info:  simon-habitus.rhcloud.com
Comment 2 Johnny Liu 2013-05-15 01:42:17 EDT
Looks like this is origin bug, so move it to origin product.
Comment 3 Yujie Zhang 2013-05-15 05:36:51 EDT
Created a ruby-1.9 application on PROD, it can work correctly, could you please provide the steps you create the application? Thanks!
Comment 4 Abhishek Gupta 2013-05-15 15:30:49 EDT
Can you try restarting the application?
Comment 5 symon 2013-05-15 15:56:35 EDT
I restarted the application, still the same error.  

Reference #b304feebe84352c0661dfa6094b67634

The steps I used to instantiate were as follows:

1) created ruby 1.9 application
2) Specified github source code repository
3) Used Defaults otherwise

My first test app eco-habitus.rhcloud.com, is a duplicate of simon-habitus.rhcloud.com, with the exception that it does not sync with a github repository.  The app runs locally fine.  

Was wondering if as something to do with the required thread-dumper.rb file, or possibly the way I am syncing / pushing the github repository to the rhc git repository.  But then again, the error occurred prior, during the app creation phase.

Not sure what it could be? Maybe I have missed something critical in figuring out the deployment process with Openshift Origin, particularly with integrating github, any suggestions?
Comment 6 Abhishek Gupta 2013-05-15 16:20:58 EDT
If you have a spare gear, can you try creating a new app (same as simon-habitus.rhcloud.com) and see if that works? If not, we'll need to look at the gear. For the latter, can you provide us the application UUID or the output of "rhc domain show"?
Comment 7 symon 2013-05-15 17:07:55 EDT
I deleted the instance of simon-habitus.rhcloud.com and tried to create a new one with same name, specifying a github repository, apart from that I used the default settings.  App did not successfully get instantiated, the error I got was:

"Unable to complete the requested operation due to: Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support.. Reference ID: 3557acacafbec17aed9b1506d997b1a0"

Also, prior to deleting simon-habitus.rhcloud the output of rhc domain show was:

Applications in habitus domain

  eco @ http://eco-habitus.rhcloud.com/
    (uuid: 515b8b5ce0b8cdf2a3000060)
    Created: Apr 02  6:52 PM
    Gears:   1 (defaults to small)
    Git URL: ssh://515b8b5ce0b8cdf2a3000060@eco-habitus.rhcloud.com/~/git/eco.git/
    SSH:     515b8b5ce0b8cdf2a3000060@eco-habitus.rhcloud.com

    ruby-1.9 (Ruby 1.9)
      Gears: 1 small

  simon @ http://simon-habitus.rhcloud.com/
    (uuid: 5192bd804382eca1cf000198)
    Created:         May 14  3:41 PM
    Gears:           1 (defaults to small)
    Git URL:         ssh://5192bd804382eca1cf000198@simon-habitus.rhcloud.com/~/git/simon.git/
    Initial Git URL: https://github.com/supamello/simon.git
    SSH:             5192bd804382eca1cf000198@simon-habitus.rhcloud.com

    ruby-1.9 (Ruby 1.9)
      Gears: 1 small
Comment 8 symon 2013-05-15 17:38:18 EDT
Just tried deploying to Heroku, worked like a charm...just fyi.  It's definitely an Openshift bug.
Comment 9 Abhishek Gupta 2013-05-15 18:14:58 EDT
Assigning to Rajat as he has already started debugging it on the gear.
Comment 10 Rajat Chopra 2013-05-15 20:43:12 EDT
Here is what is going on in the background -->
Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
Fetching gem metadata from http://rubygems.org/.
Error Bundler::HTTPError during request to dependency API

Summary of error:
The request to rubygems.org times out when trying to get the gem metadata, and that ultimately propagates the error to the top (including app-create). 

Our operations team will look into this 'slow' deal with rubygems.org !
But meanwhile, may I request you to create a regular ruby-1.9 app and then do a git push with your repo?
Steps -
 1. rhc app create simonsapp ruby-1.9
 2. cd simonsapp
 3. git remote add upstream -m master https://github.com/supamello/simon.git
 4. git pull -s recursive -X theirs upstream master
 5. git push
With the 5th step, you will see exactly what goes on with the bundler (and that it takes an unusually long time). But eventually this manual step succeeds (because no one is heeding to the timeout). 
 6. App is ready.

Please feed us back if the above worked. This bug will be updated with progress on the 'operations' work on rubygems.org.
Comment 11 Clayton Coleman 2013-05-16 10:35:18 EDT
Rubygems.org had some problems last night - see here for more http://t.co/2golDj9xhd

All issues should be resolved now.
Comment 12 Yujie Zhang 2013-05-16 23:50:57 EDT
Tested on PROD, create ruby-1.9 application with git url "https://github.com/supamello/simon.git", the app can be created and accessed successfully, so verify this bug, thanks.

(In reply to comment #8)
hi symon, you can try to create your app again, it should be ok now, thanks!
Comment 13 symon 2013-05-21 17:38:02 EDT
Sorry for the delay, had some other matters to attend to.  Unfortunately, I don't think the bug fix is verified...I tried to create the app again using same process and still got the same error.
Comment 14 Rajat Chopra 2013-05-21 18:00:47 EDT
Can you verify if the app can be brought up nicely with steps listed in Comment#10 ? 
Just to bisect the range of possible issues - because according to comment#12 it seems possible to create an app without error - wondering if its your client tool or your account or really the rubygems.org timeout!
Comment 15 symon 2013-05-21 23:39:32 EDT
Hey, hold up...I had the thought that, the error might have been with my Browser (firefox) and possibly a cache / session issue.  I tried creating the app with another browser (chrome) with same steps as Comment#10 and it worked without hiccup.  If there is any way to reproduce the error, I'd try if you can guess what it might have been?

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