Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBT run stopped working recently with nothing changed in Play services project

You might think I ran into a XY-problem. I think that is not the case.

I am working on a project where

  1. (PROD) I can run the Play Framework services using

    sbt dist
    

    And then running the executable script from target/universal/*.

  2. (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:

  1. Changing the version of installed system SBT
  2. Changing the version of SBT in build.properties to latest (1.2.6)

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) is

openjdk 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) is

No 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) is

openjdk 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) is

No 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

like image 399
Fahad Siddiqui Avatar asked Feb 13 '19 16:02

Fahad Siddiqui


2 Answers

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

like image 125
Gediminas Aleknavičius Avatar answered Sep 27 '22 19:09

Gediminas Aleknavičius


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.

like image 32
saadi Avatar answered Sep 27 '22 17:09

saadi