This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 147637 - Can not start mongrel with debug mode - getting random port number
Summary: Can not start mongrel with debug mode - getting random port number
Status: RESOLVED WORKSFORME
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on: 151098
Blocks:
  Show dependency tree
 
Reported: 2008-09-18 18:22 UTC by theyaa
Modified: 2009-02-19 23:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
netbeans latest build log file (36.39 KB, text/plain)
2008-10-01 16:34 UTC, theyaa
Details
log of mongrel session with detailed logging enabled (38.55 KB, text/plain)
2008-10-01 19:41 UTC, snacktime
Details
netbeans log file (25.38 KB, text/plain)
2008-10-07 16:09 UTC, theyaa
Details
netbeans log file (235.65 KB, text/plain)
2008-10-07 16:10 UTC, theyaa
Details
netbeans ide screenshot (49.90 KB, image/gif)
2008-10-07 16:10 UTC, theyaa
Details
netbeans continuous build log (462.31 KB, text/plain)
2008-10-08 15:02 UTC, theyaa
Details
netbeans continuous build log (35.65 KB, text/plain)
2008-10-08 15:03 UTC, theyaa
Details
Netbeans log file (58.53 KB, text/plain)
2008-10-09 04:02 UTC, theyaa
Details
netbeans log with debug logging turned on (43.32 KB, text/plain)
2008-10-09 15:00 UTC, theyaa
Details
netbeans ide log (54.93 KB, text/plain)
2008-10-09 15:21 UTC, theyaa
Details
netbeans ide log with debugging log (43.20 KB, text/plain)
2008-10-13 14:44 UTC, theyaa
Details
netbeans IDE log with debugging enabled. (57.84 KB, text/plain)
2008-10-15 17:01 UTC, theyaa
Details
netbeans ide log with detailed logging (22.15 KB, text/plain)
2008-11-03 05:33 UTC, theyaa
Details
netbeans ide log (36.10 KB, text/plain)
2008-11-03 14:34 UTC, theyaa
Details
netbeans ide log (45.50 KB, text/plain)
2008-11-03 16:13 UTC, theyaa
Details
netbeans ide log (36.30 KB, text/plain)
2008-11-03 18:19 UTC, theyaa
Details
netbeans ide log (33.91 KB, text/plain)
2008-11-07 18:05 UTC, theyaa
Details
netbeans ide log (44.36 KB, text/plain)
2008-11-12 14:53 UTC, theyaa
Details
netbeans ide log (55.94 KB, text/plain)
2008-11-13 13:57 UTC, theyaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theyaa 2008-09-18 18:22:50 UTC
After updating my local gems to Rails 2.1.1, Mongrel started to acting up and wont start at all. When I try to start 
mongrel normally or in  debug mode, it uses a random port number instead of the configured 3000 port number for my web 
app.

Thank you for taking the time to look into this issue.
Comment 1 Martin Krauskopf 2008-09-19 14:47:53 UTC
Erno, is this a known issue? I can't reproduce with latest build, neither for normal nor for debug mode, neither with
JRuby nor with MRI.

Note that NetBeans tries to increase port one by one if the current one is not free. So it tries 3001, 3002, ... But you
said random, so likely you are getting something completely differecnt (like 34288?).

Could you attach the log with the latest build as described here:

  http://wiki.netbeans.org/FaqRubyNBLogging

PS: don't be confused by the first line:

  Fast Debugger (ruby-debug-ide 0.3.0) listens on localhost:37120
  => Booting Mongrel (use 'script/server webrick' to force WEBrick)
  => Rails 2.1.0 application starting on http://0.0.0.0:30001
  => Call with -d to detach
  => Ctrl-C to shutdown server
  ** Starting Mongrel listening at 0.0.0.0:30001
  ** Starting Rails with development environment...

