diff --git a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java index b5fa6d0b5122..f32d784bf8d3 100644 --- a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java +++ b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java @@ -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.") ); } diff --git a/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java b/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java index 97f12b925b20..0f07e3814c4b 100644 --- a/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java +++ b/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java @@ -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") + ); } } }