Docker on Windows, connection refused when invoking debugger
I'm attempting to get Rubymine 2017.3 working with the debugger and Docker for Windows, and am having an issue with the ruby-debug-ide gem being unable to connect back to Rubymine. I used the help documentation https://www.jetbrains.com/help/ruby/2017.3/configuring-remote-interpreters-via-docker-compose.html to configure Rubymine.
It appears that the ruby-debug-ide gem is attempting to connect on the docker private network, but Rubymine isn't listening on that ip.
Any suggestions on what I can try next? This is the only remaining issue I'm needing to address before I'm able to use Rubymine on Windows. Without using the debugger everything is working as intended.
Thank you!
/usr/local/bin/ruby -e at_exit{sleep(1)};$$stdout.sync=true;$$stderr.sync=true;load($$0=ARGV.shift) /usr/local/bundle/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 1234 --host 0.0.0.0 --dispatcher-port 26168 -- /opt/project/bin/rails server -b 0.0.0.0 -p 3000 -e development
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:1234
=> Booting Unicorn
=> Rails 5.1.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
I, [2017-11-28T01:28:11.682857 #1] INFO -- : listening on addr=0.0.0.0:3000 fd=14
I, [2017-11-28T01:28:11.683197 #1] INFO -- : worker=0 spawning...
I, [2017-11-28T01:28:11.684781 #1] INFO -- : worker=1 spawning...
I, [2017-11-28T01:28:11.686426 #1] INFO -- : worker=2 spawning...
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:34961
I, [2017-11-28T01:28:11.689450 #1] INFO -- : worker=3 spawning...
13: connection failed(1)
Exception: Connection refused - connect(2) for "172.18.0.1" port 26168
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `initialize'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `open'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `block in notify_dispatcher'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `times'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `notify_dispatcher'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:112:in `block in start_control'
Please sign in to leave a comment.
Thanks for report, could you please attach Dockerfile, docker-compose.yml and Gemfile to reproduce the same environment. Also please attach idea.log (Help | Show Log in ...)
Here's the requested files. As a side note (and possibly related), I was not able to connect to the database container using the RubyMine SQL browser, stating that the host (db) could not be found.
idea.log:
Gemfile:
Hello,
have you performed additional configuration in your Docker network?
Hi, I have the same problem on mac:
/usr/local/rvm/rubies/ruby-2.1.3/bin/ruby -e at_exit{sleep(1)};$$stdout.sync=true;$$stderr.sync=true;load($$0=ARGV.shift) /usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 1234 --host 0.0.0.0 --dispatcher-port 26168 -- /opt/project/bin/rails server Puma -b 0.0.0.0 -p 4000 -e development
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:1234
=> Booting Puma
=> Rails 4.2.7.1 application starting in development on http://0.0.0.0:4000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[1] Puma starting in cluster mode...
[1] * Version 3.11.0 (ruby 2.1.3-p242), codename: Love Song
[1] * Min threads: 1, max threads: 5
[1] * Environment: development
[1] * Process workers: 2
[1] * Preloading application
[1] * Listening on tcp://0.0.0.0:4000
[1] Use Ctrl-C to stop
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:44835
9: connection failed(1)
Exception: Connection refused - connect(2) for "172.18.0.1" port 26168
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `initialize'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `open'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `block in notify_dispatcher'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `times'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `notify_dispatcher'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:112:in `block in start_control'
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:33545
12: connection failed(1)
Exception: Connection refused - connect(2) for "172.18.0.1" port 26168
Any idea?
Hello Carlos,
Looks like a bit different problem, could you please attach all logs (Help | Compress Logs and Show in Finder). To reproduce we need your Dockerfile and docker-compose.yml if you are using it.
Hello Rich,
Sorry for the long response, Could you please try remove entrypoint from your docker-compose.yml? Most possible you are experiencing this issue: https://youtrack.jetbrains.com/issue/RUBY-20710