Announcement Announcement Module
Collapse
No announcement yet.
Getting an eror while doing sftp files. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting an eror while doing sftp files.

    Getting an below errror while doing sftp.
    This error is coming since I did code change for dynamic ftp location. I refered example given in example source . Earlier it was workng when I was not using dynamic ftp.
    Onc strange thing is when I run this program at local m/c eclipse then it works but same program when I ran at unix box, it failed.


    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Connecting to dummymc port 22
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Connection established
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Remote version string: SSH-1.99-OpenSSH_4.4
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Local version string: SSH-2.0-JSCH-0.1.45
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: aes256-ctr is not available.
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: aes192-ctr is not available.
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: aes256-cbc is not available.
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: aes192-cbc is not available.
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: arcfour256 is not available.
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: CheckKexes: diffie-hellman-group14-sha1
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: diffie-hellman-group14-sha1 is not available.
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: SSH_MSG_KEXINIT sent
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: SSH_MSG_KEXINIT received
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: kex: server->client aes128-ctr hmac-md5 none
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: kex: client->server aes128-ctr hmac-md5 none
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: SSH_MSG_KEXDH_INIT sent
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: expecting SSH_MSG_KEXDH_REPLY
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: ssh_rsa_verify: signature true
    [05/06/13 12:13:56:056 HKT] WARN jcraft.jsch: Permanently added 'dummymc' (RSA) to the list of known hosts.
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: SSH_MSG_NEWKEYS sent
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: SSH_MSG_NEWKEYS received
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: SSH_MSG_SERVICE_REQUEST sent
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: SSH_MSG_SERVICE_ACCEPT received
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Authentications that can continue: publickey,keyboard-interactive,password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Next authentication method: publickey
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Authentications that can continue: keyboard-interactive,password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Next authentication method: keyboard-interactive
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Authentications that can continue: password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Next authentication method: password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Disconnecting from dummymc port 22

    org.springframework.integration.MessagingException : Failed to obtain pooled item
    at org.springframework.integration.util.SimplePool.ge tItem(SimplePool.java:170)
    at org.springframework.integration.file.remote.sessio n.CachingSessionFactory.getSession(CachingSessionF actory.java:83)
    at org.springframework.integration.file.remote.handle r.FileTransferringMessageHandler.handleMessageInte rnal(FileTransferringMessageHandler.java:149)
    at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:73)
    at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :115)
    at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:1 02)
    at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:77)
    at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:157)
    at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:128)
    Caused by: java.lang.IllegalStateException: failed to create SFTP Session
    at org.springframework.integration.sftp.session.Defau ltSftpSessionFactory.getSession(DefaultSftpSession Factory.java:266)
    at org.springframework.integration.file.remote.sessio n.CachingSessionFactory$1.createForPool(CachingSes sionFactory.java:55)
    at org.springframework.integration.file.remote.sessio n.CachingSessionFactory$1.createForPool(CachingSes sionFactory.java:53)
    at org.springframework.integration.util.SimplePool.do GetItem(SimplePool.java:180)
    at org.springframework.integration.util.SimplePool.ge tItem(SimplePool.java:160)
    ... 11 more
    Caused by: java.lang.IllegalStateException: failed to connect
    at org.springframework.integration.sftp.session.SftpS ession.connect(SftpSession.java:204)
    at org.springframework.integration.sftp.session.Defau ltSftpSessionFactory.getSession(DefaultSftpSession Factory.java:262)
    ... 15 more
    Caused by: com.jcraft.jsch.JSchException: Auth fail
    at com.jcraft.jsch.Session.connect(Session.java:464)
    at com.jcraft.jsch.Session.connect(Session.java:158)
    at org.springframework.integration.sftp.session.SftpS ession.connect(SftpSession.java:196)
    ... 16 more
    Last edited by sanjay.sahare; Jun 4th, 2013, 11:54 AM.

  • #2
    Caused by: com.jcraft.jsch.JSchException: Auth fail
    Some kind of authentication problem. Since you didn't post your configuration, I can't tell what kind of authentication you are using.

    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Authentications that can continue: publickey,keyboard-interactive,password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Next authentication method: publickey
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Authentications that can continue: keyboard-interactive,password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Next authentication method: keyboard-interactive
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Authentications that can continue: password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Next authentication method: password
    [05/06/13 12:13:56:056 HKT] INFO jcraft.jsch: Disconnecting from dummymc port 22
    I suggest you compare this part of the log with the one that works and figure out what you are doing wrong.

    Comment


    • #3
      if i remember correctly, i had similar problem with dyn-ftp on unix box.
      at the end we discovered that the variable ${user} is overwritten by the unix user name.
      i think that we've just changed the line
      env.getPropertySources().addLast(pps);

      with
      env.getPropertySources().addFirst(pps);

      Comment

      Working...
      X