diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java index 329ecd5aea..937231a924 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java @@ -184,5 +184,9 @@ public class MasterServer implements IStoppable { @Override public void stop(String cause) { close(cause); + + // make sure exit after server closed, don't call System.exit in close logic, will cause deadlock if close + // multiple times at the same time + System.exit(1); } } diff --git a/dolphinscheduler-master/src/main/resources/application.yaml b/dolphinscheduler-master/src/main/resources/application.yaml index 56c2de6aa8..a4ce4b8828 100644 --- a/dolphinscheduler-master/src/main/resources/application.yaml +++ b/dolphinscheduler-master/src/main/resources/application.yaml @@ -112,9 +112,7 @@ master: kill-application-when-task-failover: true registry-disconnect-strategy: # The disconnect strategy: stop, waiting - strategy: waiting - # The max waiting time to reconnect to registry if you set the strategy to waiting - max-waiting-time: 100s + strategy: stop worker-group-refresh-interval: 10s command-fetch-strategy: type: ID_SLOT_BASED diff --git a/dolphinscheduler-master/src/test/resources/application.yaml b/dolphinscheduler-master/src/test/resources/application.yaml index 67950bfcf0..570e2785a0 100644 --- a/dolphinscheduler-master/src/test/resources/application.yaml +++ b/dolphinscheduler-master/src/test/resources/application.yaml @@ -127,9 +127,7 @@ master: kill-application-when-task-failover: true registry-disconnect-strategy: # The disconnect strategy: stop, waiting - strategy: waiting - # The max waiting time to reconnect to registry if you set the strategy to waiting - max-waiting-time: 100s + strategy: stop worker-group-refresh-interval: 10s command-fetch-strategy: type: ID_SLOT_BASED diff --git a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java index a7b49fbd81..57cd3ccb91 100644 --- a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java +++ b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java @@ -146,6 +146,10 @@ public class WorkerServer implements IStoppable { @Override public void stop(String cause) { close(cause); + + // make sure exit after server closed, don't call System.exit in close logic, will cause deadlock if close + // multiple times at the same time + System.exit(1); } public void killAllRunningTasks() { diff --git a/dolphinscheduler-worker/src/main/resources/application.yaml b/dolphinscheduler-worker/src/main/resources/application.yaml index e6434e4f9d..5cac4c29e5 100644 --- a/dolphinscheduler-worker/src/main/resources/application.yaml +++ b/dolphinscheduler-worker/src/main/resources/application.yaml @@ -61,9 +61,7 @@ worker: max-disk-usage-percentage-thresholds: 0.7 registry-disconnect-strategy: # The disconnect strategy: stop, waiting - strategy: waiting - # The max waiting time to reconnect to registry if you set the strategy to waiting - max-waiting-time: 100s + strategy: stop task-execute-threads-full-policy: REJECT tenant-config: # tenant corresponds to the user of the system, which is used by the worker to submit the job. If system does not have this user, it will be automatically created after the parameter worker.tenant.auto.create is true.