From 1dbb34c2aa8b540697d40941c0354f397cf2fdf6 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 27 Nov 2011 18:13:05 -0500 Subject: [PATCH] log more details when jboss service fails to start --- .../jclouds/compute/BaseComputeServiceLiveTest.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java index 73db4e40c6..651234c16d 100644 --- a/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java @@ -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 -");