if (readLine == null) {
readLine = error.readLine();
}
log.info(readLine);
if (readLine == null) {
throw new CommandFailedException(-3);
} else if (readLine.endsWith("serverinit failed")) {
throw new CommandFailedException(-2);
} else if (readLine
.endsWith("Server waiting for requests...")) {
new Thread(new EatIO(exec.getInputStream()))
.start();
new Thread(new EatIO(exec.getErrorStream()))
.start();
found = true;
break;
}
}
}
}
}
}
if (!found) {
log.error("No machines configured for host");
throw new CommandFailedException(-1);
}
}