{"record":{"id":"60d3215be57dc737","repo":"apache/dolphinscheduler","slug":"ssh-datasource-param-is-not-valid","errorCode":null,"errorMessage":"ssh datasource param is not valid","messagePattern":"ssh datasource param is not valid","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-ssh/src/main/java/org/apache/dolphinscheduler/plugin/datasource/ssh/param/SSHDataSourceProcessor.java","lineNumber":51,"sourceCode":"\nimport lombok.extern.slf4j.Slf4j;\n\nimport com.google.auto.service.AutoService;\n\n@AutoService(DataSourceProcessor.class)\n@Slf4j\npublic class SSHDataSourceProcessor extends AbstractDataSourceProcessor {\n\n    @Override\n    public BaseDataSourceParamDTO castDatasourceParamDTO(String paramJson) {\n        return JSONUtils.parseObject(paramJson, SSHDataSourceParamDTO.class);\n    }\n\n    @Override\n    public void checkDatasourceParam(BaseDataSourceParamDTO datasourceParamDTO) {\n        if (StringUtils.isEmpty(datasourceParamDTO.getHost())\n                || StringUtils.isEmpty(datasourceParamDTO.getUserName())) {\n            throw new IllegalArgumentException(\"ssh datasource param is not valid\");\n        }\n    }\n\n    @Override\n    public String getDatasourceUniqueId(ConnectionParam connectionParam, DbType dbType) {\n        SSHConnectionParam baseConnectionParam = (SSHConnectionParam) connectionParam;\n        return MessageFormat.format(\"{0}@{1}@{2}@{3}\", dbType.getName(), baseConnectionParam.getHost(),\n                baseConnectionParam.getUser(),\n                PasswordUtils.encodePassword(baseConnectionParam.getPassword()));\n    }\n\n    @Override\n    public BaseDataSourceParamDTO createDatasourceParamDTO(String connectionJson) {\n        SSHConnectionParam connectionParams = (SSHConnectionParam) createConnectionParams(connectionJson);\n        SSHDataSourceParamDTO sshDataSourceParamDTO = new SSHDataSourceParamDTO();\n\n        sshDataSourceParamDTO.setUserName(connectionParams.getUser());\n        sshDataSourceParamDTO.setPassword(connectionParams.getPassword());","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-ssh/src/main/java/org/apache/dolphinscheduler/plugin/datasource/ssh/param/SSHDataSourceProcessor.java#L33-L69","documentation":"Validation in SSHDataSourceProcessor.checkDatasourceParam: the SSH datasource is rejected when host or userName is empty — without a target host and login user the SSH session cannot even be initiated, so the guard fires before any connection attempt.","triggerScenarios":"Thrown at dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-ssh/src/main/java/org/apache/dolphinscheduler/plugin/datasource/ssh/param/SSHDataSourceProcessor.java:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the host field to a reachable SSH server hostname or IP","Set userName to the SSH login account","Re-save the datasource and test the connection"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}