2

尝试使用以下 config.ru 在 Openshift 上部署 Goliath 应用程序

require 'goliath'
require './goliathapp'

runner = Goliath::Runner.new(ARGV, nil)
runner.api = GoliathApp.new
runner.app = Goliath::Rack::Builder.build(GoliathApp, runner.api)
runner.run

在我的测试平台环境中本地应用程序运行顺利,但在 Openshift 上返回以下权限错误。

[Client 20] Cannot checkout session. An error occured while starting the web application.
Error page:
no acceptor (port is in use or requires root privileges) (RuntimeError)
/var/lib/openshift/.../.gem/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:530:in `start_tcp_server'
/var/lib/openshift/.../.gem/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:530:in `start_server'
/var/lib/openshift/.../.gem/gems/goliath-1.0.4/lib/goliath/server.rb:86:in `block in start'
/var/lib/openshift/.../.gem/gems/em-synchrony-1.0.4/lib/em-synchrony.rb:38:in `block (2 levels) in synchrony'

有人在 Openshift 上运行 goliath 吗?

谢谢,

4

1 回答 1

2

您是否 100% 肯定您实际上并未在该端口上运行另一个应用程序?

请试试

$ lsof -i :9000

于 2016-03-30T07:50:27.313 回答