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 95128 - Difficult to manage WEBrick server instance
Summary: Difficult to manage WEBrick server instance
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
: 96700 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-09 19:24 UTC by Craig Mcclanahan
Modified: 2007-07-03 14:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Mcclanahan 2007-02-09 19:24:28 UTC
Although the WEBrick server shows up in the runtime tab, there is no available
action to start or stop it.  The only way to shut it down seems to be shutting
down NetBeans itself ... and you have to remember to click the checkbox to go
ahead and kill this external process as well -- otherwise, you will leave behind
an orphan.

There should be ways to manage this server on the Runtime tab.
Comment 1 William Leonard 2007-03-07 15:34:02 UTC
In my experience, even shutting down NetBeans doesn't terminate the process
(even though it says it will).
Comment 2 Torbjorn Norbye 2007-03-13 23:56:15 UTC
This should be fixed now; there is a Stop button right in the webrick window, and process killing should 
be working. (Please let me know if it does not; it's definitely fixed on Unix but I can't verify on Windows, 
and since the changes involved the startup scripts (adding exec to the jruby unix script), I wonder whether 
similar changes are necessary for the Windows jruby.bat file.
Comment 3 William Leonard 2007-03-14 18:54:41 UTC
Tor, the stop button isn't stopping WEBrick on Windows, although it thinks it
does. So trying a restart just causes a port conflict error.

/Brian
Comment 4 Torbjorn Norbye 2007-03-19 22:11:29 UTC
I've just checked in a fix which I hope will take care of this.  The fix is to bypass the JRuby launcher 
scripts completely (avoiding the fork/exec issue with .bat files that were fixed by doing an exec in the 
Unix script).

I'm now launching the Java VM directly. I believe Process.destroy should work for Windows as well. 

This did however involve replacing a bunch of platform specific code, and I don't have a Windows 
machine to test on. I would appreciate it if anyone could check the latest build and let me know 
whether JRuby process termination now works (and more importantly, whether process -launching- still 
works...)

You can force the old behavior (for now, until we find out whether this works) by adding

-J-Druby.use.jruby.script=true

to etc/netbeans.conf.

Comment 5 Torbjorn Norbye 2007-03-19 22:25:50 UTC
*** Issue 96700 has been marked as a duplicate of this issue. ***
Comment 6 Pavel Buzek 2007-03-19 23:19:13 UTC
Yes, it appears to work on windows. Thanks!
Comment 7 Torbjorn Norbye 2007-03-19 23:59:21 UTC
Perfect, thank you for the confirmation.  By the way, do you have spaces in your path to the executable? 
(common on Windows with userdirs). If so I can close another bug too.
Comment 8 William Leonard 2007-03-28 02:06:19 UTC
> I'm now launching the Java VM directly.

Tor, one side effect of this change is that the JVM is no longer picking up the
%CLASSPATH% environment variable, for example, derbyclient.jar. Is it still
possible to configure the launcher you are now using for the Java VM?
Comment 9 Torbjorn Norbye 2007-04-02 15:45:12 UTC
I just checked in a fix (will be in Hudson build 681) where jars on $CLASSPATH will be passed to the JRuby 
VM. (There will also be a library customizer which will replace this, but this should hopefully be an easier 
interim solution.)
Comment 10 Jiri Kovalsky 2007-07-03 14:14:11 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 11 Jiri Kovalsky 2007-07-03 14:44:40 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.