Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,14 @@ private String getDiscoveryPort() {

public Optional<String> jsonRpcBaseUrl() {
if (isJsonRpcEnabled()) {
return Optional.of(
HTTP + jsonRpcConfiguration.getHost() + ":" + portsProperties.getProperty(JSON_RPC));
final String port = portsProperties.getProperty(JSON_RPC);
if (port == null) {
throw new IllegalStateException(
"JSON-RPC port not available for node "
+ name
+ ". Node may have failed to start or ports file was not written.");
}
return Optional.of(HTTP + jsonRpcConfiguration.getHost() + ":" + port);
Comment thread
macfarla marked this conversation as resolved.
} else {
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,13 @@ private void waitForFileOrExit(final BesuNode node, final String fileName) {
Awaitility.waitAtMost(60, TimeUnit.SECONDS)
.until(
() -> {
if (!besuProcesses.get(node.getName()).isAlive()) {
final Process process = besuProcesses.get(node.getName());
if (!process.isAlive()) {
LOG.warn(
"Besu process for node {} exited with code {} before writing {}",
node.getName(),
process.exitValue(),
fileName);
return true;
}

Expand Down