Above 37120 is randomly choose port for *debugger* session. 30001 is the port I've set in the Rails project properties.
Comment 2 Erno Mononen 2008-09-29 09:53:59 UTC
Could you please try whether you can reproduce this with the latest build 
(http://wiki.netbeans.org/RubyInstallation#section-RubyInstallation-HowDoIGetTheContinuousBuilds)? Or was it just that 
the first line in the output mislead you (see the previous comment)?
Comment 3 theyaa 2008-09-30 06:34:22 UTC
I downloaded the latest build from development today, I click on debug main project to start mongrel with debug mode 
and tried to start mongrel with port 4879 which is totally not the port I have configured, port 3000, and did not 
complete the startup of the server because it complained about the port being on use and shutdown mongrel. The second 
try started mongrel with port 3005, and that went well and completed the startup but it is still not the configure port 
3000.

I have noticed that if I have breakpoints in the code before starting mongrel, mongrel throws an error when starting 
complaining about the breakpoints and would not start until I delete the breakpoints. That is very strange.

Please investigate.

Thank you.
Comment 4 Erno Mononen 2008-10-01 11:34:20 UTC
I don't know now what could be causing the first case, i.e. port 4879. The second case might be caused by the fact that 
the IDE tries to find a free port if the specified port is not available, so the server could be started in port 3005 
even if you had specified 3000 if ports 3000-3004 were taken. Was this the case by any chance? It would be great if you 
could enable more detailed logging (pls see http://wiki.netbeans.org/FaqRubyNBLogging), reproduce this and then attach 
the log file here.
Comment 5 theyaa 2008-10-01 16:25:58 UTC
I downloaded the latest build and edited the netbeans.conf and added the options you mentions. Now, I am totally not
able to start mongrel, as you know, in order to start mongrel I need to have mysql running, when I go to the databases
tab and try to star MySQL database that I have configured, I am unable to start it as the start command is greyed out, I
think the first step is to get that command back active in order to start MySQL.

Thanks
Comment 6 theyaa 2008-10-01 16:34:46 UTC
Created attachment 70981 [details]
netbeans latest build log file
Comment 7 snacktime 2008-10-01 19:41:08 UTC
I am having the same issue.  6.5 beta and with a dev build from a couple weeks back.  Attaching a log with detailed
logging turned on.  My port numbers are usually in the 6000 range.  The port number I set in the IDE is not in use,
that's not the issue. 
Comment 8 snacktime 2008-10-01 19:41:45 UTC
Created attachment 70990 [details]
log of mongrel session with detailed logging enabled
Comment 9 Erno Mononen 2008-10-02 09:01:11 UTC
>  in order to start mongrel I need to have mysql running, 

I think it is not really necessary -- Mongrel should start up fine, just that Rails will throw an exception when it 
will try connect to the database.

> when I go to the databases
> tab and try to star MySQL database that I have configured, I am unable to start it as the start command is greyed 
out, I
> think the first step is to get that command back active in order to start MySQL.

Please go ahead and reopen issue 148753 to resolve this (if davidvc's comment in the issue doesn't apply to your case).

Thanks both for the logs, I will investigate this.
Comment 10 Erno Mononen 2008-10-06 14:24:42 UTC
Unfortunately I couldn't track down the problem based on logs, will need to add there more logging. I'm also not able 
to reproduce the problem myself. Does this happen to you all the time? What is the port number that you have specified 
in project properties?
Comment 11 theyaa 2008-10-06 20:42:08 UTC
It happens to me all the time and I am really getting  tired of this issue. Is there any ways to log mongrel startup to 
see what is really happening when the server is starting up.

Another suggestion, are there any other servers I can use, I know that mongrel is a gem, is there another server as a 
gem I can use instead?

Thanks.

Comment 12 Erno Mononen 2008-10-07 08:21:04 UTC
You can use WEBrick or GlassFish V3 as an alternative to Mongrel. I'll add more logging to track down this, the Mongrel 
log doesn't really help in this case. I'm also increasing priority for this because this happens to you all the time. 
Could you please attach the IDE log here once more (since in the previous log you attached the startup of the server 
fails completely). Thanks for the patience.
Comment 13 theyaa 2008-10-07 16:09:21 UTC
Created attachment 71299 [details]
netbeans log file
Comment 14 theyaa 2008-10-07 16:10:00 UTC
Created attachment 71300 [details]
netbeans log file
Comment 15 theyaa 2008-10-07 16:10:53 UTC
Created attachment 71301 [details]
netbeans ide screenshot
Comment 16 theyaa 2008-10-07 16:14:58 UTC
I have attached the logs and a screenshot to show the random mongrel port number and the debugger error message. One 
thing I have observed, I can start mongrel in debug mode with version 6.1 but after several tries, a random number of 
tries. Every time I try it shots down right away until one time starts all of a sudden, This started to happen right 
after I upgraded rails to 2.1.1

One question, can I use glass fish server with ruby or is it only for JRuby interpreter?

Thanks
Comment 17 Erno Mononen 2008-10-08 11:19:43 UTC
I checked in some additional logging, could you please try with the latest continuous build (http://wiki.netbeans.org/
RubyInstallation#section-RubyInstallation-HowDoIGetTheContinuousBuilds), enable detailed logging (http://
wiki.netbeans.org/FaqRubyNBLogging), reproduce the issue once more and attach the log file here then. I hope we will 
then finally be able to track down the cause of this issue.

Wrt. GlassFish, it needs the JRuby interpreter.
Comment 18 theyaa 2008-10-08 15:02:45 UTC
Created attachment 71379 [details]
netbeans continuous build log
Comment 19 theyaa 2008-10-08 15:03:15 UTC
Created attachment 71380 [details]
netbeans continuous build log
Comment 20 theyaa 2008-10-08 15:06:05 UTC
Hi,
 I did exactly what you have suggested, I downloaded the latest continuous build, unzip it, and ran it, I was able to
reproduce the same error again. Attached is log file for you to investigate.

Thanks.

On a side note, the latest continuous build has issues with fetching rake tasks, it fails to load rake tasks with error
in fetching them.
Comment 21 Erno Mononen 2008-10-08 16:41:33 UTC
Thanks. Can you try adding the following option to netbeans_default_options in the <netbeans install dir>/etc/
netbeans.conf file and see if it helps (you need to restart the IDE then):

-J-Drails.server.http.validation=true
Comment 22 theyaa 2008-10-09 04:02:41 UTC
Created attachment 71431 [details]
Netbeans log file
Comment 23 theyaa 2008-10-09 04:30:14 UTC
Hi,
  Thank you for tracking down the issue, mongrel now tries to start the server on port 3000 with the config you gave 
me. Please make sure you include this config in the builds so it gets into version 6.5

   This does not totally fix the issue, now I have to try to start the server several times in order to get it to 
start. It is a random number of tries. Looking at the IDE log I see exceptions regarding the server startup. I have 
attached the log file so you can track down the exception. Please take a look and let me know.

Thank you for all your help
Comment 24 snacktime 2008-10-09 05:13:33 UTC
Something else I found out about this.  It happens when I have more then one version of netbeans installed, such as
having beta5 and a dev version or two dev builds.  I uninstalled both, removed all the files they leave behind, then
installed fresh and the problem went away.  I noticed this when I installed a second dev build on my laptop, and boom
same bug.  Clean everything out, install fresh, problem went away.  

Comment 25 Erno Mononen 2008-10-09 09:25:15 UTC
> It happens when I have more then one version of netbeans installed

That's good info, thanks for that. It might help to specify a different user dir for each of the installations, either 
change the following line in <netbeans install dir>/etc/netbeans.conf: 

netbeans_default_userdir="${HOME}/.netbeans/anotheruserdir"

or start the IDE with the --userdir switch, e.g.

netbeans.exe --userdir C:\anotheruserdir 

More info at http://wiki.netbeans.org/FaqAlternateUserdir

theyaa: are you also running more than one instance of the IDE?
Comment 26 Erno Mononen 2008-10-09 13:57:47 UTC
theyaa: Glad we are making at least some progress! To resolve the remaining problem, could you provide yet another log, 
this time with detailed logging enabled for debugging too: 
http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-HowToFileABug

Also, is there anything in the server.log (I mean log/server.log of the rails app)? Furthermore, it would greatly help 
if you could describe step by step what you have to do to reproduce this issue from scratch -- I'd really to get this 
completely fixed, but it is difficult as long as I can't reproduce it myself.

Comment 27 theyaa 2008-10-09 15:00:19 UTC
Created attachment 71467 [details]
netbeans log with debug logging turned on
Comment 28 theyaa 2008-10-09 15:04:22 UTC
Hi,
  I did put the config you asked me to in order to log the server debugging messages. The way to reproduce the error is
just by starting the ide, start mysql server, then click on debug main project from the debug menu, the server starts to
load then dies. I have attached the log for your review and it shows some exceptions with the ruby debugger. Please take
a look.

  Also, I do have several versions of the ide installed, I have 6.1, 6.5M1 and the latest hudson continuous release.
Would you please advice me on how can I clean my pc from all those releases and then install a clean version, and which
version should I go with.

Thank you.
Comment 29 theyaa 2008-10-09 15:21:36 UTC
Created attachment 71469 [details]
netbeans ide log
Comment 30 theyaa 2008-10-09 15:22:49 UTC
Hi,
I have changed the user dir and was able to reproduce the same error. Attached is the log from the new user dir.
Comment 31 Erno Mononen 2008-10-09 15:49:54 UTC
Thanks once again for the logs. Could you please  and try to following:

1) run the project, i.e. not in the debug mode -- does that work? 

2) turn off the -J-Drails.server.http.validation=true switch (you can just remove it or change it to false, note that 
you need to restart the IDE then) and again normally run the project. I assume that this will give you a random port 
number, but would like to confirm this.

