{"record":{"id":"e38f5418bb583a92","repo":"pentaho/pentaho-kettle","slug":"jobentryftp-socksproxy-portmissingexception","errorCode":null,"errorMessage":"JobEntryFTP.SocksProxy.PortMissingException","messagePattern":"JobEntryFTP\\.SocksProxy\\.PortMissingException","errorType":"exception","errorClass":"FTPException","httpStatus":null,"severity":"error","filePath":"plugins/get-file-with-ftp/impl/src/main/java/org/pentaho/di/job/entries/ftp/JobEntryFTP.java","lineNumber":977,"sourceCode":"\n      // Set the timeout\n      int timeoutValue = Const.toInt( environmentSubstitute( timeout ), 10000 );\n      ftpclient.setTimeout( timeoutValue );\n      if ( isDetailed() ) {\n        logDetailed( BaseMessages.getString( PKG, \"JobEntryFTP.SetTimeout\", String.valueOf( timeoutValue ) ) );\n      }\n\n      ftpclient.setControlEncoding( controlEncoding );\n      if ( isDetailed() ) {\n        logDetailed( BaseMessages.getString( PKG, \"JobEntryFTP.SetEncoding\", controlEncoding ) );\n      }\n\n      // If socks proxy server was provided\n      if ( !Utils.isEmpty( socksProxyHost ) ) {\n        if ( !Utils.isEmpty( socksProxyPort ) ) {\n          FTPClient.initSOCKS( environmentSubstitute( socksProxyPort ), environmentSubstitute( socksProxyHost ) );\n        } else {\n          throw new FTPException( BaseMessages.getString(\n            PKG, \"JobEntryFTP.SocksProxy.PortMissingException\", environmentSubstitute( socksProxyHost ),\n            getName() ) );\n        }\n        // then if we have authentication information\n        if ( !Utils.isEmpty( socksProxyUsername ) && !Utils.isEmpty( socksProxyPassword ) ) {\n          FTPClient.initSOCKSAuthentication(\n            environmentSubstitute( socksProxyUsername ), Utils.resolvePassword( this, socksProxyPassword ) );\n        } else if ( !Utils.isEmpty( socksProxyUsername )\n          && Utils.isEmpty( socksProxyPassword ) || Utils.isEmpty( socksProxyUsername )\n          && !Utils.isEmpty( socksProxyPassword ) ) {\n          // we have a username without a password or vica versa\n          throw new FTPException( BaseMessages.getString(\n            PKG, \"JobEntryFTP.SocksProxy.IncompleteCredentials\", environmentSubstitute( socksProxyHost ),\n            getName() ) );\n        }\n      }\n\n      // login to ftp host ...","sourceCodeStart":959,"sourceCodeEnd":995,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/get-file-with-ftp/impl/src/main/java/org/pentaho/di/job/entries/ftp/JobEntryFTP.java#L959-L995","documentation":"JobEntryFTP requires a SOCKS proxy port whenever a SOCKS proxy host is configured. If socksProxyHost is set but socksProxyPort is empty, the entry throws an FTPException with this localized message before attempting the FTP connection. FTPClient.initSOCKS needs both host and port to configure the JVM-wide SOCKS settings.","triggerScenarios":"Running/executing the job entry with a SOCKS proxy host filled in the job entry dialog but the SOCKS proxy port field left blank.","commonSituations":"Copy-pasting proxy config with the port forgotten; assuming a default SOCKS port exists; configuration imported from XML/repertoire where the port attribute was empty or lost.","solutions":["Set the SOCKS proxy port field in the FTP job entry dialog","Verify the stored entry attributes include a non-empty socks proxy port","Test the port with the actual proxy server (commonly 1080 for SOCKS)"],"exampleFix":"// before (dialog config)\nSOCKS proxy host: proxy.example.com\nSOCKS proxy port: (empty)\n// after\nSOCKS proxy host: proxy.example.com\nSOCKS proxy port: 1080","handlingStrategy":"validation","validationCode":"if (!Utils.isEmpty(socksProxyHost) && Utils.isEmpty(socksProxyPort)) { throw new IllegalArgumentException(\"SOCKS proxy port required when host is set\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always fill host and port together in the proxy section","Use standard ports (1080) when unsure","Validate job entry config via the dialog's check before executing","Document proxy settings in team runbooks"],"tags":["ftp","socks-proxy","configuration"],"backgroundTag":"missing-required-config-field","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"}