products forums blog support careers about
  History | Log In     View a printable version of the current page.  
PRO USERS, to ensure 'PRIORITY SUPPORT' make sure that your ASAP account is "tagged" when you file the request. Click here for instructions on how to tag your account.
Issue Details (XML | Word | Printable)

Key: ROR-853
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Manoj Chavan
Reporter: Lukasz Mierzejewski
Votes: 0
Watchers: 2
Operations

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

stoping mongrel/webrick dosn't work correctly

Created: 25/May/08 10:31 AM   Updated: 09/Jun/08 11:16 AM
Component/s: Servers
Affects Version/s: 1.0.1
Fix Version/s: 1.1.0, 1.0.2

File Attachments: 1. PNG File radrails.png (154 kb)


Impact on Workflow: Critical
Studio Install Type: Standalone
Operating System: Ubuntu
Participants: Chris Williams, Lukasz Mierzejewski and Manoj Chavan


 Description  « Hide
Sometimes (it is quite random behavior) when stopping mongrel or webrick and trying to restart I get: "port not free"

java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:336)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.bind(ServerSocket.java:294)
at org.rubypeople.rdt.core.SocketUtil.portFree(SocketUtil.java:95)
at org.radrails.server.core.Server.startServer(Server.java:562)
at org.radrails.server.core.Server.access$2(Server.java:561)
at org.radrails.server.core.Server$8.run(Server.java:911)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

I can't start mongrel or webrick for about 10-30 seconds... it's strange because when searching for mongrel or webrick process by pid (to kill it) nothing is found, but I can start mongrel or webrick anyway.
Unfortunately it is linux (for sure) and os x (I suppose) issue only. On windows everything seems just fine.

This problem applies to webrick and mongrel as well.

Sorry for my poor english,
lmierzej



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Lukasz Mierzejewski - 25/May/08 10:33 AM
WRONG: "but I can start mongrel or webrick anyway." SHOULD BE: but I can't start mongrel or webrick anyway.

Chris Williams - 27/May/08 12:15 PM
Manoj, can you try and reproduce this on a Mac OSX or Linux box? It should be pretty simple - create a rails project, then stop the server and restart it and see if it complains about the port being taken. Ideally it should not complain at all and just work (freeing up the port immediately when you stop the server).

Lukasz Mierzejewski - 27/May/08 01:03 PM
Exactly the same problem appears with jruby as with ruby.

Chris Williams - 09/Jun/08 10:48 AM
Fixed in trunk and 1.0.x branch. Should be available in next nightly for pro, or 1.1 and 1.0.2 release for non-pro.

Chris Williams - 09/Jun/08 11:16 AM
Manoj: The steps to reproduce are to generate a new rails project, go to the servers view and start the server for the rails project. Then once it's up, go back and restart it. Repeat a few times. If you can keep restarting without any error dialog popping about the port not being free then the fix worked.

You'll have to try on Linux or Mac OS X.