Sbt: `reboot` command shows error "server failed to start"

Created on 14 Aug 2017  路  3Comments  路  Source: sbt/sbt

(See the guidelines for contributing, linked above)

steps

  1. start sbt in a sbt 1.0 project
  2. enter reboot command

problem

Shell shows error message:

[error] server failed to start on 127.0.0.1:4774. java.net.BindException: Address already in use

notes

I haven't tested if the server still works after this

sbt version: 1.0

Bug areserver uncategorized

All 3 comments

Same if you launch a second instance of sbt in the same project. I would expect that it can discover a running server and automatically connect a new shell/client to it.

I am totally guessing here but I think what might be happening in my case (#3707) is that I have Intelij open and when I change my build.sbt 3rd party dependencies, it triggers something in Intelij to start temporary internal sbt process to fetch dependencies. Then when I stop and start sbt manually on the command line to make my build.sbt changes take effect, I get the "already in use". If this is true, then the proposed solution of attaching to running server could be bad because Intelij is going to kill that one when it is done in a moment. Should sbt just start a new instance on a new port if the current one is in use so that manual user console never conflicts with what internal build tools like Intellij are doing behind the scenes? (or perhaps sbt should actually discover the running server as proposed and cleanup only happens when there are no longer any open connections)

or perhaps sbt should actually discover the running server as proposed and cleanup only happens when there are no longer any open connections

This. And IntellyJ should also connect to a running server or launch one if there's no and when it does what it needs, just close the client connection. See https://github.com/sbt/sbt/issues/3508#issuecomment-331944886

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eed3si9n picture eed3si9n  路  3Comments

xuwei-k picture xuwei-k  路  3Comments

xuwei-k picture xuwei-k  路  3Comments

christobill picture christobill  路  3Comments

eed3si9n picture eed3si9n  路  3Comments