diff --git a/src/main/java/org/wildfly/plugin/tools/server/ServerManager.java b/src/main/java/org/wildfly/plugin/tools/server/ServerManager.java index ab2e8d8..5bb4483 100644 --- a/src/main/java/org/wildfly/plugin/tools/server/ServerManager.java +++ b/src/main/java/org/wildfly/plugin/tools/server/ServerManager.java @@ -180,6 +180,11 @@ public CompletableFuture build() { // Wait until the server is running, then determine what type we need to return while (!isRunning(client)) { Thread.onSpinWait(); + if (process != null && !process.isAlive()) { + throw new ServerManagerException( + "The server process has died. See previous output from the process. Process id " + + process.pid()); + } } final String launchType = launchType(client).orElseThrow(() -> new ServerManagerException( "Could not determine the type of the server. Verify the server is running."));