run and runAll directly stops after services where started
See original GitHub issueLagom Version (1.2.x / 1.3.x / etc)
1.4.0
API (Scala / Java / Neither / Both)
Scala
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
macOS Darwin deess1nb1337.de.root.net 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
JDK (Oracle 1.8.0_112, OpenJDK 1.8.x, Azul Zing)
Oracle java version “1.8.0_141”
The issue
Unfortunately it’s hard to reproduce but maybe others have the same issue. After starting/stopping Lagom a few times I can not start it anymore because it directly stops. This happens for runAll
but also if I directly start infra services and start a single service with run
. The output looks similar to this:
09:56:33.730 | ForkJoinPoo | INFO | play.api.Play - Application started (Dev)
[info] Service a1-impl listening for HTTP on 0:0:0:0:0:0:0:0:62636
[info] Service a2-impl listening for HTTP on 0:0:0:0:0:0:0:0:51040
[info] Service a3-impl listening for HTTP on 0:0:0:0:0:0:0:0:49889
[info] (Services started, press enter to stop and go back to the console...)
[info] Stopping services
10:04:55.687 | pool-39-threa | INFO | play.core.server.AkkaHttpServer - Stopping server...
10:04:55.689 [info] play.core.server.AkkaHttpServer [] - Stopping server...
10:04:55.692 | pool-39-threa | INFO | play.core.server.AkkaHttpServer - Stopping server...
10:04:55.692 | pool-39-thread | INFO | play.core.server.AkkaHttpServer - Stopping server...
So I do not press any key, it just directly stops. A workaround usually is to clean
the whole project.
It is really annoying because it hinders productivity a lot.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Service starts but immediately stops on Windows server - Web
The web applications itself works fine when I start it by double clicking its icon in Windows Explorer. But the app needs to...
Read more >Service starts and then stops immediately.
Hi, I have a program that needs a service running to work. The service won't start automatically as it should and when I...
Read more >long running py.test stop at first failure - Stack Overflow
Is there a programmatic way to tell pytest to stop running on the first failure as opposed to having to do this at...
Read more >Run tests | IntelliJ IDEA Documentation - JetBrains
If your tests don't require any specific actions before start and you ... Place the caret at the test class to run all...
Read more >GitLab Runner commands
This is main command that is executed when GitLab Runner is started as a service. It reads all defined runners from config.toml and...
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 FreeTop 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
Top GitHub Comments
Believe it or not but I was able to produce really simple basic testcase: https://github.com/fkoehler/lagom-sbt-java-console-read-bug
In that simple sbt project I just run either
System.in.read()
orSystem.console().readLine()
. WithSystem.console().readLine()
everything works as expected.With
System.in.read()
the call torun
immediately returns the second time when I pressed ENTER already in the first run. So the output looks like this:That’s exactly what I experience in Lagom. So
System.console.readLine()
seems to be more stable. Hard do write an automatic test I guess.Is that enough to create a fix for this or is one person having the issue not good enough? Since it works exactly the same I think changing that one line would not be an issue? I would not mind creating a PR for that.
I can’t find anything related in terminal regarding those settings. Maybe I somehow enter that mode. I will keep investigating in that direction.