【问题标题】:failed to find free socket port for process dispatcher when trying remote debug尝试远程调试时找不到进程调度程序的空闲套接字端口
【发布时间】: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


【解决方案1】:

对我来说,问题是由于另一个在后台打开的调试会话造成的。为了防止这种情况再次发生(并关闭所有其他当前打开的会话,一旦您再次运行配置)在调试配置中选择“仅限单一实例”:

【讨论】:

  • 对我来说问题已通过更新 IDE 解决,但您的回复也很有帮助,谢谢
  • 可怕的“找不到空闲套接字端口”的重要答案:-)
  • 对我来说,看到与 python 相同的问题。上述方法并没有解决我的问题
  • @tijis : 你使用的是什么版本的 IDE?
猜你喜欢
  • 2011-12-04
  • 1970-01-01
  • 1970-01-01
  • 2019-05-26
  • 2018-04-20
  • 1970-01-01
  • 2011-03-06
  • 2012-04-22
  • 1970-01-01
相关资源
最近更新 更多