AuthFail error while using SFTP JSON source connector

Hi all,
I am doing POC on kafka Connect using SFTP JSON source connector.
I have SFTP running on ubuntu server. WinSCP from local machine to SFTP machine works fine i.e. i am able to FTP JSON files from local machine to SFTP machine.

Confluent kafka is running on AWS EC2 ( say machine 1)
SFTP is running on another machine EC2 ( say machine2)
When using SFTP source connector on Confluent Platform Kafka, getting following error in connect.log
[2021-10-28 20:45:38,015] INFO SftpJsonSourceConnectorConfig values:
batch.size = 1000
behavior.on.error = FAIL
cleanup.policy = NONE = 250
error.path = /home/sftpfossuser/sftpdir/error = 0
finished.path = /home/sftpfossuser/sftpdir/finished
input.file.pattern = *.json
input.path = /home/sftpfossuser/sftpdir/input
kafka.topic = SFTPTopic
kerberos.keytab.path =
kerberos.user.principal =
key.schema = = [yyyy-MM-dd’T’HH:mm:ss, yyyy-MM-dd’ 'HH:mm:ss]
parser.timestamp.timezone = UTC
processing.file.extension = .PROCESSING
proxy.password = [hidden]
proxy.username =
schema.generation.enabled = false
schema.generation.key.fields = = defaultkeyschemaname = defaultvalueschemaname =
sftp.password = [hidden]
sftp.port = 22
sftp.proxy.url =
sftp.username = sftpfossuser
timestamp.field =
timestamp.mode = PROCESS_TIME
tls.passphrase = [hidden]
tls.pemfile =
tls.private.key = [hidden]
tls.public.key = [hidden]
value.schema =
[2021-10-28 20:45:38,073] ERROR WorkerConnector{id=SftpJsonSourceConnectorConnector_Kshitij} Error while starting connector (org.apache.kafka.connect.runtime.WorkerConnector:193)
org.apache.kafka.connect.errors.ConnectException: Failed to establish connection with SFTP.
at io.confluent.connect.sftp.connection.SftpConnection.(
at io.confluent.connect.sftp.source.AbstractSftpSourceConnectorConfig.(
at io.confluent.connect.sftp.source.SftpSourceConnectorConfig.(
at io.confluent.connect.sftp.source.SftpJsonSourceConnectorConfig.(
at io.confluent.connect.sftp.SftpJsonSourceConnector.start(
at org.apache.kafka.connect.runtime.WorkerConnector.doStart(
at org.apache.kafka.connect.runtime.WorkerConnector.start(
at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(
at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(
at org.apache.kafka.connect.runtime.WorkerConnector.doRun(
at java.util.concurrent.Executors$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(
at com.jcraft.jsch.Session.connect(
at io.confluent.connect.sftp.connection.SftpConnection.init(
at io.confluent.connect.sftp.connection.SftpConnection.(
… 15 more

Can someone help as to what i am missing.
Any help in resolution is highly appreciated.

Thanks in advance.

according to the stack trace “org.apache.kafka.connect.errors.ConnectException: Failed to establish connection with SFTP.”

The machine running connect can not reach the sftp server via the network.

Thanks Mitchell

But the exception says

Caused by: com.jcraft.jsch.JSchException: Auth fail.

Any clue?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.