log more details when jboss service fails to start

This commit is contained in:
Adrian Cole 2011-11-27 18:13:05 -05:00
parent 6823659613
commit 1dbb34c2aa
1 changed files with 8 additions and 3 deletions

View File

@ -594,11 +594,11 @@ public abstract class BaseComputeServiceLiveTest extends BaseVersionedServiceLiv
watch.reset().start();
IPSocket socket = new IPSocket(Iterables.get(node.getPublicAddresses(), 0), 8080);
assert preciseSocketTester.apply(socket) : String.format("failed to open socket %s on node %s", socket, node);
assert preciseSocketTester.apply(socket) : String.format("failed to open socket %s on node %s:%n%s%s", socket,
node, init(node, processName, "tail"), init(node, processName, "tailerr"));
stats.socketOpenMilliseconds = watch.elapsedTime(TimeUnit.MILLISECONDS);
exec = client.runScriptOnNode(node.getId(), "./" + processName + " tail", runAsRoot(false)
.wrapInInitScript(false));
exec = init(node, processName, "tail");
Matcher matcher = parseReported.matcher(exec.getOutput());
if (matcher.find())
@ -608,6 +608,11 @@ public abstract class BaseComputeServiceLiveTest extends BaseVersionedServiceLiv
return stats;
}
public ExecResponse init(NodeMetadata node, String processName, String command) {
return client.runScriptOnNode(node.getId(), "./" + processName + " "+command, runAsRoot(false)
.wrapInInitScript(false));
}
// started in 6462ms -
public static final Pattern JBOSS_PATTERN = Pattern.compile("started in ([0-9]+)ms -");