3) turn off all firewalls you have (e.g. Zone Alarm, Windows firewall etc) and try to (normally) run again?

Regarding old versions, you can just uninstall them in Control Panel > Add or Remove Programs. For those installations 
that you installed using just the zip archive, you can just delete the directory. Having many versions installed 
shouldn't do any harm for each other though, just make sure that you specify a different user dir for each installation 
in the netbeans.conf file. Currently I'd go both with the latest build and 6.1 final.
Comment 32 theyaa 2008-10-09 23:34:29 UTC
Hi,
  I did follow all the steps you mentioned and here are the results:

1 - I ran the project in normal mode(no debug) and it ran from the first attempt without any issues. Ran on the port I
have configured which is 3000, great.

2 - I disabled the -J-Drails.server.http.validation=true switch and turned it to false. Started the server normally(no
debug) and it started the server on a random port =4955, as you expected.

3 - I disabled my firewall and tried to run the project again normally and this time I also got a random port = 4776.

I have each version running from a different folder so no interference there.
I hope this helps
Comment 33 Erno Mononen 2008-10-10 12:58:44 UTC
Thanks. Seems that for some reason the way how we try to detect whether a port is used or not does not work reliably on 
your machine. I will rewrite the code in question, let's hope that will help. 
Comment 34 theyaa 2008-10-10 14:31:19 UTC
Please let me know when the code is ready and how I can downlod it.


Thanks
Comment 35 Erno Mononen 2008-10-10 18:31:28 UTC
My attempt to fix this is now available in build #4025 and later, you can get it from 

http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/

Please make sure the the -J-Drails.server.http.validation switch is either removed or set to false before testing.
Comment 36 Erno Mononen 2008-10-10 18:41:17 UTC
Forgot to add that if it still doesn't work, please enable detailed logging once again (http://wiki.netbeans.org/
RubyDebugging#section-RubyDebugging-HowToFileABug) and attach the log file here then.
Comment 37 Quality Engineering 2008-10-11 17:20:13 UTC
Integrated into 'main-golden', will be available in build *200810111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/732eef3d7b77
User: Erno Mononen <emononen@netbeans.org>
Log: #147637: Can not start mongrel with debug mode - getting random port number
- an attempt to fix (not reproducible on my machine)
Comment 38 theyaa 2008-10-13 14:44:01 UTC
Created attachment 71667 [details]
netbeans ide log with debugging log
Comment 39 theyaa 2008-10-13 14:45:33 UTC
Hi,
  I am afraid it still does not work, the port is actually correct, 3000, but the server is terminating right after it
tries to start, I looked at the ide log and there are excepitons. I have attached a new ide log for you to take a look.

Thanks
Comment 40 Erno Mononen 2008-10-14 12:47:57 UTC
Thanks for testing it, too bad it didn't help. I'll continue to investigate this.
Comment 41 Erno Mononen 2008-10-14 15:01:47 UTC
Forgot to ask -- does debugging work for you with WEBrick (you can change the server in project properties)? 
Comment 42 Martin Krauskopf 2008-10-14 15:48:36 UTC
Seems that this issue will win the "Issue of the release" prize :)

Theyaa could you try to run from command line:

 cd E:\cms\cms2
 E:\cms\ruby\bin\ruby.exe E:\cms\ruby\bin\rdebug-ide _0.3.0_ -p 3568 -d -- script\server --port 3000"

And then from the second terminal to telnet to the debugger with:

 telnet localhost 3568

and type in the telnet session.

 start<Enter>

What does happen? Does the process start up normally and you are able to connect you application to
http://localhost:3000/ from the browser? Thanks.
Comment 43 theyaa 2008-10-14 17:23:20 UTC
Hi,
  I followed the advice from mkrauskopf, I opened a new terminal and executed the command:
E:\cms\ruby\bin\ruby.exe E:\cms\ruby\bin\rdebug-ide _0.3.0_ -p 3568 -d -- script\server --port 3000
  
  Then opened a new terminal and executed a nother command:
telnet localhost 3568

   Then typed start<enter> in the telnet terminal, in the first terminal I saw the server starting normally, then it
throws an exception, it is from ruby.exe, the exception is:
   "This application has failed to start because LIBMYSQL.dll was not found. Re-installing the application may fix this
problem"
   
  And the server quits and I am not able to connect to it through the browser.

Please investigate.
Comment 44 theyaa 2008-10-14 17:28:47 UTC
Hi,
  I made some more progress, I started mysql manually and re-tried the same procedure, I still go the same error, but
this time when I closed the error message the server started and I was able to connect to the server through the browser.

  I think we have a clue here, would you please investigate what is the difference between starting from command line
and IDE.

Thanks
Comment 45 Martin Krauskopf 2008-10-14 17:38:45 UTC
Ok, it seems that your system has something broken. The problem is reproducible from command line as you have shown.
After quick Googling:

  http://www.google.com/search?q=This+application+has+failed+to+start+because+LIBMYSQL.dll

I've got here:

  http://www.ruby-forum.com/topic/150580

Could you try hints like that to solve the problem. Once you are able to start the debugger/server from CLI you should
be able to start it from NetBeans as well.

