尝试远程调试时,无法为进程调度程序找到空闲套接字端口

时间:2017-07-13 14:46:43

标签: sockets intellij-idea vagrant virtualbox remote-debugging

亮点:

  • windows 10主机
  • ubuntu vagrant box(virtualbox)as guest vm
  • 使用vagrant端口转发,如下所示:config.vm.network "forwarded_port", guest: 1234, host: 12340
  • IDE:使用Ruby插件的IntelliJ IDEA

问题:

我尝试在this guide之后设置远程ruby调试并在IDE中出错:" 无法找到进程调度程序的空闲套接字端口&# 34 ;.看起来这个问题是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 ,但是远程调试应该如何工作呢? (我的意思是有没有办法访问客户端虚拟机端口而不转发它?显然没有)非常感谢任何帮助解决这个问题。

1 个答案:

答案 0 :(得分:1)

对我来说,问题是由于在后台打开的另一个调试会话。为了防止再次发生(并且还关闭所有其他当前打开的会话,再次运行配置)选择&#34;仅限单个实例&#34;在调试配置中:enter image description here