Deployed Ruby app from github return port error

Hello i have deployed an pdf service writte in ruby from github. Bundle update and Bundle install works fine. When i run the app : ruby app.rb i have the following error:

app@lofty-abundant-dosa:~ 15:31 
$ ruby app.rb
/app/.local/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:938: warning: constant Tilt::Cache is deprecated
== Sinatra (v2.2.3) has taken the stage on 3000 for development with backup from Thin
2023-08-13 15:31:53 +0000 Thin web server (v1.8.2 codename Ruby Razor)
2023-08-13 15:31:53 +0000 Maximum connections set to 1024
2023-08-13 15:31:53 +0000 Listening on localhost:3000, CTRL+C to stop
2023-08-13 15:31:53 +0000 Stopping ...
== Sinatra has ended his set (crowd applauds)
Traceback (most recent call last):
        11: from /app/.local/gems/gems/sinatra-2.2.4/lib/sinatra/main.rb:45:in `block in <module:Sinatra>'
        10: from /app/.local/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1520:in `run!'
         9: from /app/.local/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1587:in `start_server'
         8: from /app/.local/gems/gems/rack-2.2.8/lib/rack/handler/thin.rb:22:in `run'
         7: from /app/.local/gems/gems/thin-1.8.2/lib/thin/server.rb:162:in `start'
         6: from /app/.local/gems/gems/thin-1.8.2/lib/thin/backends/base.rb:75:in `start'
         5: from /app/.local/gems/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
         4: from /app/.local/gems/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
         3: from /app/.local/gems/gems/thin-1.8.2/lib/thin/backends/base.rb:65:in `block in start'
         2: from /app/.local/gems/gems/thin-1.8.2/lib/thin/backends/tcp_server.rb:16:in `connect'
         1: from /app/.local/gems/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_server'
/app/.local/gems/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)

Can help me if is possible ? Thanks in advances

It looks like something (probably Node.js) is already using port 3000. Did you clone from Github or remix a NodeJS app?

Clone from github.
https://github.com/GSA/pdf-filler.git

solved with

bundle exec rackup config.ru -p 3000 -s thin -o 0.0.0.0

Blockquote

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.