{"record":{"id":"2820c2e4add16204","repo":"pentaho/pentaho-kettle","slug":"jobftpput-socksproxy-incompletecredentials","errorCode":"JobFTPPUT.SocksProxy.IncompleteCredentials","errorMessage":"JobFTPPUT.SocksProxy.IncompleteCredentials","messagePattern":"JobFTPPUT\\.SocksProxy\\.IncompleteCredentials","errorType":"error_code","errorClass":"FTPException","httpStatus":null,"severity":"error","filePath":"plugins/put-a-file-with-ftp/impl/src/main/java/org/pentaho/di/job/entries/ftpput/JobEntryFTPPUT.java","lineNumber":845,"sourceCode":"    if ( log.isDetailed() ) {\n      logDetailed( BaseMessages.getString( PKG, \"JobFTPPUT.Log.SetEncoding\", controlEncoding ) );\n    }\n\n    // If socks proxy server was provided\n    if ( !Utils.isEmpty( socksProxyHost ) ) {\n      // if a port was provided\n      if ( !Utils.isEmpty( socksProxyPort ) ) {\n        FTPClient.initSOCKS( environmentSubstitute( socksProxyPort ), environmentSubstitute( socksProxyHost ) );\n      } else { // looks like we have a host and no port\n        throw new FTPException( BaseMessages.getString(\n          PKG, \"JobFTPPUT.SocksProxy.PortMissingException\", environmentSubstitute( socksProxyHost ) ) );\n      }\n      // now if we have authentication information\n      if ( !Utils.isEmpty( socksProxyUsername )\n        && Utils.isEmpty( socksProxyPassword ) || Utils.isEmpty( socksProxyUsername )\n        && !Utils.isEmpty( socksProxyPassword ) ) {\n        // we have a username without a password or vice versa\n        throw new FTPException( BaseMessages.getString(\n          PKG, \"JobFTPPUT.SocksProxy.IncompleteCredentials\", environmentSubstitute( socksProxyHost ),\n          getName() ) );\n      }\n    }\n\n    return ftpClient;\n  }\n\n  // package-local visibility for testing purposes\n  FTPClient createFtpClient() {\n    return new PDIFTPClient( log );\n  }\n\n  @Override\n  public boolean evaluates() {\n    return true;\n  }\n","sourceCodeStart":827,"sourceCodeEnd":863,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/put-a-file-with-ftp/impl/src/main/java/org/pentaho/di/job/entries/ftpput/JobEntryFTPPUT.java#L827-L863","documentation":"The entry throws FTPException 'SocksProxy.IncompleteCredentials' (message key JobFTPPUT.SocksProxy.IncompleteCredentials, interpolated with host and entry name) when SOCKS proxy credentials are half-specified: a username without a password, or a password without a username. Both must be provided together, or neither.","triggerScenarios":"Executing the FTP Put entry with socksProxyUsername non-empty and socksProxyPassword empty (or vice versa) while a SOCKS proxy host is configured.","commonSituations":"Password stored as a variable that doesn't resolve; credentials pasted only partially; password cleared after a security policy change; variable-only password empty in the execution environment.","solutions":["Provide both SOCKS proxy username and password in the job entry settings.","If the password uses a variable, ensure it resolves to a non-empty value at runtime.","Remove both username and password if the proxy requires no authentication.","Confirm the entry name referenced in the error to locate the offending job entry in the job."],"exampleFix":"// before\nsocksProxyUsername = \"ftpuser\";\nsocksProxyPassword = \"\"; // password missing -> exception\n\n// after\nsocksProxyUsername = \"ftpuser\";\nsocksProxyPassword = \"s3cret\"; // or clear username too for anonymous proxy","handlingStrategy":"validation","validationCode":"boolean hasUser = !Utils.isEmpty(entry.getSocksProxyUsername()); boolean hasPass = !Utils.isEmpty(entry.getSocksProxyPassword()); if ( hasUser ^ hasPass ) { throw new IllegalArgumentException(\"SOCKS proxy username and password must both be set or both be empty\"); }","typeGuard":null,"tryCatchPattern":"try { result = runFtpPut(); } catch (FTPException e) { if ( e.getMessage().contains(\"IncompleteCredentials\") ) { failJob(\"SOCKS proxy credentials incomplete\"); } else { throw e; } }","preventionTips":["Set username and password together when the SOCKS proxy requires auth.","Ensure credential variables resolve to non-empty values at runtime.","Use Encr-encrypted password storage to avoid accidental clearing."],"tags":["ftp","socks-proxy","credentials","configuration"],"backgroundTag":"missing-credentials","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}