|
@@ -183,7 +183,7 @@ public class FessEsClient implements Client {
|
|
|
|
|
|
protected int maxConfigSyncStatusRetry = 10;
|
|
protected int maxConfigSyncStatusRetry = 10;
|
|
|
|
|
|
- protected int maxEsStatusRetry = 10;
|
|
|
|
|
|
+ protected int maxEsStatusRetry = 60;
|
|
|
|
|
|
protected String clusterName = "elasticsearch";
|
|
protected String clusterName = "elasticsearch";
|
|
|
|
|
|
@@ -566,6 +566,7 @@ public class FessEsClient implements Client {
|
|
|
|
|
|
protected void waitForYellowStatus(final FessConfig fessConfig) {
|
|
protected void waitForYellowStatus(final FessConfig fessConfig) {
|
|
Exception cause = null;
|
|
Exception cause = null;
|
|
|
|
+ final long startTime = System.currentTimeMillis();
|
|
for (int i = 0; i < maxEsStatusRetry; i++) {
|
|
for (int i = 0; i < maxEsStatusRetry; i++) {
|
|
try {
|
|
try {
|
|
final ClusterHealthResponse response =
|
|
final ClusterHealthResponse response =
|
|
@@ -589,7 +590,8 @@ public class FessEsClient implements Client {
|
|
}
|
|
}
|
|
final String message =
|
|
final String message =
|
|
"Elasticsearch (" + System.getProperty(Constants.FESS_ES_HTTP_ADDRESS)
|
|
"Elasticsearch (" + System.getProperty(Constants.FESS_ES_HTTP_ADDRESS)
|
|
- + ") is not available. Check the state of your Elasticsearch cluster (" + clusterName + ").";
|
|
|
|
|
|
+ + ") is not available. Check the state of your Elasticsearch cluster (" + clusterName + ") in "
|
|
|
|
+ + (System.currentTimeMillis() - startTime) + "ms.";
|
|
throw new ContainerInitFailureException(message, cause);
|
|
throw new ContainerInitFailureException(message, cause);
|
|
}
|
|
}
|
|
|
|
|