org.apache.camel.component.file.GenericFileOperationFailedException

Cannot connect to sftp://user@host:22

Samebug tips1

Ant scp task has an attribute called trust. If set to false (default) the host you connect to has to be set in the knownhosts file (you might have to create it) Another way is to explicitly set "trust = true". Check the documentation: https://goo.gl/G5680x


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web582

  • via Stack Overflow by J. Does
    ,
  • via Unknown by Unknown author,
  • Stack trace

    • org.apache.camel.component.file.GenericFileOperationFailedException: Cannot connect to sftp://user@host:22 at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:146) at org.apache.camel.component.file.remote.RemoteFileConsumer.connectIfNecessary(RemoteFileConsumer.java:203) at org.apache.camel.component.file.remote.SftpConsumer.doStart(SftpConsumer.java:52) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3269) at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3563) at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3499) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3429) at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3197) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3053) at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813) at org.apache.camel.main.Main.doStart(Main.java:127) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.main.MainSupport.run(MainSupport.java:138) at org.apache.camel.main.MainSupport.run(MainSupport.java:390) at com.me.mypackage.MainApp.main(MainApp.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 2 Protocol error: no matching DH grp found at com.jcraft.jsch.Session.read(Session.java:996) at com.jcraft.jsch.Session.connect(Session.java:323) at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:118) ... 26 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    jf-astjf-ast
    10 times, last one
    jstrayerjstrayer
    3 times, last one
    Unknown visitor
    Unknown visitorOnce,
    96 more bugmates