BTW, does:

 cd E:\cms\cms2
 E:\cms\ruby\bin\ruby.exe script\server --port 3000

(i.e. without the debugger) works for you from CLI?

Comment 46 theyaa 2008-10-15 15:12:28 UTC
I have followed the instructions in the link you gave me, I was able to start the server in debug mode without any
issues, which was great!!. I thought the problem was solved!!. I started the  IDE and tried to start the server in debug
mode. THE SAME PROBLEM!!!. The  same exception in the log.
FINE [org.rubyforge.debugcommons.ReadersSupport]: Connection reset
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:168)
	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
	at java.io.InputStreamReader.read(InputStreamReader.java:167)
	at java.io.BufferedReader.read1(BufferedReader.java:185)
	at java.io.BufferedReader.read(BufferedReader.java:261)
	at org.kxml2.io.KXmlParser.peek(Unknown Source)
	at org.kxml2.io.KXmlParser.peekType(Unknown Source)
	at org.kxml2.io.KXmlParser.nextImpl(Unknown Source)
	at org.kxml2.io.KXmlParser.next(Unknown Source)
	at org.rubyforge.debugcommons.ReadersSupport.startXPPLoop(ReadersSupport.java:112)
	at org.rubyforge.debugcommons.ReadersSupport.access$200(ReadersSupport.java:21)
[catch] at org.rubyforge.debugcommons.ReadersSupport$XPPLoop.run(ReadersSupport.java:249)
Comment 47 Martin Krauskopf 2008-10-15 15:31:46 UTC
That would be quite weird. Are you sure you are using the same Ruby from CLI - which works for you; and the same Ruby
from NetBeans?

Weird thinks is that you were able to start up server without debugger even when there were LIBMYSQL.dll problem - I
can't really explain that.

So to summarize current situation:
- you *are* able to proceed through the procedure with telnet I've described
- you *are not* able to use debugger with the *same* Ruby set for the Rails project in NetBeans
- you *are* able to *run* the Rails project from both, CLI and NetBeans
- you *are* able to debug/run using Webrick from CLI and NetBeans

Are my above claiming true? Thanks.
Comment 48 theyaa 2008-10-15 16:04:14 UTC
Actually it is not quite that. I am able to Start Webrick and even Mongrel from netbeans in debug mode. The only 
different between normal start and debug mode in netbeans is that, the normal start goes from the first time without 
issues, in debug mode I have to try several times till I get it to start, and the number of times is random, sometimes 
from the second time another time from the 20th time. 

From CLI both start from the first time, normal and debug.


Comment 49 Martin Krauskopf 2008-10-15 16:10:06 UTC
So great, we get a little bit further, now you are able to debug at least somehow. So could you do that - i.e. try to
debug, when it fails, try it again, etc. and attach the log as you did several times before. Hopefully we will move
further again. Thanks.
Comment 50 theyaa 2008-10-15 17:01:32 UTC
Created attachment 71882 [details]
netbeans IDE log with debugging enabled.
Comment 51 theyaa 2008-10-15 17:02:18 UTC
Ok, I did restart netbeans, and tried to start Mongrel in debug mode inside netbeans, it started with the second try. 
In the log I see SocketException. Attached is the IDE log. 

Thanks for the help
Comment 52 Martin Krauskopf 2008-10-16 12:40:17 UTC
The only difference is the port used for the debugger backend. Could you try the "telnet procedure" with both scenario.
I.e.:

  cd E:\cms\cms2
  E:\cms\ruby\bin\ruby.exe E:\cms\ruby\bin\rdebug-ide _0.3.0_ -p 4947 -d -- script\server -e development --port 3000

And then from the second terminal to telnet to the debugger with:

  telnet localhost 4947

and type in the telnet session.

  start<Enter>

Try to connect to browser to the application (if the procedure did not fail sooner).

Then repeat for port 4950 (instead of 4947). If the 4947 does not work and 4950 works than it might be some firewall issue.

Comment 53 theyaa 2008-10-16 14:30:44 UTC
I think we are back to an even worse situation, I can not even start the server in the CLI neither, here are the results
of both ports from the command line.

E:\cms\cms2>E:\cms\ruby\bin\ruby.exe E:\cms\ruby\bin\rdebug-ide _0.3.0_ -p 4950
-d -- script\server -e development --port 3000
Waiting for connection on 'localhost:4950'
Fast Debugger (ruby-debug-ide 0.3.0) listens on localhost:4950
Starting command read loop
Processing: start
Starting: running program script
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.1.1 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
DEPRECATION WARNING: Inflector is deprecated! Use ActiveSupport::Inflector inste
ad.  See http://www.rubyonrails.org/deprecation for details. (called from E:/cms
/cms2/config/initializers/inflections.rb:5)
Exiting

E:\cms\cms2>E:\cms\ruby\bin\ruby.exe E:\cms\ruby\bin\rdebug-ide _0.3.0_ -p 4947
-d -- script\server -e development --port 3000
Waiting for connection on 'localhost:4947'
Fast Debugger (ruby-debug-ide 0.3.0) listens on localhost:4947
Starting command read loop
Processing: start
Starting: running program script
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.1.1 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
DEPRECATION WARNING: Inflector is deprecated! Use ActiveSupport::Inflector inste
ad.  See http://www.rubyonrails.org/deprecation for details. (called from E:/cms
/cms2/config/initializers/inflections.rb:5)
Exiting


I even tried your earlier command from an earlier post and now even that one does not work anymore. The only thing I
have changed, since the last time I ran this command, is installing the mysql gem.

 


Comment 54 Erno Mononen 2008-10-16 14:51:27 UTC
Does 

E:\cms\ruby\bin\ruby.exe script\server -e development --port 3000

from the command line still work?

Could you also attach the log/development.log and log/server.log files (after a failed startup attempt). And finally, 
can you try whether using WEBrick works, with and without debuggging, i.e.:

without:
E:\cms\ruby\bin\ruby.exe script\server webrick -e development --port 3000

