无法启动 OpenShift 控制台 Ruby (Rack) 应用程序
Posted
技术标签:
【中文标题】无法启动 OpenShift 控制台 Ruby (Rack) 应用程序【英文标题】:OpenShift Console Ruby (Rack) application could not be started 【发布时间】:2013-09-25 01:05:46 【问题描述】:正在尝试安装 Openshift Origin。
以下: http://openshift.github.io/documentation/oo_deployment_guide_comprehensive.html#install-the-web-console-rpms
-
测试配置
http://127.0.0.1/console
开始补充信息
注意:问题似乎与我机器上两个不同版本的 rake 有关,因为有人好心建议我运行这些命令**
yum info rubygem-rake
名称:rubygem-rake 版本:0.8.7 发布:2.1.el6 来自 repo:rhel-6-server-optional-rpms
yum info ruby193-rubygem-rake
名称:ruby193-rubygem-rake 版本:0.9.2.2 发布:38.el6 来自回购:openshift-origin-deps
结束附加信息
原始问题: 当我进入控制台目录时
cd /var/www/openshift/console
bundle --local
我收到消息:
Your bundle is complete! Use bundle show [gemname] to see where a bundled gem is installed.
网站声明:
错误信息: 在任何源中都找不到 rake-10.1.0 (Bundler::GemNotFound) 异常类: PhusionPassenger::UnknownError 应用程序根: /var/www/openshift/console
# File Line Location
0 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/spec_set.rb 90 in
block in materialize'
1 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/spec_set.rb 83 在map!'
2 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/spec_set.rb 83 in
materialize'
3 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb 127 在specs'
4 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb 172 in
specs_for'
5 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb 161 在requested_specs'
6 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/environment.rb 23 in
requested_specs'
7 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb 11 在setup'
8 /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler.rb 107 in
setup'
9 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/utils.rb 326 in prepare_app_process'
10 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb 156 in
block in initialize_server'
11 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/utils.rb 563 在report_app_init_status'
12 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb 154 in
initialize_server'
13 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb 204 在start_synchronously'
14 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb 180 in
start'
15 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb 129 in start'
16 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb 253 in
block (2 个级别) 在 spawn_rack_application'
17 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server_collection.rb 132 in lookup_or_add'
18 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb 246 in
block in spawn_rack_application'
19 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server_collection.rb 82 在block in synchronize'
20 prelude> 10:in
synchronize'
21 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server_collection.rb 79 在synchronize'
22 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb 244 in
spawn_rack_application'
23 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb 137 在spawn_application'
24 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb 275 in
handle_spawn_application'
25 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb 357 在server_main_loop'
26 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb 206 in
start_synchronously'
27 /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/helper-scripts/passenger-spawn-server 102 在`
【问题讨论】:
【参考方案1】:这里有一些提示...我花了很多时间,尝试了很多解决方案。这是我发现的。
-
机器上有两个版本的 ruby,即使
ruby --version
显示正确的 1.9.3 版本,如果我尝试捆绑安装,似乎存在冲突的 1.8.7 版本。所以,我删除了它。
许多重复的 gem,由于某种原因,在我删除 1.8.7 之后,如果我执行捆绑安装,它将开始安装版本太新的 gem。所以,我需要gem list
,然后是yum list *rubygem*[gemnname]*
,以确保我只有一个版本的 gem,并且它与 ruby193 存储库中的版本匹配。如果我发现:
yum list *rubygem*rdisc*
ruby193-rubygem-rdiscount.x86_64 1.6.8-2.el6_3 @openshift-origin-deps
宝石列表 rdisc
* 本地宝石 *
rdiscount (1.7.2,1.6.8)
我会删除 1.7.2
gem 卸载 rdiscount --version 1.7.2
不要忘记
-
service openshift-broker 重启
服务 openshift-console 重启
在每一个之后。
【讨论】:
以上是关于无法启动 OpenShift 控制台 Ruby (Rack) 应用程序的主要内容,如果未能解决你的问题,请参考以下文章