fix #2012 set maxEsStatusRetry to 60
This commit is contained in:
parent
0665940b1d
commit
07d88fd513
1 changed files with 4 additions and 2 deletions
|
@ -183,7 +183,7 @@ public class FessEsClient implements Client {
|
|||
|
||||
protected int maxConfigSyncStatusRetry = 10;
|
||||
|
||||
protected int maxEsStatusRetry = 10;
|
||||
protected int maxEsStatusRetry = 60;
|
||||
|
||||
protected String clusterName = "elasticsearch";
|
||||
|
||||
|
@ -566,6 +566,7 @@ public class FessEsClient implements Client {
|
|||
|
||||
protected void waitForYellowStatus(final FessConfig fessConfig) {
|
||||
Exception cause = null;
|
||||
final long startTime = System.currentTimeMillis();
|
||||
for (int i = 0; i < maxEsStatusRetry; i++) {
|
||||
try {
|
||||
final ClusterHealthResponse response =
|
||||
|
@ -589,7 +590,8 @@ public class FessEsClient implements Client {
|
|||
}
|
||||
final String message =
|
||||
"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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue