2

Trying to deploy a Goliath application on Openshift with the below config.ru

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

Locally in my testbed environment the application runs smoothly but on Openshift returns the below privileges errors.

[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'

Had anyone luck on running goliath on Openshift?

Thank you,

  • 1
    You can bind to `$OPENSHIFT__PORT` only to have your server externally addressable. More on binding to ports on OpenShift Online can be found [here](https://developers.openshift.com/managing-your-applications/port-binding-routing.html) and [here](https://access.redhat.com/documentation/en-US/OpenShift_Online/2.0/html/User_Guide/sect-Binding_Applications_to_Ports.html). – Jiri Fiala Mar 30 '16 at 11:30

1 Answers1

2

Are you 100% positive that you aren't actually running another application on that port?

Please try

$ lsof -i :9000

Elena
  • 157
  • 1
  • 7