Windows 7 - Cannot connect to debugged process at port 55413 in 10s

I cannot debug in Windows 7.  I get a pop up window with this error:

Cannot connect to the debugged process at port 55413 in 10s:


Dumping and destroying process, when the debuggee process is running. You might try to increase the timeout. Killing...


Error Output:

C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.so: 126: The specified module could not be found.   - C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.so (LoadError)

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby-debug-base.rb:1

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-debug-ide.rb:5

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/bin/rdebug-ide:7

from C:\Ruby\bin/rdebug-ide:19:in `load'

from C:\Ruby\bin/rdebug-ide:19

from -e:1:in `load'

from -e:1



I checked and verified the specified module is indeed on my file system:

C:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\lib>dir

Volume in drive C has no label.

Volume Serial Number is A86B-4E52


Directory of C:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\lib


03/05/2010  12:42 AM    <DIR>          .

03/05/2010  12:42 AM    <DIR>          ..

03/05/2010  12:42 AM            26,908 ChangeLog

03/05/2010  12:42 AM             8,782 ruby-debug-base.rb

03/05/2010  12:42 AM            33,280 ruby_debug.so

               3 File(s)         68,970 bytes

               2 Dir(s)  67,614,240,768 bytes free


C:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\lib>

Here is my gem list:

C:\src\ruby>gem list


*** LOCAL GEMS ***


actionmailer (2.3.5)

actionpack (2.3.5)

activerecord (2.3.5)

activeresource (2.3.5)

activesupport (2.3.5)

archive-tar-minitar (0.5.2)

cgi_multipart_eof_fix (2.5.0)

columnize (0.3.1)

fxri (0.3.6)

fxruby (1.6.16)

gem_plugin (0.2.3)

hpricot (0.6.164)

httpclient (2.1.5.2)

linecache (0.43)

log4r (1.0.5)

mongrel (1.1.5)

ptools (1.1.6)

rack (1.0.1)

rails (2.3.5)

rake (0.8.7, 0.8.1)

ruby-debug (0.10.3)

ruby-debug-base (0.10.3)

ruby-debug-ide (0.4.9)

ruby-opengl (0.60.0)

ruby_core_source (0.1.4)

rubygems-update (1.3.6)

soap4r (1.5.8)

sqlite3-ruby (1.2.5)

test-unit (2.0.1)

win32-api (1.2.1, 1.2.0)

win32-clipboard (0.4.4)

win32-dir (0.3.2)

win32-eventlog (0.5.0)

win32-file (0.5.5)

win32-file-stat (1.3.1)

win32-process (0.5.9)

win32-sapi (0.1.4)

win32-sound (0.4.1)

windows-api (0.2.4)

windows-pr (0.9.3)

4 comments
Comment actions Permalink

Hi James,

Please ensure your firewall doesn't block connections on given port.

Please add this line
ruby.debug.output=true
to idea.properties file and launch debug again. This will enable verbose debug output of ruby debugger itself.

Also you can increase timeout using option ruby.debug.timeout (in seconds)
ruby.debug.timeout=20

Regards,
Oleg

0
Comment actions Permalink

I have disabled the Windows 7 firewall and I made the changes to the idea.properties file as suggested and now the error popup says:

Cannot connect to the debugged process at port 57726 in 20s:


Dumping and destroying process, when the debuggee process is running. You might try to increase the timeout. Killing...


Error Output:

C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.so: 126: The specified module could not be found.   - C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.so (LoadError)

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby-debug-base.rb:1

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-debug-ide.rb:5

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/bin/rdebug-ide:7

from C:\Ruby\bin/rdebug-ide:19:in `load'

from C:\Ruby\bin/rdebug-ide:19

from -e:1:in `load'

from -e:1

0
Comment actions Permalink

I had the same problem on my machine and for me this was due to the manifest not being embedded in ruby_debug.so. I did some searching and found a few sites with solutions (Google: ruby_debug.so.manifest).  I solved my problem (thanks to the examples I found) by running "mt.exe -manifest ruby_debug.so.manifest -outputresource:ruby_debug.so;2" from the <gem path>\ruby-debug-base-x.x.x\ext directory and copying the updated ruby_debug.so from <gem path>\ruby-debug-base-x.x.x\ext\ruby_debug.so to <gem path>\ruby-debug-base-x.x.x\lib\ruby_debug.so.  I hope this works for you.

0
Comment actions Permalink

Thank you Oleg and Jon for responding to my post.

I went to the *\ruby-debug-base-0.10.3\ext directory and performed the 'mt.exe' command:

