Skip to content
Open
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 @@ -43,7 +43,9 @@ void connect() {
assertAll(
this::assertErrOutputIsEmpty,
() -> assertOutputContains("Connected to http://localhost:10300" + System.lineSeparator()
+ "The cluster is not initialized. Run cluster init command to initialize it.")
+ "The cluster is not initialized or the node has not finished starting yet."
+ " If this is a new cluster, run cluster init command to initialize it."
+ " If the node was recently restarted, please try again shortly.")
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,13 @@ private void checkClusterInit(SessionInfo sessionInfo, MessageComponentBuilder b
try {
new ClusterManagementApi(clientFactory.getClient(sessionInfo.nodeUrl())).clusterState();
} catch (ApiException e) {
if (e.getCode() == 409) { // CONFLICT means the cluster is not initialized yet
builder.hint("The cluster is not initialized. Run %s command to initialize it.", UiElements.command("cluster init"));
if (e.getCode() == 409) { // CONFLICT means the cluster is not initialized yet or the node is still starting
builder.hint(
"The cluster is not initialized or the node has not finished starting yet."
+ " If this is a new cluster, run %s command to initialize it."
+ " If the node was recently restarted, please try again shortly.",
UiElements.command("cluster init")
);
}
}
}
Expand Down