-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mill stuck when used on WSL 2 #2120
Comments
Seems like WSL 2 doesn't support Unix sockets. You'll have to use no-server mode |
Please note that I just discovered that the bundled Let's see if we can detect a running WSL 2 from a running Mill process, so that we can always fall back to |
I tested with both wrapper and "normal" Mill command. Still no success. I tested with annd without |
I tested it on my Windows 11: sake@DESKTOP-ILD4SJJ:/mnt/c/projects/stuff/millll/jah4$ ./mill-0.10.11-assembly.bat -i jah4.run
Compiling /mnt/c/projects/stuff/millll/jah4/build.sc
[13/46] jah4.unmanagedClasspath
[33/46] jah4.compile
Compiling compiler interface...
[info] compiling 1 Scala source to /mnt/c/projects/stuff/millll/jah4/out/jah4/compile.dest/classes ...
[info] done compiling
[46/46] jah4.run
Hello world!
sake@DESKTOP-ILD4SJJ:/mnt/c/projects/stuff/millll/jah4$ ./mill-0.10.11-assembly.bat jah4.run
Exception in thread "main"
org.newsclub.net.unix.AddressUnavailableSocketException: Operation not supported
at org.newsclub.net.unix.NativeUnixSocket.bind(Native Method)
at org.newsclub.net.unix.AFSocketImpl.bind(AFSocketImpl.java:335)
at org.newsclub.net.unix.AFServerSocket.bind(AFServerSocket.java:257)
at java.net.ServerSocket.bind(ServerSocket.java:344)
at org.newsclub.net.unix.AFServerSocket.bindOn(AFServerSocket.java:176)
at org.newsclub.net.unix.AFUNIXServerSocket.bindOn(AFUNIXServerSocket.java:87)
at mill.main.Server.$anonfun$run$2(MillServerMain.scala:103)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at mill.main.Server$.lockBlock(MillServerMain.scala:227)
at mill.main.Server.$anonfun$run$1(MillServerMain.scala:98)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at mill.main.Server$.tryLockBlock(MillServerMain.scala:235)
at mill.main.Server.run(MillServerMain.scala:95)
at mill.main.MillServerMain$.main(MillServerMain.scala:53)
at mill.main.MillServerMain.main(MillServerMain.scala)
Exception in thread "main" java.lang.Exception: Failed to connect to server
at mill.main.client.MillClientMain.run(MillClientMain.java:195)
at mill.main.client.MillClientMain.main0(MillClientMain.java:121)
at mill.main.client.MillClientMain.main(MillClientMain.java:71)
Caused by: java.net.SocketException: No such file or directory
at org.newsclub.net.unix.NativeUnixSocket.connect(Native Method)
at org.newsclub.net.unix.AFSocketImpl.connect0(AFSocketImpl.java:392)
at org.newsclub.net.unix.AFSocket.connect0(AFSocket.java:267)
at org.newsclub.net.unix.AFSocket.connect(AFSocket.java:236)
at org.newsclub.net.unix.AFSocket.connect(AFSocket.java:231)
at org.newsclub.net.unix.AFSocket.connectTo(AFSocket.java:179)
at org.newsclub.net.unix.AFUNIXSocket.connectTo(AFUNIXSocket.java:109)
at mill.main.client.MillClientMain.run(MillClientMain.java:187)
... 2 more Works as expected. In the |
If you can tell me, how I can safely detect a WSL 2 environment, then we can safeguard to always use the non-server mode on WSL 2. |
scala> System.getProperty("os.version")
val res2: String = 5.15.90.1-microsoft-standard-WSL2 works if it is not a custom kernel. I guess this option is not that usual. In this case, one can always run it with |
I just merged #2901 to always run in no-server mode on WSL. |
Mill version: 0.10.9 (also tested in 0.10.4+)
OS: WSL Debian GNU/Linux 11 (bullseye) on Windows 10 x86_64
Java: openjdk version "17.0.4" 2022-07-19
Using Mill on WSL results in this error:
followed by a hanging. Relaunching Mill hangs without the above error but it prints again if I delete the
out/mill
directory.It doesn't seem to be related to #874
The text was updated successfully, but these errors were encountered: