status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
public Map<String, Object> viewTree(User loginUser, long projectCode, long code, Integer limit) { Map<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByCode(projectCode); result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_TREE_VIEW); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (null == processDefinition || projectCode != processDefinition.getProjectCode()) { logger.error("Process definition does not exist, code:{}.", code); putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(code)); return result; } DAG<String, TaskNode, TaskNodeRelation> dag = processService.genDagGraph(processDefinition); Map<String, List<TreeViewDto>> runningNodeMap = new ConcurrentHashMap<>(); Map<String, List<TreeViewDto>> waitingRunningNodeMap = new ConcurrentHashMap<>(); List<ProcessInstance> processInstanceList = processInstanceService.queryByProcessDefineCode(code, limit); processInstanceList.forEach(processInstance -> processInstance .setDuration(DateUtils.format2Duration(processInstance.getStartTime(), processInstance.getEndTime()))); List<TaskDefinitionLog> taskDefinitionList = taskDefinitionLogDao.getTaskDefineLogList(processTaskRelationMapper .queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode())); Map<Long, TaskDefinitionLog> taskDefinitionMap = taskDefinitionList.stream() .collect(Collectors.toMap(TaskDefinitionLog::getCode, taskDefinitionLog -> taskDefinitionLog)); if (limit < 0) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} if (limit > processInstanceList.size()) { limit = processInstanceList.size(); } TreeViewDto parentTreeViewDto = new TreeViewDto(); parentTreeViewDto.setName("DAG"); parentTreeViewDto.setType(""); parentTreeViewDto.setCode(0L); for (int i = limit - 1; i >= 0; i--) { ProcessInstance processInstance = processInstanceList.get(i); Date endTime = processInstance.getEndTime() == null ? new Date() : processInstance.getEndTime(); parentTreeViewDto.getInstances() .add(new Instance(processInstance.getId(), processInstance.getName(), processInstance.getProcessDefinitionCode(), "", processInstance.getState().toString(), processInstance.getStartTime(), endTime, processInstance.getHost(), DateUtils.format2Readable(endTime.getTime() - processInstance.getStartTime().getTime()))); } List<TreeViewDto> parentTreeViewDtoList = new ArrayList<>(); parentTreeViewDtoList.add(parentTreeViewDto); for (String startNode : dag.getBeginNode()) { runningNodeMap.put(startNode, parentTreeViewDtoList); } while (!ServerLifeCycleManager.isStopped()) { Set<String> postNodeList; Iterator<Map.Entry<String, List<TreeViewDto>>> iter = runningNodeMap.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, List<TreeViewDto>> en = iter.next();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
String nodeCode = en.getKey(); parentTreeViewDtoList = en.getValue(); TreeViewDto treeViewDto = new TreeViewDto(); TaskNode taskNode = dag.getNode(nodeCode); treeViewDto.setType(taskNode.getType()); treeViewDto.setCode(taskNode.getCode()); treeViewDto.setName(taskNode.getName()); for (int i = limit - 1; i >= 0; i--) { ProcessInstance processInstance = processInstanceList.get(i); TaskInstance taskInstance = taskInstanceMapper.queryByInstanceIdAndCode(processInstance.getId(), Long.parseLong(nodeCode)); if (taskInstance == null) { treeViewDto.getInstances().add(new Instance(-1, "not running", 0, "null")); } else { Date startTime = taskInstance.getStartTime() == null ? new Date() : taskInstance.getStartTime(); Date endTime = taskInstance.getEndTime() == null ? new Date() : taskInstance.getEndTime(); long subProcessCode = 0L; if (taskInstance.isSubProcess()) { TaskDefinition taskDefinition = taskDefinitionMap.get(taskInstance.getTaskCode()); subProcessCode = Long.parseLong(JSONUtils.parseObject( taskDefinition.getTaskParams()).path(CMD_PARAM_SUB_PROCESS_DEFINE_CODE).asText()); } treeViewDto.getInstances().add(new Instance(taskInstance.getId(), taskInstance.getName(), taskInstance.getTaskCode(), taskInstance.getTaskType(), taskInstance.getState().toString(), taskInstance.getStartTime(), taskInstance.getEndTime(), taskInstance.getHost(), DateUtils.format2Readable(endTime.getTime() - startTime.getTime()), subProcessCode));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} } for (TreeViewDto pTreeViewDto : parentTreeViewDtoList) { pTreeViewDto.getChildren().add(treeViewDto); } postNodeList = dag.getSubsequentNodes(nodeCode); if (CollectionUtils.isNotEmpty(postNodeList)) { for (String nextNodeCode : postNodeList) { List<TreeViewDto> treeViewDtoList = waitingRunningNodeMap.get(nextNodeCode); if (CollectionUtils.isEmpty(treeViewDtoList)) { treeViewDtoList = new ArrayList<>(); } treeViewDtoList.add(treeViewDto); waitingRunningNodeMap.put(nextNodeCode, treeViewDtoList); } } runningNodeMap.remove(nodeCode); } if (waitingRunningNodeMap.size() == 0) { break; } else { runningNodeMap.putAll(waitingRunningNodeMap); waitingRunningNodeMap.clear(); } } result.put(Constants.DATA_LIST, parentTreeViewDto); result.put(Constants.STATUS, Status.SUCCESS); result.put(Constants.MSG, Status.SUCCESS.getMsg()); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
/** * whether the graph has a ring * * @param taskNodeResponseList task node response list * @return if graph has cycle flag */ private boolean graphHasCycle(List<TaskNode> taskNodeResponseList) { DAG<String, TaskNode, String> graph = new DAG<>(); for (TaskNode taskNodeResponse : taskNodeResponseList) { graph.addNode(Long.toString(taskNodeResponse.getCode()), taskNodeResponse); } for (TaskNode taskNodeResponse : taskNodeResponseList) { List<String> preTasks = JSONUtils.toList(taskNodeResponse.getPreTasks(), String.class); if (CollectionUtils.isNotEmpty(preTasks)) { for (String preTask : preTasks) { if (!graph.addEdge(preTask, Long.toString(taskNodeResponse.getCode()))) { return true; } } } } return graph.hasCycle(); } /** * batch copy process definition * * @param loginUser loginUser * @param projectCode projectCode
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param codes processDefinitionCodes * @param targetProjectCode targetProjectCode */ @Override @Transactional public Map<String, Object> batchCopyProcessDefinition(User loginUser, long projectCode, String codes, long targetProjectCode) { Map<String, Object> result = checkParams(loginUser, projectCode, codes, targetProjectCode, WORKFLOW_BATCH_COPY); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } List<String> failedProcessList = new ArrayList<>(); doBatchOperateProcessDefinition(loginUser, targetProjectCode, failedProcessList, codes, result, true); checkBatchOperateResult(projectCode, targetProjectCode, result, failedProcessList, true); return result; } /** * batch move process definition * Will be deleted * @param loginUser loginUser * @param projectCode projectCode * @param codes processDefinitionCodes * @param targetProjectCode targetProjectCode */ @Override @Transactional public Map<String, Object> batchMoveProcessDefinition(User loginUser, long projectCode,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
String codes, long targetProjectCode) { Map<String, Object> result = checkParams(loginUser, projectCode, codes, targetProjectCode, TASK_DEFINITION_MOVE); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (projectCode == targetProjectCode) { logger.warn("Project code is same as target project code, projectCode:{}.", projectCode); return result; } List<String> failedProcessList = new ArrayList<>(); doBatchOperateProcessDefinition(loginUser, targetProjectCode, failedProcessList, codes, result, false); checkBatchOperateResult(projectCode, targetProjectCode, result, failedProcessList, false); return result; } private Map<String, Object> checkParams(User loginUser, long projectCode, String processDefinitionCodes, long targetProjectCode, String perm) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, perm); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (StringUtils.isEmpty(processDefinitionCodes)) { logger.error("Parameter processDefinitionCodes is empty, projectCode is {}.", projectCode); putMsg(result, Status.PROCESS_DEFINITION_CODES_IS_EMPTY, processDefinitionCodes); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} if (projectCode != targetProjectCode) { Project targetProject = projectMapper.queryByCode(targetProjectCode); Map<String, Object> targetResult = projectService.checkProjectAndAuth(loginUser, targetProject, targetProjectCode, perm); if (targetResult.get(Constants.STATUS) != Status.SUCCESS) { return targetResult; } } return result; } protected void doBatchOperateProcessDefinition(User loginUser, long targetProjectCode, List<String> failedProcessList, String processDefinitionCodes, Map<String, Object> result, boolean isCopy) { Set<Long> definitionCodes = Arrays.stream(processDefinitionCodes.split(Constants.COMMA)).map(Long::parseLong) .collect(Collectors.toSet()); List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(definitionCodes); Set<Long> queryCodes = processDefinitionList.stream().map(ProcessDefinition::getCode).collect(Collectors.toSet()); Set<Long> diffCode = definitionCodes.stream().filter(code -> !queryCodes.contains(code)).collect(Collectors.toSet()); diffCode.forEach(code -> failedProcessList.add(code + "[null]")); for (ProcessDefinition processDefinition : processDefinitionList) { List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
processDefinition.getCode()); List<ProcessTaskRelationLog> taskRelationList = processTaskRelations.stream().map(ProcessTaskRelationLog::new).collect(Collectors.toList()); processDefinition.setProjectCode(targetProjectCode); String otherParamsJson = doOtherOperateProcess(loginUser, processDefinition); if (isCopy) { logger.info("Copy process definition..."); List<TaskDefinitionLog> taskDefinitionLogs = taskDefinitionLogDao.getTaskDefineLogList(processTaskRelations); Map<Long, Long> taskCodeMap = new HashMap<>(); for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs) { try { long taskCode = CodeGenerateUtils.getInstance().genCode(); taskCodeMap.put(taskDefinitionLog.getCode(), taskCode); taskDefinitionLog.setCode(taskCode); } catch (CodeGenerateException e) { logger.error("Generate task definition code error, projectCode:{}.", targetProjectCode, e); putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS); } taskDefinitionLog.setProjectCode(targetProjectCode); taskDefinitionLog.setVersion(0); taskDefinitionLog.setName(taskDefinitionLog.getName()); } for (ProcessTaskRelationLog processTaskRelationLog : taskRelationList) { if (processTaskRelationLog.getPreTaskCode() > 0) { processTaskRelationLog.setPreTaskCode(taskCodeMap.get(processTaskRelationLog.getPreTaskCode())); } if (processTaskRelationLog.getPostTaskCode() > 0) { processTaskRelationLog
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
.setPostTaskCode(taskCodeMap.get(processTaskRelationLog.getPostTaskCode())); } } final long oldProcessDefinitionCode = processDefinition.getCode(); try { processDefinition.setCode(CodeGenerateUtils.getInstance().genCode()); } catch (CodeGenerateException e) { logger.error("Generate process definition code error, projectCode:{}.", targetProjectCode, e); putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS); } processDefinition.setId(null); processDefinition.setUserId(loginUser.getId()); processDefinition.setName(getNewName(processDefinition.getName(), COPY_SUFFIX)); final Date date = new Date(); processDefinition.setCreateTime(date); processDefinition.setUpdateTime(date); processDefinition.setReleaseState(ReleaseState.OFFLINE); if (StringUtils.isNotBlank(processDefinition.getLocations())) { ArrayNode jsonNodes = JSONUtils.parseArray(processDefinition.getLocations()); for (int i = 0; i < jsonNodes.size(); i++) { ObjectNode node = (ObjectNode) jsonNodes.path(i); node.put("taskCode", taskCodeMap.get(node.get("taskCode").asLong())); jsonNodes.set(i, node); } processDefinition.setLocations(JSONUtils.toJsonString(jsonNodes)); } Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(oldProcessDefinitionCode); if (scheduleObj != null) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
scheduleObj.setId(null); scheduleObj.setUserId(loginUser.getId()); scheduleObj.setProcessDefinitionCode(processDefinition.getCode()); scheduleObj.setReleaseState(ReleaseState.OFFLINE); scheduleObj.setCreateTime(date); scheduleObj.setUpdateTime(date); int insertResult = scheduleMapper.insert(scheduleObj); if (insertResult != 1) { logger.error("Schedule create error, processDefinitionCode:{}.", processDefinition.getCode()); putMsg(result, Status.CREATE_SCHEDULE_ERROR); throw new ServiceException(Status.CREATE_SCHEDULE_ERROR); } } try { result.putAll(createDagDefine(loginUser, taskRelationList, processDefinition, taskDefinitionLogs, otherParamsJson)); } catch (Exception e) { logger.error("Copy process definition error, processDefinitionCode from {} to {}.", oldProcessDefinitionCode, processDefinition.getCode(), e); putMsg(result, Status.COPY_PROCESS_DEFINITION_ERROR); throw new ServiceException(Status.COPY_PROCESS_DEFINITION_ERROR); } } else { logger.info("Move process definition..."); try { result.putAll(updateDagDefine(loginUser, taskRelationList, processDefinition, null, Lists.newArrayList(), otherParamsJson)); } catch (Exception e) { logger.error("Move process definition error, processDefinitionCode:{}.", processDefinition.getCode(), e);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR); throw new ServiceException(Status.MOVE_PROCESS_DEFINITION_ERROR); } } if (result.get(Constants.STATUS) != Status.SUCCESS) { failedProcessList.add(processDefinition.getCode() + "[" + processDefinition.getName() + "]"); } } } /** * get new Task name or Process name when copy or import operate * @param originalName Task or Process original name * @param suffix "_copy_" or "_import_" * @return new name */ public String getNewName(String originalName, String suffix) { StringBuilder newName = new StringBuilder(); String regex = String.format(".*%s\\d{17}$", suffix); if (originalName.matches(regex)) { return newName.append(originalName, 0, originalName.lastIndexOf(suffix)) .append(suffix) .append(DateUtils.getCurrentTimeStamp()) .toString(); } return newName.append(originalName) .append(suffix) .append(DateUtils.getCurrentTimeStamp()) .toString(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
/** * switch the defined process definition version * * @param loginUser login user * @param projectCode project code * @param code process definition code * @param version the version user want to switch * @return switch process definition version result code */ @Override @Transactional public Map<String, Object> switchProcessDefinitionVersion(User loginUser, long projectCode, long code, int version) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_SWITCH_TO_THIS_VERSION); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (Objects.isNull(processDefinition) || projectCode != processDefinition.getProjectCode()) { logger.error( "Switch process definition error because it does not exist, projectCode:{}, processDefinitionCode:{}.", projectCode, code); putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_ERROR, code); return result; } ProcessDefinitionLog processDefinitionLog = processDefinitionLogMapper.queryByDefinitionCodeAndVersion(code, version);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
if (Objects.isNull(processDefinitionLog)) { logger.error( "Switch process definition error because version does not exist, projectCode:{}, processDefinitionCode:{}, version:{}.", projectCode, code, version); putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR, processDefinition.getCode(), version); return result; } int switchVersion = processService.switchVersion(processDefinition, processDefinitionLog); if (switchVersion <= 0) { logger.error( "Switch process definition version error, projectCode:{}, processDefinitionCode:{}, version:{}.", projectCode, code, version); putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR); throw new ServiceException(Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR); } logger.info("Switch process definition version complete, projectCode:{}, processDefinitionCode:{}, version:{}.", projectCode, code, version); putMsg(result, Status.SUCCESS); return result; } /** * check batch operate result * * @param srcProjectCode srcProjectCode * @param targetProjectCode targetProjectCode * @param result result * @param failedProcessList failedProcessList * @param isCopy isCopy */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
private void checkBatchOperateResult(long srcProjectCode, long targetProjectCode, Map<String, Object> result, List<String> failedProcessList, boolean isCopy) { if (!failedProcessList.isEmpty()) { String failedProcess = String.join(",", failedProcessList); if (isCopy) { logger.error( "Copy process definition error, srcProjectCode:{}, targetProjectCode:{}, failedProcessList:{}.", srcProjectCode, targetProjectCode, failedProcess); putMsg(result, Status.COPY_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode, failedProcess); } else { logger.error( "Move process definition error, srcProjectCode:{}, targetProjectCode:{}, failedProcessList:{}.", srcProjectCode, targetProjectCode, failedProcess); putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode, failedProcess); } } else { logger.info("Batch {} process definition complete, srcProjectCode:{}, targetProjectCode:{}.", isCopy ? "copy" : "move", srcProjectCode, targetProjectCode); putMsg(result, Status.SUCCESS); } } /** * query the pagination versions info by one certain process definition code * * @param loginUser login user info to check auth * @param projectCode project code * @param pageNo page number * @param pageSize page size * @param code process definition code * @return the pagination process definition versions info of the certain process definition
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
*/ @Override public Result queryProcessDefinitionVersions(User loginUser, long projectCode, int pageNo, int pageSize, long code) { Result result = new Result(); Project project = projectMapper.queryByCode(projectCode); Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectCode, VERSION_LIST); Status resultStatus = (Status) checkResult.get(Constants.STATUS); if (resultStatus != Status.SUCCESS) { putMsg(result, resultStatus); return result; } PageInfo<ProcessDefinitionLog> pageInfo = new PageInfo<>(pageNo, pageSize); Page<ProcessDefinitionLog> page = new Page<>(pageNo, pageSize); IPage<ProcessDefinitionLog> processDefinitionVersionsPaging = processDefinitionLogMapper.queryProcessDefinitionVersionsPaging(page, code, projectCode); List<ProcessDefinitionLog> processDefinitionLogs = processDefinitionVersionsPaging.getRecords(); pageInfo.setTotalList(processDefinitionLogs); pageInfo.setTotal((int) processDefinitionVersionsPaging.getTotal()); result.setData(pageInfo); putMsg(result, Status.SUCCESS); return result; } /** * delete one certain process definition by version number and process definition code * * @param loginUser login user info to check auth * @param projectCode project code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param code process definition code * @param version version number * @return delete result code */ @Override @Transactional public Map<String, Object> deleteProcessDefinitionVersion(User loginUser, long projectCode, long code, int version) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, VERSION_DELETE); boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); if (!hasProjectAndWritePerm) { return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (processDefinition == null || projectCode != processDefinition.getProjectCode()) { logger.error("Process definition does not exist, code:{}.", code); putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(code)); } else { if (processDefinition.getVersion() == version) { logger.warn( "Process definition can not be deleted due to version is being used, projectCode:{}, processDefinitionCode:{}, version:{}.", projectCode, code, version); putMsg(result, Status.MAIN_TABLE_USING_VERSION); return result; } int deleteLog = processDefinitionLogMapper.deleteByProcessDefinitionCodeAndVersion(code, version); int deleteRelationLog = processTaskRelationLogMapper.deleteByCode(code, version);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
if (deleteLog == 0 || deleteRelationLog == 0) { logger.error( "Delete process definition version error, projectCode:{}, processDefinitionCode:{}, version:{}.", projectCode, code, version); putMsg(result, Status.DELETE_PROCESS_DEFINE_BY_CODE_ERROR); throw new ServiceException(Status.DELETE_PROCESS_DEFINE_BY_CODE_ERROR); } deleteOtherRelation(project, result, processDefinition); logger.info( "Delete process definition version complete, projectCode:{}, processDefinitionCode:{}, version:{}.", projectCode, code, version); putMsg(result, Status.SUCCESS); } return result; } /** * create empty process definition * * @param loginUser login user * @param projectCode project code * @param name process definition name * @param description description * @param globalParams globalParams * @param timeout timeout * @param tenantCode tenantCode * @param scheduleJson scheduleJson * @return process definition code */ @Override @Transactional
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
public Map<String, Object> createEmptyProcessDefinition(User loginUser, long projectCode, String name, String description, String globalParams, int timeout, String tenantCode, String scheduleJson, ProcessExecutionTypeEnum executionType) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_CREATE); boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); if (!hasProjectAndWritePerm) { return result; } if (checkDescriptionLength(description)) { logger.warn("Parameter description is too long."); putMsg(result, Status.DESCRIPTION_TOO_LONG_ERROR); return result; } ProcessDefinition definition = processDefinitionMapper.verifyByDefineName(project.getCode(), name); if (definition != null) { logger.warn("Process definition with the same name {} already exists, processDefinitionCode:{}.", definition.getName(), definition.getCode()); putMsg(result, Status.PROCESS_DEFINITION_NAME_EXIST, name); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
int tenantId = -1; if (!Constants.DEFAULT.equals(tenantCode)) { Tenant tenant = tenantMapper.queryByTenantCode(tenantCode); if (tenant == null) { logger.error("Tenant does not exist."); putMsg(result, Status.TENANT_NOT_EXIST); return result; } tenantId = tenant.getId(); } long processDefinitionCode; try { processDefinitionCode = CodeGenerateUtils.getInstance().genCode(); } catch (CodeGenerateException e) { logger.error("Generate process definition code error, projectCode:{}.", projectCode, e); putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); return result; } ProcessDefinition processDefinition = new ProcessDefinition(projectCode, name, processDefinitionCode, description, globalParams, "", timeout, loginUser.getId(), tenantId); processDefinition.setExecutionType(executionType); result = createEmptyDagDefine(loginUser, processDefinition); if (result.get(Constants.STATUS) != Status.SUCCESS) { logger.error("Create empty process definition error."); return result; } if (StringUtils.isBlank(scheduleJson)) { return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
Map<String, Object> scheduleResult = createDagSchedule(loginUser, processDefinition, scheduleJson); if (scheduleResult.get(Constants.STATUS) != Status.SUCCESS) { Status scheduleResultStatus = (Status) scheduleResult.get(Constants.STATUS); putMsg(result, scheduleResultStatus); throw new ServiceException(scheduleResultStatus); } return result; } protected Map<String, Object> createEmptyDagDefine(User loginUser, ProcessDefinition processDefinition) { Map<String, Object> result = new HashMap<>(); int insertVersion = processService.saveProcessDefine(loginUser, processDefinition, Boolean.TRUE, Boolean.TRUE); if (insertVersion == 0) { logger.error("Save process definition error, processDefinitionCode:{}.", processDefinition.getCode()); putMsg(result, Status.CREATE_PROCESS_DEFINITION_ERROR); throw new ServiceException(Status.CREATE_PROCESS_DEFINITION_ERROR); } putMsg(result, Status.SUCCESS); result.put(Constants.DATA_LIST, processDefinition); return result; } protected Map<String, Object> createDagSchedule(User loginUser, ProcessDefinition processDefinition, String scheduleJson) { Map<String, Object> result = new HashMap<>(); Schedule scheduleObj = JSONUtils.parseObject(scheduleJson, Schedule.class); if (scheduleObj == null) { putMsg(result, Status.DATA_IS_NOT_VALID, scheduleJson); throw new ServiceException(Status.DATA_IS_NOT_VALID); } Date now = new Date();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
scheduleObj.setProcessDefinitionCode(processDefinition.getCode()); if (DateUtils.differSec(scheduleObj.getStartTime(), scheduleObj.getEndTime()) == 0) { logger.warn("The schedule start time must not be the same as the end, processDefinitionCode:{}.", processDefinition.getCode()); putMsg(result, Status.SCHEDULE_START_TIME_END_TIME_SAME); return result; } if (!org.quartz.CronExpression.isValidExpression(scheduleObj.getCrontab())) { logger.error("CronExpression verify failure, cron:{}.", scheduleObj.getCrontab()); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, scheduleObj.getCrontab()); return result; } scheduleObj .setWarningType(scheduleObj.getWarningType() == null ? WarningType.NONE : scheduleObj.getWarningType()); scheduleObj.setWarningGroupId(scheduleObj.getWarningGroupId() == 0 ? 1 : scheduleObj.getWarningGroupId()); scheduleObj.setFailureStrategy( scheduleObj.getFailureStrategy() == null ? FailureStrategy.CONTINUE : scheduleObj.getFailureStrategy()); scheduleObj.setCreateTime(now); scheduleObj.setUpdateTime(now); scheduleObj.setUserId(loginUser.getId()); scheduleObj.setReleaseState(ReleaseState.OFFLINE); scheduleObj.setProcessInstancePriority(scheduleObj.getProcessInstancePriority() == null ? Priority.MEDIUM : scheduleObj.getProcessInstancePriority()); scheduleObj.setWorkerGroup(scheduleObj.getWorkerGroup() == null ? "default" : scheduleObj.getWorkerGroup()); scheduleObj .setEnvironmentCode(scheduleObj.getEnvironmentCode() == null ? -1 : scheduleObj.getEnvironmentCode()); scheduleMapper.insert(scheduleObj); putMsg(result, Status.SUCCESS); result.put("scheduleId", scheduleObj.getId()); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} /** * update process definition basic info * * @param loginUser login user * @param projectCode project code * @param name process definition name * @param code process definition code * @param description description * @param globalParams globalParams * @param timeout timeout * @param tenantCode tenantCode * @param scheduleJson scheduleJson * @param otherParamsJson otherParamsJson handle other params * @param executionType executionType * @return update result code */ @Override @Transactional public Map<String, Object> updateProcessDefinitionBasicInfo(User loginUser, long projectCode, String name, long code, String description, String globalParams, int timeout, String tenantCode, String scheduleJson, String otherParamsJson, ProcessExecutionTypeEnum executionType) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_UPDATE); boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); if (!hasProjectAndWritePerm) { return result; } if (checkDescriptionLength(description)) { logger.warn("Parameter description is too long."); putMsg(result, Status.DESCRIPTION_TOO_LONG_ERROR); return result; } int tenantId = -1; if (!Constants.DEFAULT.equals(tenantCode)) { Tenant tenant = tenantMapper.queryByTenantCode(tenantCode); if (tenant == null) { logger.error("Tenant does not exist."); putMsg(result, Status.TENANT_NOT_EXIST); return result; } tenantId = tenant.getId(); } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (processDefinition == null || projectCode != processDefinition.getProjectCode()) { logger.error("Process definition does not exist, code:{}.", code); putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(code)); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
if (processDefinition.getReleaseState() == ReleaseState.ONLINE) { logger.warn("Process definition is not allowed to be modified due to {}, processDefinitionCode:{}.", ReleaseState.ONLINE.getDescp(), processDefinition.getCode()); putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefinition.getName()); return result; } if (!name.equals(processDefinition.getName())) { ProcessDefinition definition = processDefinitionMapper.verifyByDefineName(project.getCode(), name); if (definition != null) { logger.warn("Process definition with the same name {} already exists, processDefinitionCode:{}.", definition.getName(), definition.getCode()); putMsg(result, Status.PROCESS_DEFINITION_NAME_EXIST, name); return result; } } ProcessDefinition processDefinitionDeepCopy = JSONUtils.parseObject(JSONUtils.toJsonString(processDefinition), ProcessDefinition.class); processDefinition.set(projectCode, name, description, globalParams, "", timeout, tenantId); processDefinition.setExecutionType(executionType); List<ProcessTaskRelationLog> taskRelationList = processTaskRelationLogMapper .queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion()); result = updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy, Lists.newArrayList(), otherParamsJson); if (result.get(Constants.STATUS) != Status.SUCCESS) { logger.error("Update process definition basic info error."); return result; } if (StringUtils.isBlank(scheduleJson)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
return result; } Map<String, Object> scheduleResult = updateDagSchedule(loginUser, projectCode, code, scheduleJson); if (scheduleResult.get(Constants.STATUS) != Status.SUCCESS) { Status scheduleResultStatus = (Status) scheduleResult.get(Constants.STATUS); putMsg(result, scheduleResultStatus); throw new ServiceException(scheduleResultStatus); } return result; } private void updateWorkflowValid(User user, ProcessDefinition oldProcessDefinition, ProcessDefinition newProcessDefinition) { if (oldProcessDefinition.getReleaseState() == ReleaseState.ONLINE) { throw new ServiceException(Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, oldProcessDefinition.getName()); } Project project = projectMapper.queryByCode(oldProcessDefinition.getProjectCode()); projectService.checkProjectAndAuthThrowException(user, project, WORKFLOW_UPDATE); if (checkDescriptionLength(newProcessDefinition.getDescription())) { throw new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR); } if (!oldProcessDefinition.getName().equals(newProcessDefinition.getName())) { ProcessDefinition definition = processDefinitionMapper .verifyByDefineName(newProcessDefinition.getProjectCode(), newProcessDefinition.getName()); if (definition != null) { throw new ServiceException(Status.PROCESS_DEFINITION_NAME_EXIST, newProcessDefinition.getName()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} } /** * update single resource workflow * * @param loginUser login user * @param workflowCode workflow resource code want to update * @param workflowUpdateRequest workflow update resource object * @return Process definition */ @Override @Transactional public ProcessDefinition updateSingleProcessDefinition(User loginUser, long workflowCode, WorkflowUpdateRequest workflowUpdateRequest) { ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(workflowCode); if (processDefinition == null) { throw new ServiceException(Status.PROCESS_DEFINE_NOT_EXIST, workflowCode); } ProcessDefinition processDefinitionUpdate = workflowUpdateRequest.mergeIntoProcessDefinition(processDefinition); this.updateWorkflowValid(loginUser, processDefinition, processDefinitionUpdate); if (processDefinitionUpdate.getTenantCode() != null) { Tenant tenant = tenantMapper.queryByTenantCode(processDefinitionUpdate.getTenantCode()); if (tenant == null) { throw new ServiceException(Status.TENANT_NOT_EXIST); } processDefinitionUpdate.setTenantId(tenant.getId()); } int update = processDefinitionMapper.updateById(processDefinitionUpdate);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
if (update <= 0) { throw new ServiceException(Status.UPDATE_PROCESS_DEFINITION_ERROR); } this.syncObj2Log(loginUser, processDefinition); return processDefinition; } protected Map<String, Object> updateDagSchedule(User loginUser, long projectCode, long processDefinitionCode, String scheduleJson) { Map<String, Object> result = new HashMap<>(); Schedule schedule = JSONUtils.parseObject(scheduleJson, Schedule.class); if (schedule == null) { putMsg(result, Status.DATA_IS_NOT_VALID, scheduleJson); throw new ServiceException(Status.DATA_IS_NOT_VALID); } FailureStrategy failureStrategy = schedule.getFailureStrategy() == null ? FailureStrategy.CONTINUE : schedule.getFailureStrategy(); WarningType warningType = schedule.getWarningType() == null ? WarningType.NONE : schedule.getWarningType(); Priority processInstancePriority = schedule.getProcessInstancePriority() == null ? Priority.MEDIUM : schedule.getProcessInstancePriority(); int warningGroupId = schedule.getWarningGroupId() == 0 ? 1 : schedule.getWarningGroupId(); String workerGroup = schedule.getWorkerGroup() == null ? "default" : schedule.getWorkerGroup(); long environmentCode = schedule.getEnvironmentCode() == null ? -1 : schedule.getEnvironmentCode(); ScheduleParam param = new ScheduleParam(); param.setStartTime(schedule.getStartTime()); param.setEndTime(schedule.getEndTime()); param.setCrontab(schedule.getCrontab()); param.setTimezoneId(schedule.getTimezoneId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
return schedulerService.updateScheduleByProcessDefinitionCode( loginUser, projectCode, processDefinitionCode, JSONUtils.toJsonString(param), warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode); } /** * release process definition and schedule * * @param loginUser login user * @param projectCode project code * @param code process definition code * @param releaseState releaseState * @return update result code */ @Transactional @Override public Map<String, Object> releaseWorkflowAndSchedule(User loginUser, long projectCode, long code, ReleaseState releaseState) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_ONLINE_OFFLINE); if (result.get(Constants.STATUS) != Status.SUCCESS) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
return result; } if (null == releaseState) { putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, RELEASESTATE); return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(code); if (processDefinition == null) { logger.error("Process definition does not exist, code:{}.", code); putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(code)); return result; } Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(code); if (scheduleObj == null) { logger.error("Schedule cron does not exist, processDefinitionCode:{}.", code); putMsg(result, Status.SCHEDULE_CRON_NOT_EXISTS, "processDefinitionCode:" + code); return result; } switch (releaseState) { case ONLINE: List<ProcessTaskRelation> relationList = processService.findRelationByCode(code, processDefinition.getVersion()); if (CollectionUtils.isEmpty(relationList)) { logger.warn("Process definition has no task relation, processDefinitionCode:{}.", code); putMsg(result, Status.PROCESS_DAG_IS_EMPTY); return result; } processDefinition.setReleaseState(releaseState); processDefinitionMapper.updateById(processDefinition);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
schedulerService.setScheduleState(loginUser, projectCode, scheduleObj.getId(), ReleaseState.ONLINE); break; case OFFLINE: processDefinition.setReleaseState(releaseState); int updateProcess = processDefinitionMapper.updateById(processDefinition); if (updateProcess > 0) { logger.info("Set schedule offline, projectCode:{}, processDefinitionCode:{}, scheduleId:{}.", projectCode, code, scheduleObj.getId()); scheduleObj.setReleaseState(ReleaseState.OFFLINE); int updateSchedule = scheduleMapper.updateById(scheduleObj); if (updateSchedule == 0) { logger.error( "Set schedule offline error, projectCode:{}, processDefinitionCode:{}, scheduleId:{}", projectCode, code, scheduleObj.getId()); putMsg(result, Status.OFFLINE_SCHEDULE_ERROR); throw new ServiceException(Status.OFFLINE_SCHEDULE_ERROR); } schedulerService.deleteSchedule(project.getId(), scheduleObj.getId()); } break; default: putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, RELEASESTATE); return result; } putMsg(result, Status.SUCCESS); return result; } /** * save other relation
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param loginUser * @param processDefinition * @param result * @param otherParamsJson */ @Override public void saveOtherRelation(User loginUser, ProcessDefinition processDefinition, Map<String, Object> result, String otherParamsJson) { } /** * get Json String * @param loginUser * @param processDefinition * @return Json String */ @Override public String doOtherOperateProcess(User loginUser, ProcessDefinition processDefinition) { return null; } /** * delete other relation * @param project * @param result * @param processDefinition */ @Override public void deleteOtherRelation(Project project, Map<String, Object> result, ProcessDefinition processDefinition) { } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.controller;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.constants.Constants; import org.apache.dolphinscheduler.common.enums.ProcessExecutionTypeEnum; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog; import org.apache.dolphinscheduler.dao.entity.User; import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletResponse; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.mock.web.MockHttpServletResponse; /** * process definition controller test */ @ExtendWith(MockitoExtension.class)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
public class ProcessDefinitionControllerTest { @InjectMocks private ProcessDefinitionController processDefinitionController; @Mock private ProcessDefinitionServiceImpl processDefinitionService; protected User user; @BeforeEach public void before() { User loginUser = new User(); loginUser.setId(1); loginUser.setUserType(UserType.GENERAL_USER); loginUser.setUserName("admin"); user = loginUser; } @Test
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
public void testCreateProcessDefinition() { String relationJson = "[{\"name\":\"\",\"pre_task_code\":0,\"pre_task_version\":0,\"post_task_code\":123456789,\"post_task_version\":1," + "\"condition_type\":0,\"condition_params\":\"{}\"},{\"name\":\"\",\"pre_task_code\":123456789,\"pre_task_version\":1," + "\"post_task_code\":123451234,\"post_task_version\":1,\"condition_type\":0,\"condition_params\":\"{}\"}]"; String taskDefinitionJson = "[{\"name\":\"detail_up\",\"description\":\"\",\"taskType\":\"SHELL\",\"taskParams\":" + "\"{\\\"resourceList\\\":[],\\\"localParams\\\":[{\\\"prop\\\":\\\"datetime\\\",\\\"direct\\\":\\\"IN\\\"," + "\\\"type\\\":\\\"VARCHAR\\\",\\\"value\\\":\\\"${system.datetime}\\\"}],\\\"rawScript\\\":" + "\\\"echo ${datetime}\\\",\\\"conditionResult\\\":\\\"{\\\\\\\"successNode\\\\\\\":[\\\\\\\"\\\\\\\"]," + "\\\\\\\"failedNode\\\\\\\":[\\\\\\\"\\\\\\\"]}\\\",\\\"dependence\\\":{}}\",\"flag\":0,\"taskPriority\":0," + "\"workerGroup\":\"default\",\"failRetryTimes\":0,\"failRetryInterval\":0,\"timeoutFlag\":0," + "\"timeoutNotifyStrategy\":0,\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]"; long projectCode = 1L; String name = "dag_test"; String description = "desc test"; String globalParams = "[]"; String locations = "[]"; int timeout = 0; String tenantCode = "root"; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); result.put(Constants.DATA_LIST, 1); Mockito.when( processDefinitionService.createProcessDefinition(user, projectCode, name, description, globalParams, locations, timeout, tenantCode, relationJson, taskDefinitionJson, "", ProcessExecutionTypeEnum.PARALLEL)) .thenReturn(result); Result response = processDefinitionController.createProcessDefinition(user, projectCode, name, description, globalParams,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
locations, timeout, tenantCode, relationJson, taskDefinitionJson, "", ProcessExecutionTypeEnum.PARALLEL); Assertions.assertEquals(Status.SUCCESS.getCode(), response.getCode().intValue()); } private void putMsg(Map<String, Object> result, Status status, Object... statusParams) { result.put(Constants.STATUS, status); if (statusParams != null && statusParams.length > 0) { result.put(Constants.MSG, MessageFormat.format(status.getMsg(), statusParams)); } else { result.put(Constants.MSG, status.getMsg()); } } public void putMsg(Result result, Status status, Object... statusParams) { result.setCode(status.getCode()); if (statusParams != null && statusParams.length > 0) { result.setMsg(MessageFormat.format(status.getMsg(), statusParams)); } else { result.setMsg(status.getMsg()); } } @Test public void testVerifyProcessDefinitionName() { Map<String, Object> result = new HashMap<>(); putMsg(result, Status.PROCESS_DEFINITION_NAME_EXIST); long projectCode = 1L; String name = "dag_test"; Mockito.when(processDefinitionService.verifyProcessDefinitionName(user, projectCode, name, 0)) .thenReturn(result); Result response = processDefinitionController.verifyProcessDefinitionName(user, projectCode, name, 0); Assertions.assertTrue(response.isStatus(Status.PROCESS_DEFINITION_NAME_EXIST));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
} @Test public void updateProcessDefinition() { String relationJson = "[{\"name\":\"\",\"pre_task_code\":0,\"pre_task_version\":0,\"post_task_code\":123456789,\"post_task_version\":1," + "\"condition_type\":0,\"condition_params\":\"{}\"},{\"name\":\"\",\"pre_task_code\":123456789,\"pre_task_version\":1," + "\"post_task_code\":123451234,\"post_task_version\":1,\"condition_type\":0,\"condition_params\":\"{}\"}]"; String taskDefinitionJson = "[{\"name\":\"detail_up\",\"description\":\"\",\"taskType\":\"SHELL\",\"taskParams\":" + "\"{\\\"resourceList\\\":[],\\\"localParams\\\":[{\\\"prop\\\":\\\"datetime\\\",\\\"direct\\\":\\\"IN\\\"," + "\\\"type\\\":\\\"VARCHAR\\\",\\\"value\\\":\\\"${system.datetime}\\\"}],\\\"rawScript\\\":" + "\\\"echo ${datetime}\\\",\\\"conditionResult\\\":\\\"{\\\\\\\"successNode\\\\\\\":[\\\\\\\"\\\\\\\"]," + "\\\\\\\"failedNode\\\\\\\":[\\\\\\\"\\\\\\\"]}\\\",\\\"dependence\\\":{}}\",\"flag\":0,\"taskPriority\":0," + "\"workerGroup\":\"default\",\"failRetryTimes\":0,\"failRetryInterval\":0,\"timeoutFlag\":0," + "\"timeoutNotifyStrategy\":0,\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]"; String locations = "{\"tasks-36196\":{\"name\":\"ssh_test1\",\"targetarr\":\"\",\"x\":141,\"y\":70}}"; long projectCode = 1L; String name = "dag_test"; String description = "desc test"; String globalParams = "[]"; int timeout = 0; String tenantCode = "root"; long code = 123L; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); result.put("processDefinitionId", 1); Mockito.when(processDefinitionService.updateProcessDefinition(user, projectCode, name, code, description, globalParams, locations, timeout, tenantCode, relationJson, taskDefinitionJson, "", ProcessExecutionTypeEnum.PARALLEL)).thenReturn(result);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
Result response = processDefinitionController.updateProcessDefinition(user, projectCode, name, code, description, globalParams, locations, timeout, tenantCode, relationJson, taskDefinitionJson, "", ProcessExecutionTypeEnum.PARALLEL, ReleaseState.OFFLINE); Assertions.assertEquals(Status.SUCCESS.getCode(), response.getCode().intValue()); } @Test public void testReleaseProcessDefinition() { long projectCode = 1L; int id = 1; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Mockito.when(processDefinitionService.releaseProcessDefinition(user, projectCode, id, ReleaseState.OFFLINE)) .thenReturn(result); Result response = processDefinitionController.releaseProcessDefinition(user, projectCode, id, ReleaseState.OFFLINE); Assertions.assertTrue(response != null && response.isSuccess()); } @Test public void testQueryProcessDefinitionByCode() { String locations = "{\"tasks-36196\":{\"name\":\"ssh_test1\",\"targetarr\":\"\",\"x\":141,\"y\":70}}"; long projectCode = 1L; String name = "dag_test"; String description = "desc test"; long code = 1L; ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setProjectCode(projectCode); processDefinition.setDescription(description); processDefinition.setCode(code); processDefinition.setLocations(locations);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
processDefinition.setName(name); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); result.put(Constants.DATA_LIST, processDefinition); Mockito.when(processDefinitionService.queryProcessDefinitionByCode(user, projectCode, code)).thenReturn(result); Result response = processDefinitionController.queryProcessDefinitionByCode(user, projectCode, code); Assertions.assertEquals(Status.SUCCESS.getCode(), response.getCode().intValue()); } @Test public void testBatchCopyProcessDefinition() { long projectCode = 1L; long targetProjectCode = 2L; String code = "1"; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Mockito.when(processDefinitionService.batchCopyProcessDefinition(user, projectCode, code, targetProjectCode)) .thenReturn(result); Result response = processDefinitionController.copyProcessDefinition(user, projectCode, code, targetProjectCode); Assertions.assertTrue(response != null && response.isSuccess()); } @Test public void testBatchMoveProcessDefinition() { long projectCode = 1L; long targetProjectCode = 2L; String id = "1"; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Mockito.when(processDefinitionService.batchMoveProcessDefinition(user, projectCode, id, targetProjectCode)) .thenReturn(result); Result response = processDefinitionController.moveProcessDefinition(user, projectCode, id, targetProjectCode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
Assertions.assertTrue(response != null && response.isSuccess()); } @Test public void testQueryProcessDefinitionList() { long projectCode = 1L; List<ProcessDefinition> resourceList = getDefinitionList(); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); result.put(Constants.DATA_LIST, resourceList); Mockito.when(processDefinitionService.queryProcessDefinitionList(user, projectCode)).thenReturn(result); Result response = processDefinitionController.queryProcessDefinitionList(user, projectCode); Assertions.assertTrue(response != null && response.isSuccess()); } public List<ProcessDefinition> getDefinitionList() { List<ProcessDefinition> resourceList = new ArrayList<>(); String locations = "{\"tasks-36196\":{\"name\":\"ssh_test1\",\"targetarr\":\"\",\"x\":141,\"y\":70}}"; String projectName = "test"; String name = "dag_test"; String description = "desc test"; int id = 1; ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setProjectName(projectName); processDefinition.setDescription(description); processDefinition.setId(id); processDefinition.setLocations(locations); processDefinition.setName(name); String name2 = "dag_test"; int id2 = 2; ProcessDefinition processDefinition2 = new ProcessDefinition(); processDefinition2.setProjectName(projectName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
processDefinition2.setDescription(description); processDefinition2.setId(id2); processDefinition2.setLocations(locations); processDefinition2.setName(name2); resourceList.add(processDefinition); resourceList.add(processDefinition2); return resourceList; } @Test public void testDeleteProcessDefinitionByCode() { long projectCode = 1L; long code = 1L; Assertions.assertDoesNotThrow( () -> processDefinitionController.deleteProcessDefinitionByCode(user, projectCode, code)); } @Test public void testGetNodeListByDefinitionId() { long projectCode = 1L; Long code = 1L; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Mockito.when(processDefinitionService.getTaskNodeListByDefinitionCode(user, projectCode, code)) .thenReturn(result); Result response = processDefinitionController.getNodeListByDefinitionCode(user, projectCode, code); Assertions.assertTrue(response != null && response.isSuccess()); } @Test public void testGetNodeListByDefinitionIdList() { long projectCode = 1L;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
String codeList = "1,2,3"; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Mockito.when(processDefinitionService.getNodeListMapByDefinitionCodes(user, projectCode, codeList)) .thenReturn(result); Result response = processDefinitionController.getNodeListMapByDefinitionCodes(user, projectCode, codeList); Assertions.assertTrue(response != null && response.isSuccess()); } @Test public void testQueryProcessDefinitionAllByProjectId() { long projectCode = 1L; Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Mockito.when(processDefinitionService.queryAllProcessDefinitionByProjectCode(user, projectCode)) .thenReturn(result); Result response = processDefinitionController.queryAllProcessDefinitionByProjectCode(user, projectCode); Assertions.assertTrue(response != null && response.isSuccess()); } @Test public void testViewTree() throws Exception { long projectCode = 1L; int processId = 1; int limit = 2; User user = new User(); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Mockito.when(processDefinitionService.viewTree(user, projectCode, processId, limit)).thenReturn(result); Result response = processDefinitionController.viewTree(user, projectCode, processId, limit); Assertions.assertTrue(response != null && response.isSuccess()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
@Test public void testQueryProcessDefinitionListPaging() { long projectCode = 1L; int pageNo = 1; int pageSize = 10; String searchVal = ""; int userId = 1; PageInfo<ProcessDefinition> pageInfo = new PageInfo<>(1, 10); Mockito.when(processDefinitionService.queryProcessDefinitionListPaging(user, projectCode, searchVal, "", userId, pageNo, pageSize)).thenReturn(pageInfo); Result<PageInfo<ProcessDefinition>> response = processDefinitionController .queryProcessDefinitionListPaging(user, projectCode, searchVal, "", userId, pageNo, pageSize); Assertions.assertTrue(response != null && response.isSuccess()); } @Test public void testBatchExportProcessDefinitionByCodes() { String processDefinitionIds = "1,2"; long projectCode = 1L; HttpServletResponse response = new MockHttpServletResponse(); Mockito.doNothing().when(this.processDefinitionService).batchExportProcessDefinitionByCodes(user, projectCode, processDefinitionIds, response); processDefinitionController.batchExportProcessDefinitionByCodes(user, projectCode, processDefinitionIds, response); } @Test public void testQueryProcessDefinitionVersions() { long projectCode = 1L; Result resultMap = new Result(); putMsg(resultMap, Status.SUCCESS); resultMap.setData(new PageInfo<ProcessDefinitionLog>(1, 10));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
Mockito.when(processDefinitionService.queryProcessDefinitionVersions( user, projectCode, 1, 10, 1)) .thenReturn(resultMap); Result result = processDefinitionController.queryProcessDefinitionVersions( user, projectCode, 1, 10, 1); Assertions.assertEquals(Status.SUCCESS.getCode(), (int) result.getCode()); } @Test public void testSwitchProcessDefinitionVersion() { long projectCode = 1L; Map<String, Object> resultMap = new HashMap<>(); putMsg(resultMap, Status.SUCCESS); Mockito.when(processDefinitionService.switchProcessDefinitionVersion(user, projectCode, 1, 10)) .thenReturn(resultMap); Result result = processDefinitionController.switchProcessDefinitionVersion(user, projectCode, 1, 10); Assertions.assertEquals(Status.SUCCESS.getCode(), (int) result.getCode()); } @Test public void testDeleteProcessDefinitionVersion() { long projectCode = 1L; Map<String, Object> resultMap = new HashMap<>(); putMsg(resultMap, Status.SUCCESS); Mockito.when(processDefinitionService.deleteProcessDefinitionVersion( user, projectCode, 1, 10)).thenReturn(resultMap); Result result = processDefinitionController.deleteProcessDefinitionVersion( user, projectCode, 1, 10); Assertions.assertEquals(Status.SUCCESS.getCode(), (int) result.getCode()); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.TASK_DEFINITION_MOVE; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_BATCH_COPY; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_CREATE; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_DEFINITION; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_DEFINITION_DELETE; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_IMPORT; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_ONLINE_OFFLINE; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_TREE_VIEW; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_UPDATE; import static org.apache.dolphinscheduler.common.constants.Constants.DEFAULT; import static org.apache.dolphinscheduler.common.constants.Constants.EMPTY_STRING; import static org.mockito.ArgumentMatchers.any;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
import static org.mockito.ArgumentMatchers.isA; import org.apache.dolphinscheduler.api.dto.workflow.WorkflowCreateRequest; import org.apache.dolphinscheduler.api.dto.workflow.WorkflowFilterRequest; import org.apache.dolphinscheduler.api.dto.workflow.WorkflowUpdateRequest; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.exceptions.ServiceException; import org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl; import org.apache.dolphinscheduler.api.service.impl.ProjectServiceImpl; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.common.constants.Constants; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ProcessExecutionTypeEnum; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.graph.DAG; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.dao.entity.DagData; import org.apache.dolphinscheduler.dao.entity.DataSource; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.TaskDefinitionLog; import org.apache.dolphinscheduler.dao.entity.TaskMainInfo; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionLogMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper; import org.apache.dolphinscheduler.dao.mapper.TenantMapper; import org.apache.dolphinscheduler.dao.model.PageListingResult; import org.apache.dolphinscheduler.dao.repository.ProcessDefinitionDao; import org.apache.dolphinscheduler.dao.repository.TaskDefinitionLogDao; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.spi.enums.DbType; import org.apache.commons.lang3.StringUtils; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import javax.servlet.http.HttpServletResponse; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.mock.web.MockMultipartFile; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; @ExtendWith(MockitoExtension.class) public class ProcessDefinitionServiceTest extends BaseServiceTestTool { private static final String taskRelationJson = "[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":123456789," + "\"postTaskVersion\":1,\"conditionType\":0,\"conditionParams\":\"{}\"},{\"name\":\"\",\"preTaskCode\":123456789," + "\"preTaskVersion\":1,\"postTaskCode\":123451234,\"postTaskVersion\":1,\"conditionType\":0,\"conditionParams\":\"{}\"}]"; private static final String taskDefinitionJson = "[{\"code\":123456789,\"name\":\"test1\",\"version\":1,\"description\":\"\",\"delayTime\":0,\"taskType\":\"SHELL\"," + "\"taskParams\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"echo 1\",\"dependence\":{},\"conditionResult\":{\"successNode\":[],\"failedNode\":[]},\"waitStartTimeout\":{}," + "\"switchResult\":{}},\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"default\",\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\"," + "\"timeoutNotifyStrategy\":null,\"timeout\":0,\"environmentCode\":-1},{\"code\":123451234,\"name\":\"test2\",\"version\":1,\"description\":\"\",\"delayTime\":0,\"taskType\":\"SHELL\"," + "\"taskParams\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"echo 2\",\"dependence\":{},\"conditionResult\":{\"successNode\":[],\"failedNode\":[]},\"waitStartTimeout\":{}," + "\"switchResult\":{}},\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"workerGroup\":\"default\",\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\"," + "\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"environmentCode\":-1}]"; @InjectMocks private ProcessDefinitionServiceImpl processDefinitionService; @Mock private ProcessDefinitionMapper processDefinitionMapper; @Mock private ProcessDefinitionLogMapper processDefinitionLogMapper; @Mock private ProcessDefinitionDao processDefinitionDao;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
@Mock private ProcessTaskRelationMapper processTaskRelationMapper; @Mock private ProjectMapper projectMapper; @Mock private ProjectServiceImpl projectService; @Mock private ScheduleMapper scheduleMapper; @Mock private SchedulerService schedulerService; @Mock private ProcessService processService; @Mock private TaskDefinitionLogDao taskDefinitionLogDao; @Mock private ProcessInstanceService processInstanceService; @Mock private TenantMapper tenantMapper; @Mock private DataSourceMapper dataSourceMapper; @Mock private WorkFlowLineageService workFlowLineageService; protected User user; protected Exception exception; protected final static long projectCode = 1L; protected final static long projectCodeOther = 2L; protected final static long processDefinitionCode = 11L; protected final static String name = "testProcessDefinitionName"; protected final static String description = "this is a description"; protected final static String releaseState = "ONLINE";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
protected final static int warningGroupId = 1; protected final static int timeout = 60; protected final static String executionType = "PARALLEL"; protected final static String tenantCode = "tenant"; @BeforeEach public void before() { User loginUser = new User(); loginUser.setId(1); loginUser.setTenantId(2); loginUser.setUserType(UserType.GENERAL_USER); loginUser.setUserName("admin"); user = loginUser; } @Test public void testQueryProcessDefinitionList() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); Map<String, Object> map = processDefinitionService.queryProcessDefinitionList(user, projectCode); Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS)); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); List<ProcessDefinition> resourceList = new ArrayList<>(); resourceList.add(getProcessDefinition());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Mockito.when(processDefinitionMapper.queryAllDefinitionList(project.getCode())).thenReturn(resourceList); Map<String, Object> checkSuccessRes = processDefinitionService.queryProcessDefinitionList(user, projectCode); Assertions.assertEquals(Status.SUCCESS, checkSuccessRes.get(Constants.STATUS)); } @Test public void testQueryProcessDefinitionListPaging() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); try { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(null); Mockito.doThrow(new ServiceException(Status.PROJECT_NOT_EXIST)).when(projectService) .checkProjectAndAuthThrowException(user, null, WORKFLOW_DEFINITION); processDefinitionService.queryProcessDefinitionListPaging(user, projectCode, "", "", 1, 5, 0); } catch (ServiceException serviceException) { Assertions.assertEquals(Status.PROJECT_NOT_EXIST.getCode(), serviceException.getCode()); } Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS, projectCode); user.setId(1); Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, project, WORKFLOW_DEFINITION); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project); PageListingResult<ProcessDefinition> pageListingResult = PageListingResult.<ProcessDefinition>builder() .records(Collections.emptyList()) .currentPage(1) .pageSize(10) .totalCount(30) .build();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Mockito.when(processDefinitionDao.listingProcessDefinition( Mockito.eq(0), Mockito.eq(10), Mockito.eq(""), Mockito.eq(1), Mockito.eq(project.getCode()))).thenReturn(pageListingResult); PageInfo<ProcessDefinition> pageInfo = processDefinitionService.queryProcessDefinitionListPaging( user, project.getCode(), "", "", 1, 0, 10); Assertions.assertNotNull(pageInfo); } @Test public void testQueryProcessDefinitionByCode() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); Tenant tenant = new Tenant(); tenant.setId(1); tenant.setTenantCode("root"); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); Map<String, Object> map = processDefinitionService.queryProcessDefinitionByCode(user, 1L, 1L); Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS)); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); DagData dagData = new DagData(getProcessDefinition(), null, null); Mockito.when(processService.genDagData(Mockito.any())).thenReturn(dagData);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Map<String, Object> instanceNotexitRes = processDefinitionService.queryProcessDefinitionByCode(user, projectCode, 1L); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, instanceNotexitRes.get(Constants.STATUS)); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(getProcessDefinition()); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); Mockito.when(tenantMapper.queryById(1)).thenReturn(tenant); Map<String, Object> successRes = processDefinitionService.queryProcessDefinitionByCode(user, projectCode, 46L); Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS)); } @Test public void testQueryProcessDefinitionByName() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); Map<String, Object> map = processDefinitionService.queryProcessDefinitionByName(user, projectCode, "test_def"); Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS)); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); Mockito.when(processDefinitionMapper.queryByDefineName(project.getCode(), "test_def")).thenReturn(null);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Map<String, Object> instanceNotExitRes = processDefinitionService.queryProcessDefinitionByName(user, projectCode, "test_def"); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, instanceNotExitRes.get(Constants.STATUS)); Mockito.when(processDefinitionMapper.queryByDefineName(project.getCode(), "test")) .thenReturn(getProcessDefinition()); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); Map<String, Object> successRes = processDefinitionService.queryProcessDefinitionByName(user, projectCode, "test"); Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS)); } @Test public void testBatchCopyProcessDefinition() { Project project = getProject(projectCode); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_BATCH_COPY)) .thenReturn(result); Map<String, Object> map = processDefinitionService.batchCopyProcessDefinition(user, projectCode, StringUtils.EMPTY, 2L); Assertions.assertEquals(Status.PROCESS_DEFINITION_CODES_IS_EMPTY, map.get(Constants.STATUS)); putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_BATCH_COPY)) .thenReturn(result); Map<String, Object> map1 = processDefinitionService.batchCopyProcessDefinition(
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
user, projectCode, String.valueOf(project.getId()), 2L); Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map1.get(Constants.STATUS)); Project project1 = getProject(projectCodeOther); Mockito.when(projectMapper.queryByCode(projectCodeOther)).thenReturn(project1); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCodeOther, WORKFLOW_BATCH_COPY)) .thenReturn(result); putMsg(result, Status.SUCCESS, projectCodeOther); ProcessDefinition definition = getProcessDefinition(); List<ProcessDefinition> processDefinitionList = new ArrayList<>(); processDefinitionList.add(definition); Set<Long> definitionCodes = new HashSet<>(); for (String code : String.valueOf(processDefinitionCode).split(Constants.COMMA)) { try { long parse = Long.parseLong(code); definitionCodes.add(parse); } catch (NumberFormatException e) { Assertions.fail(); } } Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList); Mockito.when(processService.saveProcessDefine(user, definition, Boolean.TRUE, Boolean.TRUE)).thenReturn(2); Map<String, Object> map3 = processDefinitionService.batchCopyProcessDefinition( user, projectCodeOther, String.valueOf(processDefinitionCode), projectCode); Assertions.assertEquals(Status.SUCCESS, map3.get(Constants.STATUS)); } @Test public void testBatchMoveProcessDefinition() { Project project1 = getProject(projectCode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project1); Project project2 = getProject(projectCodeOther); Mockito.when(projectMapper.queryByCode(projectCodeOther)).thenReturn(project2); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project1, projectCode, TASK_DEFINITION_MOVE)) .thenReturn(result); Mockito.when(projectService.checkProjectAndAuth(user, project2, projectCodeOther, TASK_DEFINITION_MOVE)) .thenReturn(result); ProcessDefinition definition = getProcessDefinition(); definition.setVersion(1); List<ProcessDefinition> processDefinitionList = new ArrayList<>(); processDefinitionList.add(definition); Set<Long> definitionCodes = new HashSet<>(); for (String code : String.valueOf(processDefinitionCode).split(Constants.COMMA)) { try { long parse = Long.parseLong(code); definitionCodes.add(parse); } catch (NumberFormatException e) { Assertions.fail(); } } Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList); Mockito.when(processService.saveProcessDefine(user, definition, Boolean.TRUE, Boolean.TRUE)).thenReturn(2); Mockito.when(processTaskRelationMapper.queryByProcessCode(projectCode, processDefinitionCode)) .thenReturn(getProcessTaskRelation()); putMsg(result, Status.SUCCESS); Map<String, Object> successRes = processDefinitionService.batchMoveProcessDefinition( user, projectCode, String.valueOf(processDefinitionCode), projectCodeOther);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS)); } @Test public void deleteProcessDefinitionByCodeTest() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.deleteProcessDefinitionByCode(user, 2L)); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode()); Mockito.when(processDefinitionMapper.queryByCode(6L)).thenReturn(this.getProcessDefinition()); Mockito.doThrow(new ServiceException(Status.PROJECT_NOT_FOUND)).when(projectService) .checkProjectAndAuthThrowException(user, project, WORKFLOW_DEFINITION_DELETE); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.deleteProcessDefinitionByCode(user, 6L)); Assertions.assertEquals(Status.PROJECT_NOT_FOUND.getCode(), ((ServiceException) exception).getCode()); Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, project, WORKFLOW_DEFINITION_DELETE); Mockito.when(processDefinitionMapper.queryByCode(1L)).thenReturn(null); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.deleteProcessDefinitionByCode(user, 1L)); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode()); ProcessDefinition processDefinition = getProcessDefinition(); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L)); Assertions.assertEquals(Status.USER_NO_OPERATION_PERM.getCode(), ((ServiceException) exception).getCode());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
user.setUserType(UserType.ADMIN_USER); processDefinition.setReleaseState(ReleaseState.ONLINE); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L)); Assertions.assertEquals(Status.PROCESS_DEFINE_STATE_ONLINE.getCode(), ((ServiceException) exception).getCode()); processDefinition.setReleaseState(ReleaseState.OFFLINE); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition); Mockito.when(scheduleMapper.queryByProcessDefinitionCode(46L)).thenReturn(getSchedule()); Mockito.when(scheduleMapper.deleteById(46)).thenReturn(1); Mockito.when(processDefinitionMapper.deleteById(processDefinition.getId())).thenReturn(1); Mockito.when(processTaskRelationMapper.deleteByCode(project.getCode(), processDefinition.getCode())) .thenReturn(1); Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), processDefinition.getCode())) .thenReturn(Collections.emptySet()); processDefinitionService.deleteProcessDefinitionByCode(user, 46L); Schedule schedule = getSchedule(); schedule.setReleaseState(ReleaseState.ONLINE); Mockito.when(scheduleMapper.queryByProcessDefinitionCode(46L)).thenReturn(schedule); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L)); Assertions.assertEquals(Status.SCHEDULE_STATE_ONLINE.getCode(), ((ServiceException) exception).getCode()); user.setUserType(UserType.ADMIN_USER); TaskMainInfo taskMainInfo = getTaskMainInfo().get(0); Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), processDefinition.getCode())) .thenReturn(ImmutableSet.copyOf(getTaskMainInfo()));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L)); Assertions.assertEquals(Status.DELETE_PROCESS_DEFINITION_USE_BY_OTHER_FAIL.getCode(), ((ServiceException) exception).getCode()); schedule.setReleaseState(ReleaseState.OFFLINE); Mockito.when(processDefinitionMapper.deleteById(46)).thenReturn(1); Mockito.when(scheduleMapper.deleteById(schedule.getId())).thenReturn(1); Mockito.when(processTaskRelationMapper.deleteByCode(project.getCode(), processDefinition.getCode())) .thenReturn(1); Mockito.when(scheduleMapper.queryByProcessDefinitionCode(46L)).thenReturn(getSchedule()); Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), processDefinition.getCode())) .thenReturn(Collections.emptySet()); Assertions.assertDoesNotThrow(() -> processDefinitionService.deleteProcessDefinitionByCode(user, 46L)); } @Test public void batchDeleteProcessDefinitionByCodeTest() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); final String twoCodes = "11,12"; Set<Long> definitionCodes = Lists.newArrayList(twoCodes.split(Constants.COMMA)).stream() .map(Long::parseLong).collect(Collectors.toSet()); ProcessDefinition process = getProcessDefinition(); List<ProcessDefinition> processDefinitionList = new ArrayList<>(); processDefinitionList.add(process); Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList); Throwable exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.batchDeleteProcessDefinitionByCodes(user, projectCode, twoCodes)); String formatter = MessageFormat.format(Status.BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR.getMsg(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
"12[process definition not exist]"); Assertions.assertEquals(formatter, exception.getMessage()); Map<String, Object> result = new HashMap<>(); final String singleCodes = "11"; definitionCodes = Lists.newArrayList(singleCodes.split(Constants.COMMA)).stream().map(Long::parseLong) .collect(Collectors.toSet()); Mockito.when(processDefinitionMapper.queryByCodes(definitionCodes)).thenReturn(processDefinitionList); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(process); user.setUserType(UserType.ADMIN_USER); putMsg(result, Status.SUCCESS, projectCode); process.setReleaseState(ReleaseState.ONLINE); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.batchDeleteProcessDefinitionByCodes(user, projectCode, singleCodes)); String subFormatter = MessageFormat.format(Status.PROCESS_DEFINE_STATE_ONLINE.getMsg(), process.getName()); formatter = MessageFormat.format(Status.DELETE_PROCESS_DEFINE_ERROR.getMsg(), process.getName(), subFormatter); Assertions.assertEquals(formatter, exception.getMessage()); process.setReleaseState(ReleaseState.OFFLINE); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(process); Mockito.when(processDefinitionMapper.deleteById(process.getId())).thenReturn(1); Mockito.when(processTaskRelationMapper.deleteByCode(project.getCode(), process.getCode())) .thenReturn(1); Mockito.when(workFlowLineageService.queryTaskDepOnProcess(project.getCode(), process.getCode())) .thenReturn(Collections.emptySet()); putMsg(result, Status.SUCCESS, projectCode); Map<String, Object> deleteSuccess =
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
processDefinitionService.batchDeleteProcessDefinitionByCodes(user, projectCode, singleCodes); Assertions.assertEquals(Status.SUCCESS, deleteSuccess.get(Constants.STATUS)); } @Test public void testReleaseProcessDefinition() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_ONLINE_OFFLINE)) .thenReturn(result); Map<String, Object> map = processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.OFFLINE); Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS)); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(getProcessDefinition()); List<ProcessTaskRelation> processTaskRelationList = new ArrayList<>(); ProcessTaskRelation processTaskRelation = new ProcessTaskRelation(); processTaskRelation.setProjectCode(projectCode); processTaskRelation.setProcessDefinitionCode(46L); processTaskRelation.setPostTaskCode(123L); processTaskRelationList.add(processTaskRelation); Mockito.when(processService.findRelationByCode(46L, 1)).thenReturn(processTaskRelationList); Map<String, Object> onlineRes = processDefinitionService.releaseProcessDefinition(user, projectCode, 46, ReleaseState.ONLINE); Assertions.assertEquals(Status.SUCCESS, onlineRes.get(Constants.STATUS)); Map<String, Object> onlineWithResourceRes =
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
processDefinitionService.releaseProcessDefinition(user, projectCode, 46, ReleaseState.ONLINE); Assertions.assertEquals(Status.SUCCESS, onlineWithResourceRes.get(Constants.STATUS)); Map<String, Object> failRes = processDefinitionService.releaseProcessDefinition(user, projectCode, 46, ReleaseState.getEnum(2)); Assertions.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, failRes.get(Constants.STATUS)); } @Test public void testVerifyProcessDefinitionName() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.PROJECT_NOT_FOUND, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_CREATE)) .thenReturn(result); Map<String, Object> map = processDefinitionService.verifyProcessDefinitionName(user, projectCode, "test_pdf", 0); Assertions.assertEquals(Status.PROJECT_NOT_FOUND, map.get(Constants.STATUS)); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), "test_pdf")).thenReturn(null); Map<String, Object> processNotExistRes = processDefinitionService.verifyProcessDefinitionName(user, projectCode, "test_pdf", 0); Assertions.assertEquals(Status.SUCCESS, processNotExistRes.get(Constants.STATUS)); Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), "test_pdf")) .thenReturn(getProcessDefinition()); Map<String, Object> processExistRes = processDefinitionService.verifyProcessDefinitionName(user, projectCode, "test_pdf", 0);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Assertions.assertEquals(Status.PROCESS_DEFINITION_NAME_EXIST, processExistRes.get(Constants.STATUS)); } @Test public void testCheckProcessNodeList() { Map<String, Object> dataNotValidRes = processDefinitionService.checkProcessNodeList(null, null); Assertions.assertEquals(Status.DATA_IS_NOT_VALID, dataNotValidRes.get(Constants.STATUS)); List<TaskDefinitionLog> taskDefinitionLogs = JSONUtils.toList(taskDefinitionJson, TaskDefinitionLog.class); Map<String, Object> taskEmptyRes = processDefinitionService.checkProcessNodeList(taskRelationJson, taskDefinitionLogs); Assertions.assertEquals(Status.PROCESS_DAG_IS_EMPTY, taskEmptyRes.get(Constants.STATUS)); } @Test public void testGetTaskNodeListByDefinitionCode() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, null)).thenReturn(result); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(null); Map<String, Object> processDefinitionNullRes = processDefinitionService.getTaskNodeListByDefinitionCode(user, projectCode, 46L); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, processDefinitionNullRes.get(Constants.STATUS)); ProcessDefinition processDefinition = getProcessDefinition(); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(processService.genDagData(Mockito.any())).thenReturn(new DagData(processDefinition, null, null)); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition); Map<String, Object> dataNotValidRes =
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
processDefinitionService.getTaskNodeListByDefinitionCode(user, projectCode, 46L); Assertions.assertEquals(Status.SUCCESS, dataNotValidRes.get(Constants.STATUS)); } @Test public void testGetTaskNodeListByDefinitionCodes() { Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, null)).thenReturn(result); String defineCodes = "46"; Set<Long> defineCodeSet = Lists.newArrayList(defineCodes.split(Constants.COMMA)).stream().map(Long::parseLong) .collect(Collectors.toSet()); Mockito.when(processDefinitionMapper.queryByCodes(defineCodeSet)).thenReturn(null); Map<String, Object> processNotExistRes = processDefinitionService.getNodeListMapByDefinitionCodes(user, projectCode, defineCodes); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, processNotExistRes.get(Constants.STATUS)); putMsg(result, Status.SUCCESS, projectCode); ProcessDefinition processDefinition = getProcessDefinition(); List<ProcessDefinition> processDefinitionList = new ArrayList<>(); processDefinitionList.add(processDefinition); Mockito.when(processDefinitionMapper.queryByCodes(defineCodeSet)).thenReturn(processDefinitionList); Mockito.when(processService.genDagData(Mockito.any())).thenReturn(new DagData(processDefinition, null, null)); Project project1 = getProject(projectCode); List<Project> projects = new ArrayList<>(); projects.add(project1); Mockito.when(projectMapper.queryProjectCreatedAndAuthorizedByUserId(user.getId())).thenReturn(projects); Map<String, Object> successRes =
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
processDefinitionService.getNodeListMapByDefinitionCodes(user, projectCode, defineCodes); Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS)); } @Test public void testQueryAllProcessDefinitionByProjectCode() { Map<String, Object> result = new HashMap<>(); Project project = getProject(projectCode); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_DEFINITION)) .thenReturn(result); ProcessDefinition processDefinition = getProcessDefinition(); List<ProcessDefinition> processDefinitionList = new ArrayList<>(); processDefinitionList.add(processDefinition); Mockito.when(processDefinitionMapper.queryAllDefinitionList(projectCode)).thenReturn(processDefinitionList); Map<String, Object> successRes = processDefinitionService.queryAllProcessDefinitionByProjectCode(user, projectCode); Assertions.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS)); } @Test public void testViewTree() { Project project1 = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectMapper.queryByCode(1)).thenReturn(project1); Mockito.when(projectService.checkProjectAndAuth(user, project1, projectCode, WORKFLOW_TREE_VIEW)) .thenReturn(result); ProcessDefinition processDefinition = getProcessDefinition(); Map<String, Object> processDefinitionNullRes =
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST, processDefinitionNullRes.get(Constants.STATUS)); putMsg(result, Status.SUCCESS, projectCode); Mockito.when(projectMapper.queryByCode(1)).thenReturn(project1); Mockito.when(projectService.checkProjectAndAuth(user, project1, 1, WORKFLOW_TREE_VIEW)).thenReturn(result); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition); Mockito.when(processService.genDagGraph(processDefinition)).thenReturn(new DAG<>()); Map<String, Object> taskNullRes = processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10); Assertions.assertEquals(Status.SUCCESS, taskNullRes.get(Constants.STATUS)); Map<String, Object> taskNotNuLLRes = processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10); Assertions.assertEquals(Status.SUCCESS, taskNotNuLLRes.get(Constants.STATUS)); } @Test public void testSubProcessViewTree() { ProcessDefinition processDefinition = getProcessDefinition(); Mockito.when(processDefinitionMapper.queryByCode(46L)).thenReturn(processDefinition); Project project1 = getProject(1); Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, Status.SUCCESS); Mockito.when(projectMapper.queryByCode(1)).thenReturn(project1); Mockito.when(projectService.checkProjectAndAuth(user, project1, 1, WORKFLOW_TREE_VIEW)).thenReturn(result); Mockito.when(processService.genDagGraph(processDefinition)).thenReturn(new DAG<>()); Mockito.when(processTaskRelationMapper.queryByProcessCode(projectCode, processDefinitionCode)) .thenReturn(getProcessTaskRelation()); Mockito.when(taskDefinitionLogDao.getTaskDefineLogList(any())).thenReturn(new ArrayList<>()); Map<String, Object> taskNotNuLLRes =
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
processDefinitionService.viewTree(user, processDefinition.getProjectCode(), 46, 10); Assertions.assertEquals(Status.SUCCESS, taskNotNuLLRes.get(Constants.STATUS)); } @Test public void testUpdateProcessDefinition() { Map<String, Object> result = new HashMap<>(); putMsg(result, Status.SUCCESS); Project project = getProject(projectCode); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_UPDATE)) .thenReturn(result); Mockito.when(projectService.hasProjectAndWritePerm(user, project, result)).thenReturn(true); try { processDefinitionService.updateProcessDefinition(user, projectCode, "test", 1, "", "", "", 0, "root", null, "", null, ProcessExecutionTypeEnum.PARALLEL); Assertions.fail(); } catch (ServiceException ex) { Assertions.assertEquals(Status.DATA_IS_NOT_VALID.getCode(), ex.getCode()); } } @Test public void testBatchExportProcessDefinitionByCodes() { processDefinitionService.batchExportProcessDefinitionByCodes(null, 1L, null, null); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); putMsg(result, Status.PROJECT_NOT_FOUND); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); processDefinitionService.batchExportProcessDefinitionByCodes(user, projectCode, "1", null); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setId(1);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project); HttpServletResponse response = Mockito.mock(HttpServletResponse.class); DagData dagData = new DagData(getProcessDefinition(), null, null); Mockito.when(processService.genDagData(Mockito.any())).thenReturn(dagData); processDefinitionService.batchExportProcessDefinitionByCodes(user, projectCode, "1", response); Assertions.assertNotNull(processDefinitionService.exportProcessDagData(processDefinition)); } @Test public void testImportSqlProcessDefinition() throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ZipOutputStream outputStream = new ZipOutputStream(byteArrayOutputStream); outputStream.putNextEntry(new ZipEntry("import_sql/")); outputStream.putNextEntry(new ZipEntry("import_sql/a.sql")); outputStream.write( "-- upstream: start_auto_dag\n-- datasource: mysql_1\nselect 1;".getBytes(StandardCharsets.UTF_8)); outputStream.putNextEntry(new ZipEntry("import_sql/b.sql")); outputStream .write("-- name: start_auto_dag\n-- datasource: mysql_1\nselect 1;".getBytes(StandardCharsets.UTF_8)); outputStream.close(); MockMultipartFile mockMultipartFile = new MockMultipartFile("import_sql.zip", byteArrayOutputStream.toByteArray()); DataSource dataSource = Mockito.mock(DataSource.class); Mockito.when(dataSource.getId()).thenReturn(1); Mockito.when(dataSource.getType()).thenReturn(DbType.MYSQL); Mockito.when(dataSourceMapper.queryDataSourceByNameAndUserId(user.getId(), "mysql_1")).thenReturn(dataSource); Project project = getProject(projectCode); Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, Status.SUCCESS); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode)); Mockito.when(projectService.checkProjectAndAuth(user, project, projectCode, WORKFLOW_IMPORT))
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
.thenReturn(result); Mockito.when(processService.saveTaskDefine(Mockito.same(user), Mockito.eq(projectCode), Mockito.notNull(), Mockito.anyBoolean())).thenReturn(2); Mockito.when(processService.saveProcessDefine(Mockito.same(user), Mockito.notNull(), Mockito.notNull(), Mockito.anyBoolean())).thenReturn(1); Mockito.when( processService.saveTaskRelation(Mockito.same(user), Mockito.eq(projectCode), Mockito.anyLong(), Mockito.eq(1), Mockito.notNull(), Mockito.notNull(), Mockito.anyBoolean())) .thenReturn(0); result = processDefinitionService.importSqlProcessDefinition(user, projectCode, mockMultipartFile); Assertions.assertEquals(result.get(Constants.STATUS), Status.SUCCESS); } @Test public void testGetNewProcessName() { String processName1 = "test_copy_" + DateUtils.getCurrentTimeStamp(); final String newName1 = processDefinitionService.getNewName(processName1, Constants.COPY_SUFFIX); Assertions.assertEquals(2, newName1.split(Constants.COPY_SUFFIX).length); String processName2 = "wf_copy_all_ods_data_to_d"; final String newName2 = processDefinitionService.getNewName(processName2, Constants.COPY_SUFFIX); Assertions.assertEquals(3, newName2.split(Constants.COPY_SUFFIX).length); String processName3 = "test_import_" + DateUtils.getCurrentTimeStamp(); final String newName3 = processDefinitionService.getNewName(processName3, Constants.IMPORT_SUFFIX); Assertions.assertEquals(2, newName3.split(Constants.IMPORT_SUFFIX).length); } @Test public void testCreateProcessDefinitionV2() { Project project = this.getProject(projectCode); WorkflowCreateRequest workflowCreateRequest = new WorkflowCreateRequest(); workflowCreateRequest.setName(name); workflowCreateRequest.setProjectCode(projectCode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest)); Assertions.assertEquals(Status.PROJECT_NOT_FOUND.getCode(), ((ServiceException) exception).getCode()); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project); Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM)).when(projectService) .checkProjectAndAuthThrowException(user, project, WORKFLOW_CREATE); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest)); Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(), ((ServiceException) exception).getCode()); workflowCreateRequest.setDescription(taskDefinitionJson); Mockito.doThrow(new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR)).when(projectService) .checkProjectAndAuthThrowException(user, project, WORKFLOW_CREATE); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest)); Assertions.assertEquals(Status.DESCRIPTION_TOO_LONG_ERROR.getCode(), ((ServiceException) exception).getCode()); workflowCreateRequest.setDescription(EMPTY_STRING); Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, project, WORKFLOW_CREATE); Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), name)) .thenReturn(this.getProcessDefinition()); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest)); Assertions.assertEquals(Status.PROCESS_DEFINITION_NAME_EXIST.getCode(), ((ServiceException) exception).getCode()); Mockito.when(processDefinitionMapper.verifyByDefineName(project.getCode(), name)).thenReturn(null);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest)); Assertions.assertEquals(Status.TENANT_NOT_EXIST.getCode(), ((ServiceException) exception).getCode()); workflowCreateRequest.setTenantCode(DEFAULT); workflowCreateRequest.setDescription(description); workflowCreateRequest.setTimeout(timeout); workflowCreateRequest.setReleaseState(releaseState); workflowCreateRequest.setWarningGroupId(warningGroupId); workflowCreateRequest.setExecutionType(executionType); Mockito.when(processDefinitionLogMapper.insert(Mockito.any())).thenReturn(1); Mockito.when(processDefinitionMapper.insert(Mockito.any())).thenReturn(1); ProcessDefinition processDefinition = processDefinitionService.createSingleProcessDefinition(user, workflowCreateRequest); Assertions.assertTrue(processDefinition.getCode() > 0L); Assertions.assertEquals(workflowCreateRequest.getName(), processDefinition.getName()); Assertions.assertEquals(workflowCreateRequest.getDescription(), processDefinition.getDescription()); Assertions.assertTrue(StringUtils.endsWithIgnoreCase(workflowCreateRequest.getReleaseState(), processDefinition.getReleaseState().getDescp())); Assertions.assertEquals(workflowCreateRequest.getTimeout(), processDefinition.getTimeout()); Assertions.assertTrue(StringUtils.endsWithIgnoreCase(workflowCreateRequest.getExecutionType(), processDefinition.getExecutionType().getDescp())); } @Test public void testFilterProcessDefinition() { Project project = this.getProject(projectCode); WorkflowFilterRequest workflowFilterRequest = new WorkflowFilterRequest(); workflowFilterRequest.setProjectName(project.getName()); Mockito.when(projectMapper.queryByName(project.getName())).thenReturn(project);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM, user.getUserName(), projectCode)) .when(projectService).checkProjectAndAuthThrowException(user, project, WORKFLOW_DEFINITION); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.filterProcessDefinition(user, workflowFilterRequest)); Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(), ((ServiceException) exception).getCode()); } @Test public void testGetProcessDefinition() { exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.getProcessDefinition(user, processDefinitionCode)); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode()); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)) .thenReturn(this.getProcessDefinition()); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(this.getProject(projectCode)); Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM, user.getUserName(), projectCode)) .when(projectService) .checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_DEFINITION); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.getProcessDefinition(user, processDefinitionCode)); Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(), ((ServiceException) exception).getCode()); Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_DEFINITION); ProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(user, processDefinitionCode); Assertions.assertEquals(this.getProcessDefinition(), processDefinition);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
} @Test public void testUpdateProcessDefinitionV2() { ProcessDefinition processDefinition; WorkflowUpdateRequest workflowUpdateRequest = new WorkflowUpdateRequest(); workflowUpdateRequest.setName(name); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.getProcessDefinition(user, processDefinitionCode)); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_EXIST.getCode(), ((ServiceException) exception).getCode()); processDefinition = this.getProcessDefinition(); processDefinition.setReleaseState(ReleaseState.ONLINE); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService .updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest)); Assertions.assertEquals(Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT.getCode(), ((ServiceException) exception).getCode()); processDefinition = this.getProcessDefinition(); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition); Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(this.getProject(projectCode)); Mockito.doThrow(new ServiceException(Status.USER_NO_OPERATION_PROJECT_PERM, user.getUserName(), projectCode)) .when(projectService) .checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_DEFINITION); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService.getProcessDefinition(user, processDefinitionCode)); Assertions.assertEquals(Status.USER_NO_OPERATION_PROJECT_PERM.getCode(), ((ServiceException) exception).getCode());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
workflowUpdateRequest.setDescription(taskDefinitionJson); Mockito.doThrow(new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR)).when(projectService) .checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_UPDATE); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService .updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest)); Assertions.assertEquals(Status.DESCRIPTION_TOO_LONG_ERROR.getCode(), ((ServiceException) exception).getCode()); workflowUpdateRequest.setDescription(EMPTY_STRING); Mockito.doNothing().when(projectService).checkProjectAndAuthThrowException(user, this.getProject(projectCode), WORKFLOW_UPDATE); Mockito.when(processDefinitionMapper.verifyByDefineName(projectCode, workflowUpdateRequest.getName())) .thenReturn(this.getProcessDefinition()); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService .updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest)); Assertions.assertEquals(Status.PROCESS_DEFINITION_NAME_EXIST.getCode(), ((ServiceException) exception).getCode()); processDefinition = this.getProcessDefinition(); workflowUpdateRequest.setTenantCode(tenantCode); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition); Mockito.when(processDefinitionMapper.verifyByDefineName(projectCode, workflowUpdateRequest.getName())) .thenReturn(null); Mockito.when(tenantMapper.queryByTenantCode(workflowUpdateRequest.getTenantCode())).thenReturn(null); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService .updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest)); Assertions.assertEquals(Status.TENANT_NOT_EXIST.getCode(), ((ServiceException) exception).getCode()); workflowUpdateRequest.setTenantCode(null); workflowUpdateRequest.setName(name); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
Mockito.when(processDefinitionLogMapper.insert(Mockito.any())).thenReturn(1); exception = Assertions.assertThrows(ServiceException.class, () -> processDefinitionService .updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest)); Assertions.assertEquals(Status.UPDATE_PROCESS_DEFINITION_ERROR.getCode(), ((ServiceException) exception).getCode()); Mockito.when(processDefinitionMapper.updateById(isA(ProcessDefinition.class))).thenReturn(1); ProcessDefinition processDefinitionUpdate = processDefinitionService.updateSingleProcessDefinition(user, processDefinitionCode, workflowUpdateRequest); Assertions.assertEquals(processDefinition, processDefinitionUpdate); } /** * get mock processDefinition * * @return ProcessDefinition */ private ProcessDefinition getProcessDefinition() { ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setId(46); processDefinition.setProjectCode(1L); processDefinition.setName("test_pdf"); processDefinition.setTenantId(1); processDefinition.setDescription(""); processDefinition.setCode(processDefinitionCode); processDefinition.setProjectCode(projectCode); processDefinition.setVersion(1); return processDefinition; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
* get mock Project * * @param projectCode projectCode * @return Project */ private Project getProject(long projectCode) { Project project = new Project(); project.setCode(projectCode); project.setId(1); project.setName("test"); project.setUserId(1); return project; } private List<ProcessTaskRelation> getProcessTaskRelation() { List<ProcessTaskRelation> processTaskRelations = new ArrayList<>(); ProcessTaskRelation processTaskRelation = new ProcessTaskRelation(); processTaskRelation.setProjectCode(projectCode); processTaskRelation.setProcessDefinitionCode(46L); processTaskRelation.setProcessDefinitionVersion(1); processTaskRelations.add(processTaskRelation); return processTaskRelations; } /** * get mock schedule * * @return schedule */ private Schedule getSchedule() { Date date = new Date(); Schedule schedule = new Schedule();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,604
[Improvement][UI] When viewing a workflow definition support to view its all variables.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Currently The page of a workflow instance support view its all variables on the toolbar of its DAG. But the page of a workflow definition doesn't support view its variables. This is really inconvenient. So It's indubitable to add the feature. The page of the workflow definition should be like this: <img width="1068" alt="image" src="https://user-images.githubusercontent.com/4928204/198817697-876a6b7a-cc1a-4025-b214-8973616e459b.png"> ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12604
https://github.com/apache/dolphinscheduler/pull/12609
064fec88b077513fccfea08105ede968f59096bc
d84f1ef2694d237e4d36604be77c6758a17c5cb4
2022-10-29T06:38:52Z
java
2022-10-30T12:31:40Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
schedule.setId(46); schedule.setProcessDefinitionCode(1); schedule.setStartTime(date); schedule.setEndTime(date); schedule.setCrontab("0 0 5 * * ? *"); schedule.setFailureStrategy(FailureStrategy.END); schedule.setUserId(1); schedule.setReleaseState(ReleaseState.OFFLINE); schedule.setProcessInstancePriority(Priority.MEDIUM); schedule.setWarningType(WarningType.NONE); schedule.setWarningGroupId(1); schedule.setWorkerGroup(Constants.DEFAULT_WORKER_GROUP); return schedule; } /** * get mock task main info * * @return schedule */ private List<TaskMainInfo> getTaskMainInfo() { List<TaskMainInfo> taskMainInfos = new ArrayList<>(); TaskMainInfo taskMainInfo = new TaskMainInfo(); taskMainInfo.setId(1); taskMainInfo.setProcessDefinitionName("process"); taskMainInfo.setTaskName("task"); taskMainInfos.add(taskMainInfo); return taskMainInfos; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/lifecycle/ServerLifeCycleManager.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.common.lifecycle; import lombok.experimental.UtilityClass; @UtilityClass
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/lifecycle/ServerLifeCycleManager.java
public class ServerLifeCycleManager { private static volatile ServerStatus serverStatus = ServerStatus.RUNNING; private static long serverStartupTime = System.currentTimeMillis(); public static long getServerStartupTime() { return serverStartupTime; } public static boolean isRunning() { return serverStatus == ServerStatus.RUNNING; } public static boolean isStopped() { return serverStatus == ServerStatus.STOPPED; } public static ServerStatus getServerStatus() { return serverStatus; } /** * Change the current server state to {@link ServerStatus#WAITING}, only {@link ServerStatus#RUNNING} can change to {@link ServerStatus#WAITING}. * * @throws ServerLifeCycleException if change failed. */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/lifecycle/ServerLifeCycleManager.java
public static synchronized void toWaiting() throws ServerLifeCycleException { if (isStopped()) { throw new ServerLifeCycleException("The current server is already stopped, cannot change to waiting"); } if (serverStatus != ServerStatus.RUNNING) { throw new ServerLifeCycleException("The current server is not at running status, cannot change to waiting"); } serverStatus = ServerStatus.WAITING; } /** * Recover from {@link ServerStatus#WAITING} to {@link ServerStatus#RUNNING}. * * @throws ServerLifeCycleException if change failed */ public static synchronized void recoverFromWaiting() throws ServerLifeCycleException { if (serverStatus != ServerStatus.WAITING) { throw new ServerLifeCycleException("The current server status is not waiting, cannot recover form waiting"); } serverStartupTime = System.currentTimeMillis(); serverStatus = ServerStatus.RUNNING; } public static synchronized boolean toStopped() { if (serverStatus == ServerStatus.STOPPED) { return false; } serverStatus = ServerStatus.STOPPED; return true; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterWaitingStrategy.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterWaitingStrategy.java
* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.registry; import org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException; import org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager; import org.apache.dolphinscheduler.common.lifecycle.ServerStatus; import org.apache.dolphinscheduler.registry.api.Registry; import org.apache.dolphinscheduler.registry.api.RegistryException; import org.apache.dolphinscheduler.registry.api.StrategyType; import org.apache.dolphinscheduler.server.master.cache.ProcessInstanceExecCacheManager; import org.apache.dolphinscheduler.server.master.config.MasterConfig; import org.apache.dolphinscheduler.server.master.event.WorkflowEventQueue; import org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer; import org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread; import org.apache.dolphinscheduler.service.registry.RegistryClient; import java.time.Duration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Service; /** * This strategy will change the server status to {@link ServerStatus#WAITING} when disconnect from {@link Registry}. */ @Service
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterWaitingStrategy.java
@ConditionalOnProperty(prefix = "master.registry-disconnect-strategy", name = "strategy", havingValue = "waiting") public class MasterWaitingStrategy implements MasterConnectStrategy { private final Logger logger = LoggerFactory.getLogger(MasterWaitingStrategy.class); @Autowired private MasterConfig masterConfig; @Autowired private RegistryClient registryClient; @Autowired private MasterRPCServer masterRPCServer; @Autowired private WorkflowEventQueue workflowEventQueue; @Autowired private ProcessInstanceExecCacheManager processInstanceExecCacheManager; @Autowired private StateWheelExecuteThread stateWheelExecuteThread; @Override public void disconnect() { try { ServerLifeCycleManager.toWaiting(); clearMasterResource(); Duration maxWaitingTime = masterConfig.getRegistryDisconnectStrategy().getMaxWaitingTime(); try { logger.info("Master disconnect from registry will try to reconnect in {} s",
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterWaitingStrategy.java
maxWaitingTime.getSeconds()); registryClient.connectUntilTimeout(maxWaitingTime); } catch (RegistryException ex) { throw new ServerLifeCycleException( String.format("Waiting to reconnect to registry in %s failed", maxWaitingTime), ex); } } catch (ServerLifeCycleException e) { String errorMessage = String.format( "Disconnect from registry and change the current status to waiting error, the current server state is %s, will stop the current server", ServerLifeCycleManager.getServerStatus()); logger.error(errorMessage, e); registryClient.getStoppable().stop(errorMessage); } catch (RegistryException ex) { String errorMessage = "Disconnect from registry and waiting to reconnect failed, will stop the server"; logger.error(errorMessage, ex); registryClient.getStoppable().stop(errorMessage); } catch (Exception ex) { String errorMessage = "Disconnect from registry and get an unknown exception, will stop the server"; logger.error(errorMessage, ex); registryClient.getStoppable().stop(errorMessage); } } @Override public void reconnect() { try { ServerLifeCycleManager.recoverFromWaiting(); reStartMasterResource(); logger.info("Recover from waiting success, the current server status is {}", ServerLifeCycleManager.getServerStatus());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,414
[Bug] [Master and Work] Master and worker crash
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened first, receive worker crash alert, and master crash. [crash.log](https://github.com/apache/dolphinscheduler/files/9806747/crash.log) [worker_crash_log.log](https://github.com/apache/dolphinscheduler/files/9807099/worker_crash_log.log) Here its the log ``` [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[129] - [WorkflowInstance-23201][TaskInstance-0] - Success remove workflow instance from timeout check list [INFO] 2022-10-18 05:07:40.516 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[136] - [WorkflowInstance-23201][TaskInstance-0] - Workflow instance is finished. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1171] - [WorkflowInstance-0][TaskInstance-0] - Opening socket connection to server dolphinscheduler/172.16.18.125:2181. [INFO] 2022-10-18 05:07:41.565 +0000 org.apache.zookeeper.ClientCnxn:[1173] - [WorkflowInstance-0][TaskInstance-0] - SASL config status: Will not attempt to authenticate using SASL (unknown error) [INFO] 2022-10-18 05:07:41.566 +0000 org.apache.zookeeper.ClientCnxn:[1005] - [WorkflowInstance-0][TaskInstance-0] - Socket connection established, initiating session, client: /172.16.18.125:50356, server: dolphinscheduler/172.16.18.125:2181 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.zookeeper.ClientCnxn:[1444] - [WorkflowInstance-0][TaskInstance-0] - Session establishment complete on server dolphinscheduler/172.16.18.125:2181, session id = 0x10001031c9e005d, negotiated timeout = 40000 [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: RECONNECTED [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskInstance-0] - Registry reconnected [INFO] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener:[47] - [WorkflowInstance-0][TaskInstance-0] - Master received a RECONNECTED event from registry, the current server state is RUNNING [ERROR] 2022-10-18 05:07:41.568 +0000 org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy:[106] - [WorkflowInstance-0][TaskInstance-0] - Recover from waiting failed, the current server status is RUNNING, will stop the server org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException: The current server status is not waiting, cannot recover form waiting at org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager.recoverFromWaiting(ServerLifeCycleManager.java:68) at org.apache.dolphinscheduler.server.master.registry.MasterWaitingStrategy.reconnect(MasterWaitingStrategy.java:97) at org.apache.dolphinscheduler.server.master.registry.MasterConnectionStateListener.onUpdate(MasterConnectionStateListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener.stateChanged(ZookeeperConnectionStateListener.java:49) at org.apache.curator.framework.state.ConnectionStateManager.lambda$processEvents$0(ConnectionStateManager.java:281) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.state.ConnectionStateManager.processEvents(ConnectionStateManager.java:281) at org.apache.curator.framework.state.ConnectionStateManager.access$000(ConnectionStateManager.java:43) at org.apache.curator.framework.state.ConnectionStateManager$1.call(ConnectionStateManager.java:134) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:41.569 +0000 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received: {} [INFO] 2022-10-18 05:07:41.574 +0000 org.apache.dolphinscheduler.server.master.task.MasterHeartBeatTask:[70] - [WorkflowInstance-0][TaskInstance-0] - Success write master heartBeatInfo into registry, masterRegistryPath: /nodes/master/172.16.18.125:5678, heartBeatInfo: {"startupTime":1666066687942,"reportTime":1666069617347,"cpuUsage":0.0,"memoryUsage":0.33,"loadAverage":0.0,"availablePhysicalMemorySize":10.51,"maxCpuloadAvg":8.0,"reservedMemory":0.3,"diskAvailable":421.28,"processId":640966} [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener:[81] - [WorkflowInstance-0][TaskInstance-0] - worker node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.554 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[127] - [WorkflowInstance-0][TaskInstance-0] - WORKER node deleted : /nodes/worker/default/172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[137] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/worker/default/172.16.18.127:1234 not exists [INFO] 2022-10-18 05:07:42.558 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[58] - [WorkflowInstance-0][TaskInstance-0] - Worker failover staring, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[97] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover starting [INFO] 2022-10-18 05:07:42.559 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[272] - [WorkflowInstance-0][TaskInstance-0] - worker group node : /nodes/worker/default/172.16.18.127:1234 down. [INFO] 2022-10-18 05:07:42.565 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[109] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover there are 4 taskInstance may need to failover, will do a deep check, taskInstanceIds: [24542, 24541, 24540, 24537] [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23200][TaskInstance-24542] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.567 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23200][TaskInstance-24542] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.568 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23200][TaskInstance-24542] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23200, taskInstanceId=24542, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23200][TaskInstance-24542] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23202][TaskInstance-24541] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.569 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23202][TaskInstance-24541] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23202][TaskInstance-24541] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23202, taskInstanceId=24541, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23202][TaskInstance-24541] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23204][TaskInstance-24540] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.570 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23204][TaskInstance-24540] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23204][TaskInstance-24540] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23204, taskInstanceId=24540, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23204][TaskInstance-24540] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[131] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: begin to failover taskInstance, will set the status to NEED_FAULT_TOLERANCE [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[165] - [WorkflowInstance-23199][TaskInstance-24537] - The failover taskInstance is not master task [INFO] 2022-10-18 05:07:42.571 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[174] - [WorkflowInstance-23199][TaskInstance-24537] - TaskInstance failover begin kill the task related yarn job [INFO] 2022-10-18 05:07:43.573 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[206] - [WorkflowInstance-23199][TaskInstance-24537] - Begin to get appIds from worker: 172.16.18.127:1234 taskLogPath: /tmp/dolphinscheduler/worker-server/logs/20221018/7185584338369_7-23199-24537.log [WARN] 2022-10-18 05:07:43.583 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[369] - [WorkflowInstance-23199][TaskInstance-24537] - connect to Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} error io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /172.16.18.127:1234 Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.remote.NettyRemotingClient:[390] - [WorkflowInstance-23199][TaskInstance-24537] - netty client closed [INFO] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.service.log.LogClientService:[81] - [WorkflowInstance-23199][TaskInstance-24537] - logger client closed [ERROR] 2022-10-18 05:07:43.588 +0000 org.apache.dolphinscheduler.server.utils.ProcessUtils:[216] - [WorkflowInstance-23199][TaskInstance-24537] - Kill yarn job failure, taskInstanceId: 24537 org.apache.dolphinscheduler.remote.exceptions.RemotingException: connect to : Host{address='172.16.18.127:1234', ip='172.16.18.127', port=1234} fail at org.apache.dolphinscheduler.remote.NettyRemotingClient.sendSync(NettyRemotingClient.java:258) at org.apache.dolphinscheduler.service.log.LogClientService.getAppIds(LogClientService.java:214) at org.apache.dolphinscheduler.server.utils.ProcessUtils.killYarnJob(ProcessUtils.java:198) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverTaskInstance(WorkerFailoverService.java:175) at org.apache.dolphinscheduler.server.master.service.WorkerFailoverService.failoverWorker(WorkerFailoverService.java:134) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:59) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeWorkerNodePath(MasterRegistryClient.java:142) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleWorkerEvent(MasterRegistryDataListener.java:82) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:55) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] - [WorkflowInstance-23199][TaskInstance-24537] - Submit state event success, stateEvent: TaskStateEvent(processInstanceId=23199, taskInstanceId=24537, taskCode=0, status=TaskExecutionStatus{code=8, desc='need fault tolerance'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null) [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[135] - [WorkflowInstance-23199][TaskInstance-24537] - Worker[172.16.18.127:1234] failover: Finish failover taskInstance [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.WorkerFailoverService:[143] - [WorkflowInstance-0][TaskInstance-0] - Worker[172.16.18.127:1234] failover finished, useTime:1031ms [INFO] 2022-10-18 05:07:43.590 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[60] - [WorkflowInstance-0][TaskInstance-0] - Worker failover finished, workerServer: 172.16.18.127:1234 [INFO] 2022-10-18 05:07:44.569 +0000 org.apache.dolphinscheduler.server.master.MasterServer:[135] - [WorkflowInstance-0][TaskInstance-0] - Master server is stopping, current cause : Recover from waiting failed, the current server status is RUNNING, will stop the server [INFO] 2022-10-18 05:07:44.573 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.AbstractConnector:[383] - [WorkflowInstance-0][TaskInstance-0] - Stopped ServerConnector@e07b4db{HTTP/1.1, (http/1.1)}{0.0.0.0:5679} [INFO] 2022-10-18 05:07:44.581 +0000 org.eclipse.jetty.server.session:[149] - [WorkflowInstance-0][TaskInstance-0] - node0 Stopped scavenging [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler.application:[2368] - [WorkflowInstance-0][TaskInstance-0] - Destroying Spring FrameworkServlet 'dispatcherServlet' [INFO] 2022-10-18 05:07:44.583 +0000 org.eclipse.jetty.server.handler.ContextHandler:[1159] - [WorkflowInstance-0][TaskInstance-0] - Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37f71c05{application,/,[file:///tmp/jetty-docbase.5679.2442912892556208592/],STOPPED} [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[666] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutting down. [INFO] 2022-10-18 05:07:44.588 +0000 org.quartz.core.QuartzScheduler:[585] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 paused. [INFO] 2022-10-18 05:07:44.590 +0000 org.quartz.core.QuartzScheduler:[740] - [WorkflowInstance-0][TaskInstance-0] - Scheduler DolphinScheduler_$_geneseeq1666066688472 shutdown complete. [INFO] 2022-10-18 05:07:44.590 +0000 org.springframework.scheduling.quartz.SchedulerFactoryBean:[847] - [WorkflowInstance-0][TaskInstance-0] - Shutting down Quartz Scheduler [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[126] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopping... [INFO] 2022-10-18 05:07:44.591 +0000 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap:[127] - [WorkflowInstance-0][TaskInstance-0] - Master schedule bootstrap stopped... [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[93] - [WorkflowInstance-0][TaskInstance-0] - MASTER node deleted : /nodes/master/172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[301] - [WorkflowInstance-0][TaskInstance-0] - master node : /nodes/master/172.16.18.125:5678 down. [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[108] - [WorkflowInstance-0][TaskInstance-0] - path: /nodes/master/172.16.18.125:5678 not exists [INFO] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.server.master.service.FailoverService:[53] - [WorkflowInstance-0][TaskInstance-0] - Master failover starting, masterServer: 172.16.18.125:5678 [INFO] 2022-10-18 05:07:44.592 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[176] - [WorkflowInstance-0][TaskInstance-0] - Master node : 172.16.18.125:5678 unRegistry to register center. [WARN] 2022-10-18 05:07:44.593 +0000 org.apache.dolphinscheduler.common.model.BaseHeartBeatTask:[69] - [WorkflowInstance-0][TaskInstance-0] - MasterHeartBeatTask task finished [INFO] 2022-10-18 05:07:44.600 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[998] - [WorkflowInstance-0][TaskInstance-0] - backgroundOperationsLoop exiting [WARN] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[346] - [WorkflowInstance-0][TaskInstance-0] - current addr:172.16.18.125:5678 is not in active master list [INFO] 2022-10-18 05:07:44.601 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[349] - [WorkflowInstance-0][TaskInstance-0] - update master nodes, master size: 0, slot: 0, addr: 172.16.18.125:5678 [ERROR] 2022-10-18 05:07:44.604 +0000 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exception was not retry-able or retry gave up java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.performBackgroundOperation(FindAndDeleteProtectedNodeInBackground.java:108) at org.apache.curator.framework.imps.OperationAndData.callPerformBackgroundOperation(OperationAndData.java:84) at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:1008) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:667) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.FindAndDeleteProtectedNodeInBackground.execute(FindAndDeleteProtectedNodeInBackground.java:60) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:617) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [ERROR] 2022-10-18 05:07:44.605 +0000 org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[306] - [WorkflowInstance-0][TaskInstance-0] - MasterNodeListener capture data change and get data failed. org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:246) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.updateMasterNodes(ServerNodeManager.java:325) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager.access$900(ServerNodeManager.java:71) at org.apache.dolphinscheduler.server.master.registry.ServerNodeManager$MasterDataListener.notify(ServerNodeManager.java:302) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Expected state [STARTED] was [STOPPED] at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:823) at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkState(CuratorFrameworkImpl.java:457) at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:477) at org.apache.curator.framework.recipes.locks.LockInternals.deleteOurPath(LockInternals.java:347) at org.apache.curator.framework.recipes.locks.LockInternals.releaseLock(LockInternals.java:124) at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:154) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:240) ... 17 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.service.MasterFailoverService:[115] - [WorkflowInstance-0][TaskInstance-0] - Master server failover failed, host:172.16.18.125:5678 org.apache.dolphinscheduler.registry.api.RegistryException: zookeeper release lock error at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:229) at org.apache.dolphinscheduler.service.registry.RegistryClient.getLock(RegistryClient.java:217) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:112) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalStateException: Client is not started at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:507) at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:139) at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:649) at org.apache.curator.framework.imps.WatcherRemovalFacade.getZooKeeper(WatcherRemovalFacade.java:146) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1223) at org.apache.curator.framework.imps.CreateBuilderImpl$18.call(CreateBuilderImpl.java:1193) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:1190) at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:605) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:595) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:573) at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:48) at org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver.createsTheLock(StandardLockInternalsDriver.java:54) at org.apache.curator.framework.recipes.locks.LockInternals.attemptLock(LockInternals.java:225) at org.apache.curator.framework.recipes.locks.InterProcessMutex.internalLock(InterProcessMutex.java:237) at org.apache.curator.framework.recipes.locks.InterProcessMutex.acquire(InterProcessMutex.java:89) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.acquireLock(ZookeeperRegistry.java:218) ... 29 common frames omitted [ERROR] 2022-10-18 05:07:44.606 +0000 org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient:[115] - [WorkflowInstance-0][TaskInstance-0] - MASTER server failover failed, host:172.16.18.125:5678 java.lang.NullPointerException: null at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.releaseLock(ZookeeperRegistry.java:236) at org.apache.dolphinscheduler.service.registry.RegistryClient.releaseLock(RegistryClient.java:221) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService.failoverMaster(MasterFailoverService.java:117) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$FastClassBySpringCGLIB$$479c980c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.server.master.service.MasterFailoverService$$EnhancerBySpringCGLIB$$f5fc50f2.failoverMaster(<generated>) at org.apache.dolphinscheduler.server.master.service.FailoverService.failoverServerWhenDown(FailoverService.java:54) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryClient.removeMasterNodePath(MasterRegistryClient.java:112) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.handleMasterEvent(MasterRegistryDataListener.java:66) at org.apache.dolphinscheduler.server.master.registry.MasterRegistryDataListener.notify(MasterRegistryDataListener.java:52) at org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperRegistry.lambda$subscribe$1(ZookeeperRegistry.java:142) at org.apache.curator.framework.recipes.cache.TreeCache.lambda$callListeners$1(TreeCache.java:811) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:807) at org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:79) at org.apache.curator.framework.recipes.cache.TreeCache$2.run(TreeCache.java:909) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ClientCnxn:[568] - [WorkflowInstance-0][TaskInstance-0] - EventThread shut down for session: 0x10001031c9e005d [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.zookeeper.ZooKeeper:[1232] - [WorkflowInstance-0][TaskInstance-0] - Session: 0x10001031c9e005d closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[114] - [WorkflowInstance-0][TaskInstance-0] - Closing Master RPC Server... [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.remote.NettyRemotingServer:[212] - [WorkflowInstance-0][TaskInstance-0] - netty server closed [INFO] 2022-10-18 05:07:44.708 +0000 org.apache.dolphinscheduler.server.master.rpc.MasterRPCServer:[116] - [WorkflowInstance-0][TaskInstance-0] - Closed Master RPC Server... [WARN] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[123] - [WorkflowInstance-0][TaskInstance-0] - State event loop service interrupted, will stop this loop java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService$StateEventResponseWorker.run(StateEventResponseService.java:118) [INFO] 2022-10-18 05:07:44.709 +0000 org.apache.dolphinscheduler.server.master.processor.queue.StateEventResponseService:[130] - [WorkflowInstance-0][TaskInstance-0] - State event loop service stopped [INFO] 2022-10-18 05:07:44.711 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskEventService:[125] - [WorkflowInstance-0][TaskInstance-0] - StateEventResponseWorker stopped [INFO] 2022-10-18 05:07:44.745 +0000 com.zaxxer.hikari.HikariDataSource:[350] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown initiated... [INFO] 2022-10-18 05:07:44.750 +0000 com.zaxxer.hikari.HikariDataSource:[352] - [WorkflowInstance-0][TaskInstance-0] - DolphinScheduler - Shutdown completed. ``` ### What you expected to happen master and worker works fine ### How to reproduce please refer to the log ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12414
https://github.com/apache/dolphinscheduler/pull/12651
3ff328c9618038715d59c80ad3dbcaa5fc912e00
9e0c9af1a5070b6a55750737aff2026233b26952
2022-10-18T05:27:31Z
java
2022-11-02T06:06:01Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterWaitingStrategy.java
} catch (Exception e) { String errorMessage = String.format("Recover from waiting failed, the current server status is %s, will stop the server", ServerLifeCycleManager.getServerStatus()); logger.error(errorMessage, e); registryClient.getStoppable().stop(errorMessage); } } @Override public StrategyType getStrategyType() { return StrategyType.WAITING; } private void clearMasterResource() { masterRPCServer.close(); logger.warn("Master closed RPC server due to lost registry connection"); workflowEventQueue.clearWorkflowEventQueue(); logger.warn("Master clear workflow event queue due to lost registry connection"); processInstanceExecCacheManager.clearCache(); logger.warn("Master clear process instance cache due to lost registry connection"); stateWheelExecuteThread.clearAllTasks(); logger.warn("Master clear all state wheel task due to lost registry connection"); } private void reStartMasterResource() { masterRPCServer.start(); logger.warn("Master restarted RPC server due to reconnect to registry"); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
* the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.permission; import static java.util.stream.Collectors.toSet; import org.apache.dolphinscheduler.common.enums.AuthorizationType; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.dao.entity.AccessToken; import org.apache.dolphinscheduler.dao.entity.AlertGroup; import org.apache.dolphinscheduler.dao.entity.DataSource; import org.apache.dolphinscheduler.dao.entity.Environment; import org.apache.dolphinscheduler.dao.entity.K8sNamespace; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Queue; import org.apache.dolphinscheduler.dao.entity.Resource; import org.apache.dolphinscheduler.dao.entity.TaskGroup; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.UdfFunc; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.entity.WorkerGroup; import org.apache.dolphinscheduler.dao.mapper.AccessTokenMapper; import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper; import org.apache.dolphinscheduler.dao.mapper.AlertPluginInstanceMapper;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper; import org.apache.dolphinscheduler.dao.mapper.EnvironmentMapper; import org.apache.dolphinscheduler.dao.mapper.K8sNamespaceMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.QueueMapper; import org.apache.dolphinscheduler.dao.mapper.ResourceMapper; import org.apache.dolphinscheduler.dao.mapper.ResourceUserMapper; import org.apache.dolphinscheduler.dao.mapper.TaskGroupMapper; import org.apache.dolphinscheduler.dao.mapper.TenantMapper; import org.apache.dolphinscheduler.dao.mapper.UdfFuncMapper; import org.apache.dolphinscheduler.dao.mapper.WorkerGroupMapper; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.commons.collections.CollectionUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import org.slf4j.Logger; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public class ResourcePermissionCheckServiceImpl implements ResourcePermissionCheckService<Object>, ApplicationContextAware { @Autowired private ProcessService processService; public static final Map<AuthorizationType, ResourceAcquisitionAndPermissionCheck<?>> RESOURCE_LIST_MAP = new ConcurrentHashMap<>(); @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { for (ResourceAcquisitionAndPermissionCheck<?> authorizedResourceList : applicationContext .getBeansOfType(ResourceAcquisitionAndPermissionCheck.class).values()) { List<AuthorizationType> authorizationTypes = authorizedResourceList.authorizationTypes(); authorizationTypes.forEach(auth -> RESOURCE_LIST_MAP.put(auth, authorizedResourceList)); } } @Override public boolean resourcePermissionCheck(Object authorizationType, Object[] needChecks, Integer userId, Logger logger) { if (Objects.nonNull(needChecks) && needChecks.length > 0) { Set<?> originResSet = new HashSet<>(Arrays.asList(needChecks)); Set<?> ownResSets = RESOURCE_LIST_MAP.get(authorizationType).listAuthorizedResource(userId, logger); originResSet.removeAll(ownResSets); if (CollectionUtils.isNotEmpty(originResSet)) logger.warn("User does not have resource permission on associated resources, userId:{}", userId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
return CollectionUtils.isEmpty(originResSet); } return true; } @Override public boolean operationPermissionCheck(Object authorizationType, Integer userId, String permissionKey, Logger logger) { User user = processService.getUserById(userId); if (user == null) { logger.error("User does not exist, userId:{}.", userId); return false; } if (user.getUserType().equals(UserType.ADMIN_USER)) { return true; } return RESOURCE_LIST_MAP.get(authorizationType).permissionCheck(userId, permissionKey, logger); } @Override public boolean functionDisabled() { return false; } @Override public void postHandle(Object authorizationType, Integer userId, List<Integer> ids, Logger logger) { logger.debug("no post handle"); } @Override public Set<Object> userOwnedResourceIdsAcquisition(Object authorizationType, Integer userId, Logger logger) { User user = processService.getUserById(userId); if (user == null) { logger.error("User does not exist, userId:{}.", userId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
return Collections.emptySet(); } return (Set<Object>) RESOURCE_LIST_MAP.get(authorizationType).listAuthorizedResource( user.getUserType().equals(UserType.ADMIN_USER) ? 0 : userId, logger); } @Component public static class QueueResourcePermissionCheck implements ResourceAcquisitionAndPermissionCheck<Integer> { private final QueueMapper queueMapper; public QueueResourcePermissionCheck(QueueMapper queueMapper) { this.queueMapper = queueMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.QUEUE); } @Override public boolean permissionCheck(int userId, String permissionKey, Logger logger) { return false; } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { if (userId != 0) { return Collections.emptySet(); } List<Queue> queues = queueMapper.selectList(null); return queues.stream().map(Queue::getId).collect(toSet()); } } @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public static class ProjectsResourcePermissionCheck implements ResourceAcquisitionAndPermissionCheck<Integer> { private final ProjectMapper projectMapper; public ProjectsResourcePermissionCheck(ProjectMapper projectMapper) { this.projectMapper = projectMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.PROJECTS); } @Override public boolean permissionCheck(int userId, String permissionKey, Logger logger) { return true; } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { return projectMapper.listAuthorizedProjects(userId, null).stream().map(Project::getId).collect(toSet()); } } @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public static class FilePermissionCheck implements ResourceAcquisitionAndPermissionCheck<Integer> { private final ResourceMapper resourceMapper; private final ResourceUserMapper resourceUserMapper; public FilePermissionCheck(ResourceMapper resourceMapper, ResourceUserMapper resourceUserMapper) { this.resourceMapper = resourceMapper; this.resourceUserMapper = resourceUserMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Arrays.asList(AuthorizationType.RESOURCE_FILE_ID, AuthorizationType.UDF_FILE); } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { List<Resource> relationResources; if (userId == 0) { relationResources = new ArrayList<>(); } else { List<Integer> resIds = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(userId, 0); relationResources = CollectionUtils.isEmpty(resIds) ? new ArrayList<>() : resourceMapper.queryResourceListById(resIds); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
List<Resource> ownResourceList = resourceMapper.queryResourceListAuthored(userId, -1); relationResources.addAll(ownResourceList); return relationResources.stream().map(Resource::getId).collect(toSet()); } @Override public boolean permissionCheck(int userId, String permissionKey, Logger logger) { return true; } } @Component public static class UdfFuncPermissionCheck implements ResourceAcquisitionAndPermissionCheck<Integer> { private final UdfFuncMapper udfFuncMapper; public UdfFuncPermissionCheck(UdfFuncMapper udfFuncMapper) { this.udfFuncMapper = udfFuncMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.UDF); } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { List<UdfFunc> udfFuncList = udfFuncMapper.listAuthorizedUdfByUserId(userId); return udfFuncList.stream().map(UdfFunc::getId).collect(toSet()); } @Override public boolean permissionCheck(int userId, String permissionKey, Logger logger) { return true; } } @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public static class TaskGroupPermissionCheck implements ResourceAcquisitionAndPermissionCheck<Integer> { private final TaskGroupMapper taskGroupMapper; public TaskGroupPermissionCheck(TaskGroupMapper taskGroupMapper) { this.taskGroupMapper = taskGroupMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.TASK_GROUP); } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { List<TaskGroup> taskGroupList = taskGroupMapper.listAuthorizedResource(userId); return taskGroupList.stream().map(TaskGroup::getId).collect(Collectors.toSet()); } @Override public boolean permissionCheck(int userId, String permissionKey, Logger logger) { return true; } } @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public static class K8sNamespaceResourceList implements ResourceAcquisitionAndPermissionCheck<Integer> { private final K8sNamespaceMapper k8sNamespaceMapper; public K8sNamespaceResourceList(K8sNamespaceMapper k8sNamespaceMapper) { this.k8sNamespaceMapper = k8sNamespaceMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.K8S_NAMESPACE); } @Override public boolean permissionCheck(int userId, String url, Logger logger) { return false; } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { List<K8sNamespace> k8sNamespaces = k8sNamespaceMapper.queryAuthedNamespaceListByUserId(userId); return k8sNamespaces.stream().map(K8sNamespace::getId).collect(Collectors.toSet()); } } @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public static class EnvironmentResourceList implements ResourceAcquisitionAndPermissionCheck<Integer> { private final EnvironmentMapper environmentMapper; public EnvironmentResourceList(EnvironmentMapper environmentMapper) { this.environmentMapper = environmentMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.ENVIRONMENT); } @Override public boolean permissionCheck(int userId, String url, Logger logger) { return true; } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { List<Environment> environments = environmentMapper.queryAllEnvironmentList(); return environments.stream().map(Environment::getId).collect(Collectors.toSet()); } } @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public static class WorkerGroupResourceList implements ResourceAcquisitionAndPermissionCheck<Integer> { private final WorkerGroupMapper workerGroupMapper; public WorkerGroupResourceList(WorkerGroupMapper workerGroupMapper) { this.workerGroupMapper = workerGroupMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.WORKER_GROUP); } @Override public boolean permissionCheck(int userId, String url, Logger logger) { return false; } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { List<WorkerGroup> workerGroups = workerGroupMapper.queryAllWorkerGroup(); return workerGroups.stream().map(WorkerGroup::getId).collect(Collectors.toSet()); } } /** * AlertPluginInstance Resource */ @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
12,650
[Improvement][Permission] Improve the check of resourcePermissionCheck()
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Improve the check of resourcePermissionCheck() ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/12650
https://github.com/apache/dolphinscheduler/pull/12652
1d0f9a7d04f55f5952969cffa7cc74b879ebc6c7
44e0935f569d6a9dbf65ef1edaf91bd9e892c558
2022-11-02T01:58:03Z
java
2022-11-03T01:12:56Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/permission/ResourcePermissionCheckServiceImpl.java
public static class AlertPluginInstanceResourceList implements ResourceAcquisitionAndPermissionCheck<Integer> { private final AlertPluginInstanceMapper alertPluginInstanceMapper; public AlertPluginInstanceResourceList(AlertPluginInstanceMapper alertPluginInstanceMapper) { this.alertPluginInstanceMapper = alertPluginInstanceMapper; } @Override public List<AuthorizationType> authorizationTypes() { return Collections.singletonList(AuthorizationType.ALERT_PLUGIN_INSTANCE); } @Override public boolean permissionCheck(int userId, String url, Logger logger) { return false; } @Override public Set<Integer> listAuthorizedResource(int userId, Logger logger) { return Collections.emptySet(); } } /** * AlertPluginInstance Resource */ @Component