You might think I ran into a XY-problem. I think that is not the case.
I am working on a project where
(PROD) I can run the Play Framework services using
sbt dist
And then running the executable script from target/universal/*
.
(DEV) But not the development server using
sbt run\ PORT_NUM
The second used to work a few days ago. Now (without any code change) I cannot run the DEV server anymore. It shows the following error if consume the API.
[error] java.io.IOException: Resource temporarily unavailable
[error] at java.io.FileInputStream.read0(Native Method)
[error] at java.io.FileInputStream.read(FileInputStream.java:207)
[error] at jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:245)
[error] at jline.internal.InputStreamReader.read(InputStreamReader.java:257)
[error] at jline.internal.InputStreamReader.read(InputStreamReader.java:194)
[error] at jline.console.ConsoleReader.readCharacter(ConsoleReader.java:2151)
[error] at jline.console.ConsoleReader.readCharacter(ConsoleReader.java:2141)
[error] at play.sbt.PlayConsoleInteractionMode$.waitEOF$1(PlayInteractionMode.scala:62)
[error] at play.sbt.PlayConsoleInteractionMode$.$anonfun$waitForKey$2(PlayInteractionMode.scala:73)
[error] at play.sbt.PlayConsoleInteractionMode$.$anonfun$doWithoutEcho$1(PlayInteractionMode.scala:80)
[error] at play.sbt.PlayConsoleInteractionMode$.$anonfun$doWithoutEcho$1$adapted(PlayInteractionMode.scala:77)
[error] at play.sbt.PlayConsoleInteractionMode$.withConsoleReader(PlayInteractionMode.scala:57)
[error] at play.sbt.PlayConsoleInteractionMode$.doWithoutEcho(PlayInteractionMode.scala:77)
[error] at play.sbt.PlayConsoleInteractionMode$.$anonfun$waitForKey$1(PlayInteractionMode.scala:73)
[error] at play.sbt.PlayConsoleInteractionMode$.$anonfun$waitForKey$1$adapted(PlayInteractionMode.scala:60)
[error] at play.sbt.PlayConsoleInteractionMode$.withConsoleReader(PlayInteractionMode.scala:57)
[error] at play.sbt.PlayConsoleInteractionMode$.waitForKey(PlayInteractionMode.scala:60)
[error] at play.sbt.PlayConsoleInteractionMode$.waitForCancel(PlayInteractionMode.scala:83)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3(PlayRun.scala:125)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3$adapted(PlayRun.scala:65)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
Seems a deadlock issue to me, how to proceed further and solve this?
Here is a list of things I tried:
Update 1: The whole system works on Ubuntu 16.04.5 LTS. I am trying to figure out why it isn't working in 18.04 LTS.
Update 2a: On the machine where it works (it is running on a VM installed in Mac OS Mojave, and the OS is Ubuntu server),
Java version (
$ java -version
) isopenjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12) OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Ubuntu version (
$ lsb_release -a
) isNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.5 LTS Release: 16.04 Codename: xenial
Update 2b: On the machine where it doesn't work (it is running on desktop system, and the OS is Ubuntu desktop),
Java version (
$ java -version
) isopenjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12) OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Ubuntu version (
$ lsb_release -a
) isNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.5 LTS Release: 16.04 Codename: xenial
Update 3: Created an issue on
sbt
's GitHub
The newest kernel version 4.15.0-45 was the cause of the problem. I rebooted to 4.15.0-43 and it works fine now. Thanks @Renato
The new kernel version as the other answers suggested, is having issues.
So far no fix is being distributed in new updates. You can downgrade back to previous working kernel version which is 4.15.0-43
.
Follow this link for details on how to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With