and with:
E:\cms\ruby\bin\ruby.exe E:\cms\ruby\bin\rdebug-ide _0.3.0_ -p 4950 -d -- script\server webrick -e development --port 
3000
Comment 55 theyaa 2008-10-16 15:34:53 UTC
Hi sorry for the confusion, I was able to start the server on both ports, 4947 and 4950, with debug mode successfully.
The trick was that I had forgot to start mysql server and that was the reason the server was exiting.

Now, both ports works fine from the first attempt from command line. Sorry again for the confusion.
Comment 56 Erno Mononen 2008-10-16 17:28:27 UTC
But it still doesn't work from the IDE or does it?
Comment 57 theyaa 2008-10-16 17:33:03 UTC
No it doesn't, from the IDE I have to try several times in order to get the server to start. the log shows Socket
Exceptions the same as the ones in the las log I attached.

One question here, how do I change the port the debugger starts in netbeans?

The example ports you gave me was 4947 and 4950, the one I got mongrel to start with after several attempts was 2338. I
would like to change the debugger port in netbeans to start with port 4947 or 4950 if possible, is that doable?

Comment 58 Martin Krauskopf 2008-10-17 00:16:37 UTC
Theyaa, another idea. It helped in similar issue. Could you try to upgrade to newer Ruby:

  http://www.ruby-lang.org/en/downloads/

MRI 1.8.6-p111 is a bit outdated.
Comment 59 theyaa 2008-10-17 16:39:59 UTC
Hi,
 I believe upgrading Ruby wont make any difference, I can start the server with debug in command line without any 
issues and from the first time, if the issue was with Ruby then I would have had the same issue in command line and in 
IDE right?

  I believe the issue is with how netbeans tries to start the debugger, it works sometimes and it does not work other 
times. There is where I would look and see. From my observation, the debugger is not trying to increment the port if 
the first one does not work, are you able to make it try another port if the first one does not work and keep trying 
until it can connect to one?

 
Thanks
Comment 60 Martin Krauskopf 2008-10-20 14:17:41 UTC
re Ruby-upgrade> there were some Segmentation Fault problems with MRI. The scenario from the CLI is the simplest
possible which might or might not reveal the problem. Upgrading Ruby to the non-buggy one helps several time in similar
scenarios. So still worth to try. Ruby 1.8.6-p111 does contain some bugs which were already fixed in newer version. It
should not be used. Either latest 1.8.6, latest patch (ruby-1.8.6-p287 in the meantime), or latest 1.8.7 (ruby-1.8.7-p72
in the meantime).

> the debugger is not trying to increment the port if the first one does not work
The debugger always find random free port. So this should not be the issue. Code is here (method Util#findFreePort)

  http://debug-commons.rubyforge.org/svn/intermediate-java/trunk/src/org/rubyforge/debugcommons/Util.java

Since I have no clue what could be wrong (if newer MRI does not help), I'll have to take a look where to add more logging.
Comment 61 theyaa 2008-10-20 15:38:59 UTC
Do you have the links for the binaries for the versions you mention. I looked around and all I saw was the source code. 
I need to windows version which contains the binaries like ruby.exe.

Would you please give me the links
Comment 62 Martin Krauskopf 2008-10-20 16:00:24 UTC
I've forgotten that you are on Windows. Hmm, there is:

  http://www.ruby-lang.org/en/downloads/

where seems to be binaries for 1.8.7. There is also link to One-Click installer for 1.8.6:

  http://rubyforge.org/frs/?group_id=167

But only "1.8.6-27 Release Candidate 1" contains "Ruby 1.8.6 patch level 287" according to Changelog:

  http://rubyforge.org/frs/shownotes.php?release_id=26150

Not sure what is the stability of the RC1.
Comment 63 theyaa 2008-10-20 17:28:36 UTC
Hi,
 I followed your advice and updated to Ruby 1.8.6 patch level 287, now it is even worse, it takes more tries to start 
the server, about over 20 time till I got it to start.
 Another problem is when I try access the rake tasks I get this error "Rake tasks fetching failed with working 
directory", any idea?

Thanks
Comment 64 Martin Krauskopf 2008-10-21 06:42:40 UTC
re debugger> Ok, thanks for the try. I'll have to take a look where to put more logging among the debugger layers. I do
not have a clue what could be done until then.

re rake> please file a new issue. This one is already too bloated. Thanks.
Comment 65 theyaa 2008-10-23 15:55:50 UTC
Hi,
 I hope you are doing some progress with this issue because now it is worse, I can not even start mongrel in debug mode
anymore. Please help.

Thanks
Comment 66 Martin Krauskopf 2008-10-23 16:04:33 UTC
Yes, I'm working on the backends and intermediate library at debug-commons project:

  http://debug-commons.rubyforge.org/ or https://rubyforge.org/projects/debug-commons/

which is utilized by NetBeans.
Comment 67 theyaa 2008-10-28 15:17:29 UTC
Any progress on this issue please?
Comment 68 Martin Krauskopf 2008-10-29 07:29:08 UTC
Sorry, no in the last 4 days, we had a public holiday here and a vacation. Continuing today. Will let you know
immediately when I have something (hopefully until the Friday or sooner).
Comment 69 Martin Krauskopf 2008-10-30 09:09:30 UTC
Progress in the backend:

   http://rubyforge.org/pipermail/debug-commons-commits/2008-October/000288.html

I'll update intermediate library soon and update NetBeans to use it all.

Will have to work simultaneously on new P1 151698. So be patient ;)
Comment 70 theyaa 2008-10-30 14:05:10 UTC
Thank you so much for the progress, I really appreciate it.
Comment 71 Martin Krauskopf 2008-10-31 09:16:04 UTC
debug-commons-java progress:

   http://rubyforge.org/pipermail/debug-commons-commits/2008-October/000291.html

Commit message:

  Robustness, strictness, logging:

  - let <message>s to come asynchronously
  - strict debug-commons protocol checking
  - better logging infrastructure
Comment 72 theyaa 2008-10-31 14:34:50 UTC
This is great progress, please let me know when I will be of assistance.

Thank you.
Comment 73 Martin Krauskopf 2008-10-31 15:36:35 UTC
Hi. I've purposely did not reply here yet. Since the build with the progress is not ready yet. It will be #4195 (if it
passes). When it is ready, if you could try to reproduce again, following instructions at:

   http://wiki.netbeans.org/RubyDebugging70#section-RubyDebugging70-HowToFileABug

OW content is not needed anymore. Just IDE log as usually.

I do not think it will be fixed, but there is a bunch of changes which should make tracking of the bug easier. If not
clear from the first sight, I'll add more logging, until we catch it.
Comment 74 theyaa 2008-10-31 15:39:43 UTC
Thank you, just let me know when the build is ready and I will get it installed and try it out.

Thank you
Comment 75 Quality Engineering 2008-10-31 16:30:51 UTC
Integrated into 'main-golden', will be available in build *200810311401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/46dcdd39fb84
User: Martin Krauskopf <mkrauskopf@netbeans.org>
Log: Upgrading to new ruby-debug-ide (0.4.0) and new debug-commons-java (related to issues like #151098, #147637, #147637). In general brings robustness, strictness and better logging infrastructure (only one log is needed now) of underlaying layers. Might reveal more bugs.

Changelog of debug-commons-java since last update:

  * Robustness, strictness, logging:
    * let <message>s to come asynchronously
    * strict debug-commons protocol checking
    * better logging infrastructure
    * more info during failures
Comment 76 Martin Krauskopf 2008-10-31 16:49:46 UTC
The build is ready. So if you could reproduce with turned logging on as described at:

  http://wiki.netbeans.org/RubyDebugging70#section-RubyDebugging70-HowToFileABug
  (no CLI options needed anymore)

and attach the log. Thanks.
Comment 77 theyaa 2008-11-03 05:33:05 UTC
Created attachment 73093 [details]
netbeans ide log with detailed logging
Comment 78 theyaa 2008-11-03 05:33:41 UTC
I have attached the log file, please review and investigate.

Thanks
Comment 79 Martin Krauskopf 2008-11-03 10:37:49 UTC
The log you've attached does not contain any traces that would show the usage of the debugger. Did you try to run the
debugger? It does not seems to from the log.
Comment 80 theyaa 2008-11-03 14:34:59 UTC
Created attachment 73130 [details]
netbeans ide log
Comment 81 theyaa 2008-11-03 14:43:22 UTC
It seems like activating the detailed debugging through the ide is not working properly. I had to go edit the 
netbeans.conf and add the options, this time you have the exception. please take a look. 
Comment 82 theyaa 2008-11-03 16:13:17 UTC
Created attachment 73135 [details]
netbeans ide log
Comment 83 theyaa 2008-11-03 16:13:39 UTC
Attaching another log after applying the jar you sent
Comment 84 Martin Krauskopf 2008-11-03 17:32:29 UTC
1) Could you try to pass -J-Dorg.netbeans.modules.ruby.debugger.timeout=40

2) Do you have any firewall activated? If yes, does it help to turn the firewall off?
Comment 85 theyaa 2008-11-03 18:19:21 UTC
Created attachment 73150 [details]
netbeans ide log
Comment 86 theyaa 2008-11-03 18:19:57 UTC
I added your config and disabled my firewall, same error, nothing changed, attached is the log file
Comment 87 Martin Krauskopf 2008-11-03 18:40:10 UTC
I guess that the "manual telnet way" still works for you, right?

First terminal: 

  E:\cms\cms2> e:\cms\ruby\bin\ruby.exe E:\cms\ruby\bin\rdebug-ide _0.4.0_ -p 4344 --xml-debug -- script\server --port 3000

Second one:

  > telnet localhost 4344

Then in started session:

  b E:\cms\cms2\app\controllers\content_controller.rb:1333<Enter>
  start<Enter>

Does it work? I think we have not tried setting breakpoint from CLI. Might be it will cause some error.

If not I think that the next step will be to simulate the behaviours with two mini-apps in Ruby and Java, outside of
NetBeans.

PS: please stop changing the Status of the issue from STARTED to NEW. The Status field is supposed to be set by the
developer to better orientate in the issues he is currently investigating or working on. Thanks.
Comment 88 theyaa 2008-11-04 14:57:22 UTC
Your suggestion worked perfectly, I followed the steps and mongrel started from the first try from CLI without any 
errors.
Comment 89 Martin Krauskopf 2008-11-04 15:21:43 UTC
Ok, thanks. What is your ipconfig? Are you using IPV6 by any chance. Is the localhost configured properly?

If you could play with ruby-debug.rb, particularly with line:

  server = TCPServer.new(host, port)

replacing the host variable with e.g.:

  server = TCPServer.new('127.0.0.1', port)

or 

  server = TCPServer.new(nil, port)

whether something starts to work, it could be helpful. I think, you can find ruby-debug.rb on your system in:

  e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/lib/ruby-debug.rb

I want to implement RFE 104473 where you could specify it from NetBeans. Or I can likely provide some properties. Or we
can try to write some simple programs in Java and Ruby to get closer to the specifics of your system.
Comment 90 theyaa 2008-11-04 15:44:48 UTC
Sorry none of them worked, I tried nil and 127.0.0.1 and both had the same effect as the original value.
Comment 91 Martin Krauskopf 2008-11-04 15:59:09 UTC
And to my other questions?

> What is your ipconfig? Are you using IPV6 by any chance. Is the localhost configured properly?

Just to exclude as much as possible.
Comment 92 theyaa 2008-11-04 19:53:18 UTC
To answer your question, how do I know what is my ipconfig version?, how do I know if my localhost is properly 
configured?. Would you guide me please
Comment 93 Martin Krauskopf 2008-11-04 21:06:11 UTC
"ipconfig /all" should show four-numbers IP address, like 192.168.1.20.

Also I suppose that you are not able to debug even simples script. I.e. when you create a new Ruby (non-Rails) project
(Menu | File | New Project | Ruby | Ruby Application) and put a breakpoint in main.rb on:

  puts "Hello World"

the debugger fails in the same way, right?
Comment 94 theyaa 2008-11-05 17:06:48 UTC
I have created a test app, created a model, tried to start mongrel on this app with debug and had the same exact issue, 
so it is not from my app it is in the ide. Please investigate
Comment 95 Martin Krauskopf 2008-11-05 18:29:12 UTC
Please re-read my previous comment. I meant whether it work with *non*-Rails application.

> ... Menu | File | New Project | Ruby | Ruby Application ...
Comment 96 theyaa 2008-11-06 02:31:41 UTC
I followed your comments and created a ruby application ( Non rails application) trying to start the debugger produced 
the same error, I was not able to start the debugger, so no changes here

java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:168)

Comment 97 Martin Krauskopf 2008-11-06 18:21:20 UTC
I've implemented Remote Debugging in the meantime (issue 104473). So we have another way to move a little bit. So could you:

1) create *non*-Rails application (Menu | File | New Project | Ruby | Ruby Application)
2) put a breakpoint in main.rb at line 4 => puts "Hello World"
3) from command line, from the created application's 'lib' directory run:

   E:\cms\ruby\bin\rdebug-ide rdebug-ide -p 7000 --xml-debug -- E:\full\path\to\created_application\lib

     and/or

   E:\cms\ruby\bin\rdebug-ide rdebug-ide -p 7000 -h localhost --xml-debug -- E:\full\path\to\created_application\lib

4) then in NetBeans remotely attach to the process with 'Menu | Debug | Attach', choose Ruby Debugger from combobox,
   press OK.

Does it work? If not, is there something interesting on the CLI? Could you attach the output from CLI and the IDE log as
usually? Thanks.
Comment 98 theyaa 2008-11-07 06:07:04 UTC
I followed your steps until I got to the point of attaching a debugger, I went to Menu|Debug|Attach Debugger. The only 
option I got  there was Web Page Debugger (Javascript). I was not able to select any other debugger.
Comment 99 Martin Krauskopf 2008-11-07 09:44:26 UTC
Hi, you have to take the latest continous build:

http://wiki.netbeans.org/RubyInstallation#section-RubyInstallation-HowDoIGetTheContinuousBuilds
Comment 100 theyaa 2008-11-07 17:07:21 UTC
OK, downloaded the latest build, followed your instructions, attaching the debugger did not work. Using both commands, 
here is what I got in the CLI

E:\cms\test2\lib>E:\cms\ruby\bin\rdebug-ide rdebug-ide -p 7000 --xml-debug -- E:
\cms\test2\lib
Fast Debugger (ruby-debug-ide 0.4.0) listens on localhost:7000
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:49: warni
ng: already initialized constant ARGV
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:54: warni
ng: already initialized constant RDEBUG_SCRIPT
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:71: warni
ng: already initialized constant PROG_SCRIPT

E:\cms\test2\lib>E:\cms\ruby\bin\rdebug-ide rdebug-ide -p 7000 -h localhost --xm
l-debug -- E:\cms\test2\lib
Fast Debugger (ruby-debug-ide 0.4.0) listens on localhost:7000
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:49: warni
ng: already initialized constant ARGV
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:54: warni
ng: already initialized constant RDEBUG_SCRIPT
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:71: warni
ng: already initialized constant PROG_SCRIPT
Comment 101 theyaa 2008-11-07 17:08:53 UTC
The ide log did not have any exceptions in it, just the regular stuff when the ide is starting.
Comment 102 Martin Krauskopf 2008-11-07 17:14:17 UTC
Sorry, example I've given was mistyped. You have to pass full path to the debugged file, i.e.:

   E:\cms\ruby\bin\rdebug-ide rdebug-ide -p 7000 --xml-debug -d -- E:\cms\test2\lib\main.rb

Be sure, that main.rb exist. Those WARNINGs are ok, I guess. I've also added "-d" switch (will be more verbose in the
console).
Comment 103 theyaa 2008-11-07 18:04:18 UTC
Same thing, log from CLI

E:\cms\test2\lib>E:\cms\ruby\bin\rdebug-ide rdebug-ide -p 7000 --xml-debug -d --
 E:\cms\test2\lib\main.rb
Fast Debugger (ruby-debug-ide 0.4.0) listens on localhost:7000
<breakpointAdded no="1" location="E:/cms/test2/lib/main.rb:4"/>
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:49: warni
ng: already initialized constant ARGV
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:54: warni
ng: already initialized constant RDEBUG_SCRIPT
e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.0/bin/rdebug-ide:71: warni
ng: already initialized constant PROG_SCRIPT

And the ide log will be attached in a sec
Comment 104 theyaa 2008-11-07 18:05:16 UTC
Created attachment 73490 [details]
netbeans ide log
Comment 105 theyaa 2008-11-07 18:06:23 UTC
It has been almost 2 months since I have opened this issue, :-)
Comment 106 Martin Krauskopf 2008-11-08 09:44:09 UTC
This time the NetBeans successfully connected to the backend and successfully submitted a breakpoint to it. But backend
then did not stop on the breakpoint for some reason. So there seems to be some bug in the backend. But we've at least
passed the "Connection Exception" problem.

2 months> Yup, that's the record here. I've never had such a long issue :) Actually that's also that we have been
solving more (related) issues at once here. But unfortunately there seems to be something specific on your machine,
since we have tried on multiple Windows machines and it works for us everywhere. Also no other users have submitted
similar issues. But let's don't give up. Only more logging at this time helps. I think that now with the 'remote
debugging' it will be easier since we see direct reaction of the backend at command line managed by NetBeans frontend.

Will ping you back when I have something more.
Comment 107 Martin Krauskopf 2008-11-10 15:23:58 UTC
I've released new backend, ruby-debgu-ide 0.4.1 which contains fix for the '-x' switch which provides very detailed
logging and introduce the '--stop' switch. So next round. Could you upgrade to the version 0.4.1 and run from terminal:

  E:\cms\test2\lib>E:\cms\ruby\bin\rdebug-ide -p 7000 --xml-debug -d -x --stop -- E:\cms\test2\lib\main.rb

and attach to it from NetBeans. What are the results?

You will need build #4278 or later:
  http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/

