Skip to content
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

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

Closed
fahadsiddiqui opened this issue Feb 21, 2019 · 4 comments

Comments

@fahadsiddiqui
Copy link

steps

Running sbt run on project root directory (Play Framework 2.6.x project) and consuming an API that triggers SparkLauncher to run a job.

problem

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

expectation

Should keep running fine.

notes

I've put the question on Stackoverflow and other users seem to have the same issue also.

In project build.properties
sbt version: 0.13.16

@lkt
Copy link

lkt commented Feb 21, 2019

Newest ubuntu kernel vresions 4.15.0-44 and 4.15.0-45. I was able to go around it by booting into 4.15.0-43. More info: https://www.spigotmc.org/threads/ubuntu-18-04-bad-kernel-update.357871/

@eed3si9n
Copy link
Member

eed3si9n commented Feb 22, 2019

Thanks for the report, and thanks for the useful info about Ubuntu.

Here are some of the suggested workarounds adapted to sbt:

  • sbt -Djline.terminal=none
  • Reboot into a kernel that is not 4.15.0-44
  • Install a non-broken kernel: apt install linux-image-4.15.0-43-generic, remove the broken one: apt remove linux-image-4.15.0-44-generic, and reboot

@fahadsiddiqui
Copy link
Author

Tried installing

apt install linux-image-4.15.0-43-generic

My VM seems broken and gone on Guru Meditation.

Must be something I messed up, I will update you in a while after trying out the steps.

@fahadsiddiqui
Copy link
Author

Just confirmed, seems like the issue is with a bad kernel release. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants