sbt wrongly prints "sbt server is already booting"
See original GitHub issuesteps
Start sbt in an “unusual” filesystem, fox example, in Eclipse Che, which is a containerized, cloud IDE, where the filesystem sbt works with is mounted over network.
problem
The whole message is this:
sbt server is already booting. Create a new server? y/n (default y)
sbt prints it even at wrong times.
expectation
It seems enough to just press Enter or y and Enter, and sbt then continues, but it shouldn’t be displayed in the first place, because no sbt server has started yet.
notes
Other instance is this StackOverflow question, where there were issues with Windows’ wsl2: https://stackoverflow.com/questions/64809111/sbt-server-is-already-booting-error-when-launching-sbt-from-wsl2-ubuntu
It may be causing issues for other tools depending on sbt: https://github.com/scalameta/metals/issues/2235
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:56 (35 by maintainers)
Top Results From Across the Web
wsl 2 - "sbt server is already booting." error when launching ...
Currently sbt 1.4.2 is installed. When I try to launch it from the terminal it gives sbt server is already booting. Create a...
Read more >David Barri on Twitter: "Cool, this has a workaround for the [sbt ...
Cool, this has a workaround for the [sbt wrongly prints "sbt server is already booting"] issue: https://github.com/sbt/sbt/issues/6101…
Read more >sbt Reference Manual — Frequently Asked Questions
Frequently Asked Questions. Project Information. What does the name “sbt” stand for, and why shouldn't it be written “SBT”? TL;DR the name sbt...
Read more >sbt/sbt - Gitter
sbt tells me server failed to start on ... pipe\sbt-server-db2293e8210ae3595027_lock, error 231 ... But I'm still having the same issue:
Read more >Ammonite
Create scripts that you can run easily from the command line, without the overhead of setting up a "project" or waiting for SBT's...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Further information:
At least in my specific case, doing
[System.IO.Directory]::GetFiles("\\.\\pipe\\")in PowerShell gives me:In this case, it seems that once there’s one instance of SBT, whether alive or ghosted, it would not release this lock, but the logic in booting the server does not seem to release this lock; perhaps in Windows the IPC behaviour is different from that on UNIX?
I also built my own local SBT to throw the full stack trace and it looks like this:
Since a
_lockpipe already exists, should it actually try to create another one? Because when it tries to create a new one, that is when it will try to create a file, and then cause thiserror 5which corresponds to Access Denied (I would imagine it would deny access to create a pipe on top of one that already exists).The other server in this case is booted already, rather than booting, so the
ServerAlreadyBootingExceptiondoes not describe the situation correctlyFYI with sbt 1.4.9 in a Docker image running ubuntu 16.04, the exception I get is
java.io.IOException: org.scalasbt.ipcsocket.NativeErrorException: [22] Invalid argumentI was able to successfully workaround the issue by adding the
--batchargument too, i.e.sbt -Dsbt.server.forcestart=true --batch ...