c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\ext>dir

Volume in drive C has no label.

Volume Serial Number is A86B-4E52


Directory of c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\ext


03/09/2010  11:30 PM    <DIR>          .

03/09/2010  11:30 PM    <DIR>          ..

03/09/2010  11:30 PM            14,654 breakpoint.c

03/09/2010  11:30 PM            47,497 breakpoint.obj

03/09/2010  11:30 PM               447 extconf.rb

03/09/2010  11:36 PM             4,731 Makefile

03/09/2010  11:30 PM                26 ruby_debug-i386-mswin32.def

03/09/2010  11:30 PM               792 ruby_debug-i386-mswin32.exp

03/09/2010  11:30 PM             1,770 ruby_debug-i386-mswin32.lib

03/09/2010  11:30 PM           322,560 ruby_debug-i386-mswin32.pdb

03/09/2010  11:30 PM            61,648 ruby_debug.c

03/09/2010  11:30 PM             3,328 ruby_debug.h

03/09/2010  11:30 PM           122,908 ruby_debug.obj

03/09/2010  11:30 PM            33,280 ruby_debug.so

03/09/2010  11:30 PM               616 ruby_debug.so.manifest

03/09/2010  11:30 PM            86,016 vc90.pdb

03/09/2010  11:30 PM    <DIR>          win32

              14 File(s)        700,273 bytes

               3 Dir(s)  67,144,151,040 bytes free


c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\ext>mt.exe -manifest ruby_

debug.so.manifest -outputresource:ruby_debug.so

Microsoft (R) Manifest Tool version 5.2.3790.2076

Copyright (c) Microsoft Corporation 2005.

All rights reserved.


c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\ext>dir

Volume in drive C has no label.

Volume Serial Number is A86B-4E52


Directory of c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\ext


03/09/2010  11:36 PM    <DIR>          .

03/09/2010  11:36 PM    <DIR>          ..

03/09/2010  11:30 PM            14,654 breakpoint.c

03/09/2010  11:30 PM            47,497 breakpoint.obj

03/09/2010  11:30 PM               447 extconf.rb

03/09/2010  11:36 PM             4,731 Makefile

03/09/2010  11:30 PM                26 ruby_debug-i386-mswin32.def

03/09/2010  11:30 PM               792 ruby_debug-i386-mswin32.exp

03/09/2010  11:30 PM             1,770 ruby_debug-i386-mswin32.lib

03/09/2010  11:30 PM           322,560 ruby_debug-i386-mswin32.pdb

03/09/2010  11:30 PM            61,648 ruby_debug.c

03/09/2010  11:30 PM             3,328 ruby_debug.h

03/09/2010  11:30 PM           122,908 ruby_debug.obj

03/09/2010  11:36 PM            34,304 ruby_debug.so

03/09/2010  11:30 PM               616 ruby_debug.so.manifest

03/09/2010  11:30 PM            86,016 vc90.pdb

03/09/2010  11:30 PM    <DIR>          win32

              14 File(s)        701,297 bytes

               3 Dir(s)  67,144,142,848 bytes free



You can see the 'mt.exe' command added 1104 bytes to ruby_debug.so file.  Then I copied the new version back to the respective lib directory:

c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3>cd lib


c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\lib>dir

Volume in drive C has no label.

Volume Serial Number is A86B-4E52


Directory of c:\Ruby\lib\ruby\gems\1.8\gems\ruby-debug-base-0.10.3\lib


03/09/2010  11:30 PM    <DIR>          .

03/09/2010  11:30 PM    <DIR>          ..

03/09/2010  11:30 PM            26,908 ChangeLog

03/09/2010  11:30 PM             8,782 ruby-debug-base.rb

03/09/2010  11:36 PM            34,304 ruby_debug.so

               3 File(s)         69,994 bytes

               2 Dir(s)  67,143,700,480 bytes free



Then I restarted RubyMine and tried to debug getting the same dialog box:

Cannot connect to the debugged process at port 60546 in 20s:


Dumping and destroying process, when the debuggee process is running. You might try to increase the timeout. Killing...


Error Output:

C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.so: 126: The specified module could not be found.   - C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.so (LoadError)

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby-debug-base.rb:1

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-debug-ide.rb:5

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

from C:/Ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/bin/rdebug-ide:7

from C:\Ruby\bin/rdebug-ide:19:in `load'

from C:\Ruby\bin/rdebug-ide:19

from -e:1:in `load'

from -e:1

0

Please sign in to leave a comment.