question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shutdown reasons not causing a System.exit

See original GitHub issue

Lagom Version (1.2.x / 1.3.x / etc)

Lagom 1.5.0

Expected Behavior

A programatic shutdown of a Lagom process causes a System.exit().

Actual Behavior

If the Reason for CoordinatedShutdown to run is ClusterDowningReason Lagom is taking over the responsibility to invoke System.exit().

This is incomplete since there are other well-known, Akka-provided Reasons that should also trigger a System.exit(). Take for example IncompatibleConfigurationDetected. In this case, the Lagom process would not die.

BONUS POINTS: ClusterDowningReason is reused in edge cases that should use a more specific Reason. For example joinSeedNodesUnsuccesful is a case where a timeout triggers a shutdown because no seed node could be contacted. In that case, the current implementation will work because joinSeedNodesUnsuccesful reuses ClusterDowningReason but if/when the reason is improved to, for example, JoiningSeedNodesUnsuccessfulReason then Lagom will have to follow and react to it.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marcospereiracommented, May 22, 2019

Should this be part of 1.6.x release since we have other issues to better integrate coordinated shutdown?

Read more comments on GitHub >

github_iconTop Results From Across the Web

When should we call System.exit in Java - Stack Overflow
System.exit() can be used to run shutdown hooks before the program quits. ... they will not be shut down and thus the JVM...
Read more >
Avoid Using System.exit() on Java Web Application
That's all about Why you should not use System.exit() inside Java application. It can be dangerous and potentially shut down the whole server, ......
Read more >
Runtime.getRuntime().halt() vs System.exit() in Java - Baeldung
The System.exit() method stops the running Java Virtual Machine. But, before stopping the JVM, it calls the shutdown sequence, also known as ...
Read more >
avoiding system.exit(0) - Oracle Communities
Hi I am using an external .jar file in my java program for parsing a file. My problem is that its main method...
Read more >
Why is the JVM failing to start with java.lang ... - IBM
exit(). They need to be aware that that call is unacceptable in an application - the server process is a single JVM, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found