products forums blog support careers about
  History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ROR-148
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Chris Williams
Reporter: Terry Roe
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Aptana RadRails

Stopping server within RadRails doesn't work

Created: 25/Nov/07 02:54 PM   Updated: 18/Jan/08 10:18 AM
Component/s: Servers
Affects Version/s: 0.9.1
Fix Version/s: 1.0.0, 0.9.2, 1.0.0 RC 1

Environment: Ubuntu 7.10 Gutsy Gibbon, Aptana Studio 1.0.0 Community Edition (build: 1.0.0.003242), RadRails 0.9.1 (build 0.9.1.200711131528NGT)
Issue Links:
Depends
 
Duplicate
 

Importance: Critical
Studio Install Type: Standalone
Operating System: Ubuntu
Last Known Good Version: unknown
Participants: Chris Williams, Terry Roe and Torsten Crass


 Description  « Hide
Server starts fine the first time. Restart produces:

"7948"
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3001
=> Ctrl-C to shutdown server; call with --help for options
[2007-11-25 12:46:49] INFO WEBrick 1.3.1
[2007-11-25 12:46:49] INFO ruby 1.8.6 (2007-06-07) [i486-linux]
[2007-11-25 12:46:49] WARN TCPServer Error: Address already in use - bind(2)
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Address already in use - bind(2) (Errno::EADDRINUSE)
from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
from ./script/../config/../vendor/rails/railties/lib/webrick_server.rb:58:in `new'
... 8 levels...
from ./script/server:3:in `require'
from ./script/server:3
from -e:2:in `load'
from -e:2

Stopping and then attempting to start again produces the dialog with the text: "The server could not be started. The port is already in use."

One can kill the process from the command line and then start the server again within Aptana, but this is not a fluid way to work

Bug #4812 said this was fixed. But after the fix in that bug's history others have reported still having the issue, as am I. I was instructed to open a new bug by cwilliams in the forums.



 All   Comments   Change History      Sort Order:
Terry Roe - 25/Nov/07 02:55 PM
I noticed I used an example with port 3001. This also occurs with the default port of 3000.

Chris Williams - 26/Nov/07 04:04 PM
This ticket stems from http://www.aptana.com/trac/ticket/4812

It looks like the current issue is stopping webrick on OSX and Linux - but who knows, maybe mongrel is broken again now too?


Chris Williams - 29/Nov/07 12:00 PM
We just can't depend on listening to the outputstream for the pid we print out. We start listening to the output in an unpredictable amount of time. Sometimes we catch the pid in time before the stream flushes, but many times we don't So I implemented a "backup" approach that runs when we try to shut down the server. If we still don't have a valid pid, I run "ps wwwx" in the background and search for a line containing the exact same arguments as the server has, then parse out the matching pid from there. This seems to work good on my Mac.

Torsten Crass - 30/Nov/07 09:49 AM
Dear Aptana people,

using the RadRails plugin (0.9.1.200711131528NGT) in Eclipse 3.3.1.1 on a Debian Sid system, the issue is everything but resolved! I still observe the same behaviour as described in the original posting. So please reopen this bug.

Regards –

Torsten


Chris Williams - 30/Nov/07 10:32 AM
This is fixed in RadRails 1.0.0 which is not yet out. Please try it on that version when it is released.