(BTW, I've just noticed that in the previous command you have passed 'rdebug-ide' twice, which could cause the failure)
Comment 108 theyaa 2008-11-11 15:30:59 UTC
I followed you instruction, downloaded the latest build and ran the  command as instructed. It seems like everything
worked just fine, from the first attempt the breakpoint was hit and I was able to debug. So your methods works great.
below is the trace from the CLI


E:\cms\test2\lib>E:\cms\ruby\bin\rdebug-ide -p 7000 --xml-debug -d -x --stop --
E:\cms\test2\lib\main.rb
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.2-x86-m
swin32/lib/ruby-debug-base.rb:200", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.2-x86-m
swin32/lib/ruby-debug-base.rb:200", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.2-x86-m
swin32/lib/ruby-debug-base.rb:203", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:89", threadId=1
trace: location="e:/cms/ruby/lib/ruby/1.8/ostruct.rb:74", threadId=1
trace: location="e:/cms/ruby/lib/ruby/1.8/ostruct.rb:74", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:111", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:111", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:112", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:112", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:113", threadId=1
Fast Debugger (ruby-debug-ide 0.4.1) listens on localhost:7000
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:91", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:91", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:93", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:94", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:97", threadId=1
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:98", threadId=1
Starting command read loop
Processing: b E:\cms\test2\lib\main.rb:4
<breakpointAdded no="1" location="E:/cms/test2/lib/main.rb:4"/>
Processing: start
Starting: running program script
trace: location="e:/cms/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.1/lib/rub
y-debug.rb:101", threadId=1
trace: location="e:/cms/ruby/lib/ruby/1.8/ostruct.rb:74", threadId=1
trace: location="e:/cms/ruby/lib/ruby/1.8/ostruct.rb:74", threadId=1
trace: location="E:\cms\test2\lib\main.rb:4", threadId=1
<suspended file='E:/cms/test2/lib/main.rb' line='4' threadId='1' frames='1'/>
Stopping Thread #<Thread:0x284c748>
Threads equal: true
Processing: th l
<threads>
<thread id="1" status="sleep" />
</threads>
Processing: w
Processing context: w
<frames>
<frame no='1' file='E:/cms/test2/lib/main.rb' line='4' current='true' />
</frames>
Processing: cont
Processing context: cont
Resumed Thread #<Thread:0x284c748>
Hello World

E:\cms\test2\lib>
Comment 109 Martin Krauskopf 2008-11-11 15:49:37 UTC
Great at least there is some way for you to debug.

But still does not work for you if you try to debug inside of NetBeans, right?
Comment 110 theyaa 2008-11-11 15:52:07 UTC
No, inside the ide is a pain, I had to try over 20 times to get the debugger to start. What would be the next step now?
Comment 111 Martin Krauskopf 2008-11-11 15:57:06 UTC
So could you attach latest log when the debugging fails from inside the IDE. Let's see whether there is something new.

As usually: http://wiki.netbeans.org/RubyDebugging70#section-RubyDebugging70-HowToFileABug
Comment 112 Martin Krauskopf 2008-11-11 15:57:46 UTC
PS: please attach the log for *non*-Rails project scenario. E.g. with the Hello World sample in main.rb.
Comment 113 theyaa 2008-11-12 14:53:54 UTC
Created attachment 73682 [details]
netbeans ide log
Comment 114 theyaa 2008-11-12 14:54:46 UTC
Attached is the ide  log while trying to start the non rails app within the  ide in debug mode.
Comment 115 Martin Krauskopf 2008-11-12 16:05:36 UTC
Also one more idea (thanks Erno). Could you try to download and try a newer JDK version:

  https://jdk6.dev.java.net/
Comment 116 theyaa 2008-11-13 13:57:25 UTC
Created attachment 73729 [details]
netbeans ide log
Comment 117 theyaa 2008-11-13 13:57:57 UTC
I applied the file you sent me and attached here the ide log. good luck
Comment 118 Martin Krauskopf 2008-11-13 14:00:54 UTC
There should be also few lines in the OW, could you copy-paste them here. Something like:

  Fast Debugger (ruby-debug-ide 0.4.1) listens on localhost:34621
  MK>   server (TCPServer): #<TCPServer:0xb7e37008>
  MK>   session (TCPSocket): #<TCPSocket:0xb7e36be4>
  MK>   interface (Debugger::RemoteInterface): #<Debugger::RemoteInterface:0xb7e36b44>
  MK>   @event_processor (Debugger::EventProcessor): #<Debugger::EventProcessor:0xb7e36ab8>

Or was there just a one line?
Comment 119 theyaa 2008-11-13 14:03:01 UTC
Fast Debugger (ruby-debug-ide 0.4.1) listens on localhost:1144

MK>   server (TCPServer): #<TCPServer:0x2dee32c>

Comment 120 Martin Krauskopf 2008-11-13 14:05:07 UTC
Just this one line? This should not be practically possible if you have applied the file I've send you.
Comment 121 theyaa 2008-11-13 14:19:49 UTC
Trust me, just this one line, is there any kind of screen sharing possibility so I can show you?

Comment 122 Martin Krauskopf 2008-11-13 14:27:24 UTC
I trust you ;) Just double checking this weird state.
Comment 123 Martin Krauskopf 2008-11-13 14:28:22 UTC
Damn, I've missed the first line. Sorry.
Comment 124 theyaa 2008-11-13 14:28:39 UTC
Trust me I want to get over with this issue as soon as possible
Comment 125 Martin Krauskopf 2008-11-13 15:00:48 UTC
That very weird. It seems that on Ruby side:

  server = TCPServer.new(host, port)
  while (session = server.accept)
    ...

'server.accept' waits for connection. Java tries to *successfully* connects to it (or to "something", but you have said,
that you are not running firewall or anything like this). But then there is no message from Ruby process anymore. It
seems it dies (could you check that if there is no Ruby task in Windows Task Manager). I'm not sure what more to do.
Suggestion:

- installing latest Ruby
- installing latest JDK

Let us know whether did it help. On Linux there were major issues with 1.8.6, it fails on SEGFAULT, might be similar here.
Comment 126 Martin Krauskopf 2008-12-03 15:28:41 UTC
Has anything changed? Did last suggestion helped somehow? Still, not duplicate or anything similar has been filed so far.
Comment 127 theyaa 2008-12-03 15:31:37 UTC
Yes, I have installed a new version of JDK and installed NB 6.5, that seemed to solve the problem. I do not know why 
this would solve the problem but I suspect some corruption in the old JDK I was using. Thank you so much for all the 
help and dedication you showed in helping me resolve this issue, I appreciate it.

Thanks
Comment 128 Martin Krauskopf 2008-12-03 15:35:41 UTC
Thanks for confirmation. Closing as works-for-me. At least it helped to make the debugger a bit more robust due to
various checks for this issue. The will surely help in the future :)