You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "Shubham-Garg20 (via GitHub)" <gi...@apache.org> on 2023/11/02 07:25:34 UTC

[I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Shubham-Garg20 opened a new issue, #1573:
URL: https://github.com/apache/camel-kafka-connector/issues/1573

   We're getting the following error when we try to reach out to our local SFTP server via PrivateKeys:
   
   ```
   [2023-11-02 12:47:30,299] WARN [CamelSftpSourceConnector|task-0] Error auto creating directory: demos/ due Cannot connect to sftp://demo@localhost:24. This exception is ignored. (org.apache.camel.component.file.remote.SftpConsumer:72)
   org.apache.camel.component.file.GenericFileOperationFailedException: Cannot connect to sftp://demo@localhost:24
   	at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:157)
   	at org.apache.camel.component.file.remote.RemoteFileConsumer.connectIfNecessary(RemoteFileConsumer.java:236)
   	at org.apache.camel.component.file.remote.SftpConsumer.doStart(SftpConsumer.java:68)
   	at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
   	at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
   	at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3464)
   	at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRouteConsumers(InternalRouteStartupManager.java:401)
   	at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartRouteConsumers(InternalRouteStartupManager.java:319)
   	at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:213)
   	at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:147)
   	at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:3167)
   	at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2847)
   	at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2798)
   	at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
   	at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2494)
   	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:245)
   	at org.apache.camel.main.SimpleMain.doStart(SimpleMain.java:43)
   	at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
   	at org.apache.camel.kafkaconnector.CamelSourceTask.start(CamelSourceTask.java:172)
   	at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.initializeAndStart(AbstractWorkerSourceTask.java:274)
   	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:202)
   	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:259)
   	at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.run(AbstractWorkerSourceTask.java:75)
   	at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:181)
   	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
   	at java.base/java.lang.Thread.run(Thread.java:1583)
   Caused by: com.jcraft.jsch.JSchException: Auth fail
   	at com.jcraft.jsch.Session.connect(Session.java:519)
   	at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:127)
   	... 28 more
   
   ```
   Here is the config:
   
   `name=CamelSftpSourceConnector
   connector.class=org.apache.camel.kafkaconnector.sftp.CamelSftpSourceConnector
   key.converter=org.apache.kafka.connect.storage.StringConverter
   value.converter=org.apache.kafka.connect.converters.ByteArrayConverter
   transforms=RemoteTransformer
   transforms.RemoteTransformer.type=org.apache.camel.kafkaconnector.RemoteFileTransforms
   
   topics=mytopic
   
   camel.source.path.host=localhost
   camel.source.path.port=24
   camel.source.path.directoryName=demos/
   camel.source.endpoint.recursive=true
   camel.source.endpoint.username=root
   camel.kamelet.sftp-source.privateKeyFile=<link to privatekey file>
   camel.source.endpoint.noop=false
   camel.source.endpoint.move=.done`
   
   Although, when I'm trying to connect to the same SFTP server via the external tools like FileZilla, it successfully logs me in with the same private key and user. Can you please help us resolve the issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1573:
URL: https://github.com/apache/camel-kafka-connector/issues/1573#issuecomment-2337289754

   No feedback, closing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Posted by "Shubham-Garg20 (via GitHub)" <gi...@apache.org>.
Shubham-Garg20 commented on issue #1573:
URL: https://github.com/apache/camel-kafka-connector/issues/1573#issuecomment-1822287150

   > What is the version used? Also how are you specify the link to private key file?
   
   We have the private key stored locally in the laptop, and we are giving the path to the same. We are using the latest version of connector. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1573:
URL: https://github.com/apache/camel-kafka-connector/issues/1573#issuecomment-1822289552

   The version of camel-kafka-connector I meant to ask.
   
   Also you need to prepend file:// if you use a local file


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Posted by "Shubham-Garg20 (via GitHub)" <gi...@apache.org>.
Shubham-Garg20 commented on issue #1573:
URL: https://github.com/apache/camel-kafka-connector/issues/1573#issuecomment-1822403035

   We're using 0.11.5 version of camel-kafka-connector. And the way we're setting privatekeyfile is:
   `camel.kamelet.sftp-source.privateKeyFile=/Users/test/Downloads/test.ppk`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd closed issue #1573: SFTP Connector throwing Auth Fail error while connecting via PrivateKey
URL: https://github.com/apache/camel-kafka-connector/issues/1573


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1573:
URL: https://github.com/apache/camel-kafka-connector/issues/1573#issuecomment-1820674429

   What is the version used? Also how are you specify the link to private key file? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] SFTP Connector throwing Auth Fail error while connecting via PrivateKey [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1573:
URL: https://github.com/apache/camel-kafka-connector/issues/1573#issuecomment-1822404315

   try with file:////Users/test/Downloads/test.ppk


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org