【发布时间】:2017-12-18 10:34:42
【问题描述】:
亮点:
- Windows 10 主机
- ubuntu vagrant box (virtualbox) 作为guest vm
- 像这样使用 vagrant 端口转发:
config.vm.network "forwarded_port", guest: 1234, host: 12340 - IDE:带有 Ruby 插件的 IntelliJ IDEA
问题:
我尝试在this guide 之后设置远程 ruby 调试,但在 IDE 中出现错误:“无法为进程调度程序找到空闲套接字端口”。看起来这个问题是not IntelliJ-specific,我也能够用最新的 RubyMine 重现它。
来自 IDEA 的日志
2017-07-07 21:53:03,515 [8879188] INFO - tion.impl.ExecutionManagerImpl - Failed to find free socket port for process dispatcher
com.intellij.execution.ExecutionException: Failed to find free socket port for process dispatcher
at org.jetbrains.plugins.ruby.ruby.debugger.RubyProcessDispatcher.<init>(RubyProcessDispatcher.java:46)
at org.jetbrains.plugins.ruby.ruby.debugger.RubyRemoteDebugRunner.doExecute(RubyRemoteDebugRunner.java:62)
...
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
at java.net.TwoStacksPlainSocketImpl.socketBind(TwoStacksPlainSocketImpl.java:137)
...
我可以理解它说地址已在使用中:JVM_Bind,但是远程调试应该如何工作呢? (我的意思是有什么方法可以访问来宾 vm 端口而不是之前转发它吗?显然没有)非常感谢任何解决此问题的帮助。
【问题讨论】:
-
只是为了让其他人知道,请检查远程主机上运行的命令,它应该看起来像
rdebug-ide --port 1238 --dispatcher-port 26166 --host 0.0.0.0 bin/rails -- s -p3000 -b 0.0.0.0
标签: sockets intellij-idea vagrant virtualbox remote-debugging