Tinkoff/kora

Application shutdown with exit code 255 after few seconds of running.

devgkz opened this issue · 2 comments

Minimal application with "Hello world" from documentation, Groovy build config, Java code, JDK 17. Application shutdown with exit code 255 after few seconds of running.

$ ./gradlew run

> Task :run
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
дек. 14, 2022 2:29:32 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.8.4.Final
дек. 14, 2022 2:29:32 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.8.4.Final
дек. 14, 2022 2:29:32 PM org.jboss.threads.Version <clinit>
INFO: JBoss Threads version 3.1.0.Final
дек. 14, 2022 2:29:32 PM io.undertow.Undertow start
INFO: starting server: Undertow - 2.2.10.Final
дек. 14, 2022 2:29:32 PM io.undertow.Undertow start
INFO: starting server: Undertow - 2.2.10.Final
дек. 14, 2022 2:29:37 PM io.undertow.Undertow stop
INFO: stopping server: Undertow - 2.2.10.Final

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/bellsoft-java17-amd64/bin/java'' finished with non-zero exit value 255

The reason for the error was the port being used.
It might be worth making a clear message like "The port is already in use" (throw Exception java.net.BindException).

The message is written in log, but you don't have a slf4j implementation so you can't see it. But I think we should write something to stderr too.