{"record":{"id":"fbb59f21382f1b35","repo":"pentaho/pentaho-kettle","slug":"jobftps-error-connecting","errorCode":"JobFTPS.Error.Connecting","errorMessage":"JobFTPS.Error.Connecting","messagePattern":"JobFTPS\\.Error\\.Connecting","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java","lineNumber":174,"sourceCode":"   * this method is used to connect to a remote host\n   *\n   * @throws KettleException\n   */\n  public void connect() throws KettleException {\n    try {\n      connection =\n        FTPConnectionFactory.getInstance( getProperties(\n          hostName, portNumber, userName, passWord, connectionType, timeOut, passiveMode ) );\n      if ( connection.getConnectionType() == FTPConnection.IMPLICIT_SSL_WITH_CRYPTED_DATA_FTP_CONNECTION\n          || connection.getConnectionType() == FTPConnection.IMPLICIT_TLS_WITH_CRYPTED_DATA_FTP_CONNECTION ) {\n        // need to upgrade to our custom connection to force crypted data channel\n        connection = getSecureDataFTPConnection( connection, passWord, timeOut );\n      }\n      connection.addFTPStatusListener( this );\n      connection.connect();\n    } catch ( Exception e ) {\n      connection = null;\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPS.Error.Connecting\", hostName ), e );\n    }\n  }\n\n  @VisibleForTesting\n  protected FTPConnection getSecureDataFTPConnection( FTPConnection connection, String password, int timeout )\n    throws ConfigurationException {\n    return new SecureDataFTPConnection( connection, password, timeout );\n  }\n\n  private Properties getProperties( String hostname, int port, String username, String password,\n    int connectionType, int timeout, boolean passiveMode ) {\n    Properties pt = new Properties();\n    pt.setProperty( \"connection.host\", hostname );\n    pt.setProperty( \"connection.port\", String.valueOf( port ) );\n    pt.setProperty( \"user.login\", username );\n    pt.setProperty( \"user.password\", password );\n    pt.setProperty( \"connection.type\", getConnectionType( connectionType ) );\n    pt.setProperty( \"connection.timeout\", String.valueOf( timeout ) );","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java#L156-L192","documentation":"FTPSConnection.connect() opens the secure connection to the remote host: it configures the data connection and adds a status listener before calling connection.connect(). Any exception during connect sets connection=null and is rethrown as KettleException with localized message JobFTPS.Error.Connecting, parameterized by hostName.","triggerScenarios":"buildFTPSConnection -> connect() where the underlying FTPS client throws — unreachable host, refused port, TLS handshake failure, bad credentials, or timeout.","commonSituations":"Wrong host/port; firewall blocking FTPS (esp. implicit vs explicit mode mismatch); invalid or expired certificates; wrong username/password; network outages.","solutions":["Verify host, port, and FTPS mode (explicit/implicit) in the job entry config","Test reachability: ping/telnet host:port from the Pentaho server","Inspect the wrapped cause `e` for TLS or auth specifics","Check firewall rules allowing FTPS control and passive data ports","Confirm credentials and certificate truststore are correct"],"exampleFix":"// before\nconnection.connect(); // host typo, refuses\n// after\nif ( !hostReachable( hostName, port ) ) {\n  throw new KettleException( \"Host unreachable before connect: \" + hostName );\n}\nconnection.connect();","handlingStrategy":"retry","validationCode":"// preflight reachability\ntry ( Socket s = new Socket() ) {\n  s.connect( new InetSocketAddress( hostName, port ), 5000 ); // throws if unreachable\n}","typeGuard":null,"tryCatchPattern":"try { ftpsConnection.connect(); }\ncatch ( KettleException ke ) {\n  Throwable cause = ke.getCause();\n  if ( cause instanceof SSLException ) {\n    log.error( \"TLS handshake failed; check certificates/mode\" );\n  } else {\n    log.error( \"Connect failed to \" + hostName + \"; check host/port/firewall\", cause );\n  }\n}","preventionTips":["Verify host, port, and implicit/explicit FTPS mode","Allow FTPS and passive data ports through firewalls","Keep certificates/truststore current on the Pentaho server"],"tags":["ftps","connection","tls","network"],"backgroundTag":"connection-refused","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"}