| Summary: | "Ruby (Rack) application could not be started" for ruby normal app and 503 error returns for ruby scalable app after deploying with dependencies | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Lei Zhang <lzhang> |
| Component: | Containers | Assignee: | Hiro Asari <hasari> |
| Status: | CLOSED NOTABUG | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 2.x | CC: | jkeck, pmorie, xtian |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-10-24 16:29:11 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: | |
|
Description
Lei Zhang
2013-10-23 08:12:04 UTC
Please retest on the latest libra_ami; I cannot recreate this issue in my devenv. devenv_3937, still can reproduce this issue. when remote execute "Fetching source index for http://rubygems.org/", it took long time about 3~4 minutes, and no error happened. But after git push, 503 error return when access the app. Step 1 #rhc app create myruby18s ruby-1.8 -s Step 2 Create Gemfile and bundle install [rayzhang@ray myruby18s]$ cat Gemfile source 'http://rubygems.org' gem 'rhc' [rayzhang@ray myruby18s]$ bundle install Fetching gem metadata from http://rubygems.org/...... Fetching gem metadata from http://rubygems.org/.. Resolving dependencies... Enter your password to install the bundled RubyGems to your system: Using archive-tar-minitar (0.5.2) Using highline (1.6.20) Using commander (4.1.5) Using httpclient (2.3.4.1) Using net-ssh (2.7.0) Using net-ssh-gateway (1.2.0) Using net-ssh-multi (1.2.0) Using open4 (1.3.0) Using rhc (1.15.6) Using bundler (1.3.5) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. Step 3 #sed -i "s/rhc \(.*\)/rhc \(0.71.2\)/g" Gemfile.lock Step 4 #git add -A &&git commit -amp&&git push [rayzhang@ray myruby18s]$ git add -A &&git commit -amp&&git push [master 5cdf9a7] p 2 files changed, 31 insertions(+) create mode 100644 Gemfile create mode 100644 Gemfile.lock warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git) Counting objects: 5, done. Delta compression using up to 8 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (4/4), 594 bytes, done. Total 4 (delta 1), reused 0 (delta 0) remote: Stopping Ruby cartridge remote: [Thu Oct 24 03:42:01 2013] [warn] PassEnv variable SHELL was undefined remote: [Thu Oct 24 03:42:01 2013] [warn] PassEnv variable USER was undefined remote: [Thu Oct 24 03:42:01 2013] [warn] PassEnv variable LOGNAME was undefined remote: Syncing git content to other proxy gears remote: Building git ref 'master', commit 5cdf9a7 remote: Building Ruby cartridge remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment' remote: Fetching source index for http://rubygems.org/ remote: which: no sudo in (/var/lib/openshift/5268ce76fa7bab8715000149/.gem/bin:/var/lib/openshift/5268ce76fa7bab8715000149/haproxy/usr/bin:/bin:/usr/bin:/usr/sbin) remote: Installing archive-tar-minitar (0.5.2) remote: Installing highline (1.6.20) remote: Installing commander (4.1.5) remote: Installing httpclient (2.3.4.1) remote: Installing net-ssh (2.7.0) remote: Installing net-ssh-gateway (1.2.0) remote: Installing net-ssh-multi (1.2.0) remote: Installing open4 (1.3.0) remote: Installing rhc (0.71.2) remote: Using bundler (1.0.21) remote: Your bundle is complete! It was installed into ./vendor/bundle remote: Preparing build for deployment remote: Deployment id is 9700fa17 remote: Activating deployment remote: Starting Ruby cartridge remote: Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://5268ce76fa7bab8715000149.rhcloud.com/~/git/myruby18s.git/ 321f793..5cdf9a7 master -> master Step 5 #access the app [rayzhang@ray Work]$ curl http://myruby18s-chunchen.dev.rhcloud.com/ <html><body><h1>503 Service Unavailable</h1> No server is available to handle this request. </body></html> The template application does not contain Gemfile and it works, right? If you add your own Gemfile, it is your responsibility to ensure that the application works with bundler. Your Gemfile does not contain 'rack', which the template application requires. So when the application starts with bundler, it fails. Add the following line to your Gemfile, and repeat the procedure. It should work. gem 'rack' |