[jbosstools-issues] [JBoss JIRA] (JBIDE-20684) Restarting Livereload server fails when it is in use
Xavier Coulon (JIRA)
issues at jboss.org
Wed Sep 16 05:58:00 EDT 2015
[ https://issues.jboss.org/browse/JBIDE-20684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109210#comment-13109210 ]
Xavier Coulon commented on JBIDE-20684:
---------------------------------------
The problem happens even without the new quick launcher: as soon as a connection has been established with a browser, a socket exists even though the underlying Jetty server has been stopped, the socket is still open (probably in a {{CLOSE_WAIT}} state) and this prevent immediate server restart.
In the short term, I can see 2 scenario here:
1 - wait until the socket is really closed before restarting the server. This can take up to 30s. This does not block the UI but the user will see the LiveReload server in "Stopping..." state
2 - use the serverConnection.setReuseAddress(true) to immediately reuse the bind address, but this was explicitely disabled a while ago to prevent multiple instances of LiveReload or other programs (eg: guard-livereload) to use the same port. Plus the requests sent by the browser may not be processed by the new instance of the LiveReload server.
In the longer term (ie, for 4.3.x or 4.4.x), we could add an option in the server config to let the user enable/disable the "reuse address" flag.
[~akazakov], [~maxandersen], WDYT ?
> Restarting Livereload server fails when it is in use
> ----------------------------------------------------
>
> Key: JBIDE-20684
> URL: https://issues.jboss.org/browse/JBIDE-20684
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: livereload
> Affects Versions: 4.3.0.CR1
> Reporter: Jan Richter
> Assignee: Xavier Coulon
> Priority: Critical
> Labels: respin-a
> Fix For: 4.3.0.CR1
>
>
> When I load some page with livereload, e.g. by using the 'show in browser via livereload' and then try to restart the livereload server, the server stops and won't start again.
> This is the error message:
> {noformat}Cannot start LiveReload server because port 35729 is already in use.{noformat}
> Trying to start the server then will fail with the same error. It seems though there is some timeout after which the port is released and the server can start again. Still, it somewhat defeats the purpose of the 'Restart' function.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jbosstools-issues
mailing list