spring batch sftp session auth failure: Caused by: java.lang.IllegalStateException: failed to connect -


i trying connect sftp using spring batch. using jsch way of sending files using sftp. getting following error: console log follows:

i have added jsch-0.1.44.jar file

   apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log    info: connecting <servername> port 22    apr 14, 2015 3:56:46 pm      org.springframework.integration.sftp.session.jschlogger log info: connection established apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: remote version string: ssh-2.0-6.1.8.136 ssh tectia server apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: local version string: ssh-2.0-jsch-0.1.44 apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: checkciphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256 apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: aes256-ctr not available.     apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: aes192-ctr not available. apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: aes256-cbc not available. apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: aes192-cbc not available. apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: arcfour256 not available. apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_msg_kexinit sent apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_msg_kexinit received apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: kex: server->client aes128-ctr hmac-md5 none apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: kex: client->server aes128-ctr hmac-md5 none apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_msg_kexdh_init sent apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: expecting ssh_msg_kexdh_reply apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_dss_verify: signature true apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log warning: permanently added '<servername>' (dsa) list of known hosts. apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_msg_newkeys sent apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_msg_newkeys received apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_msg_service_request sent apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: ssh_msg_service_accept received apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: authentications can continue: gssapi-with-mic,publickey,keyboard-interactive,password apr 14, 2015 3:56:46 pm org.springframework.integration.sftp.session.jschlogger log info: next authentication method: gssapi-with-mic apr 14, 2015 3:56:47 pm org.springframework.integration.sftp.session.jschlogger log info: authentications can continue: publickey,keyboard-interactive,password apr 14, 2015 3:56:47 pm org.springframework.integration.sftp.session.jschlogger log info: next authentication method: publickey apr 14, 2015 3:56:47 pm org.springframework.integration.sftp.session.jschlogger log info: authentications can continue: keyboard-interactive,password apr 14, 2015 3:56:47 pm org.springframework.integration.sftp.session.jschlogger log info: next authentication method: keyboard-interactive apr 14, 2015 3:56:49 pm org.springframework.integration.sftp.session.jschlogger log info: authentications can continue: password apr 14, 2015 3:56:49 pm org.springframework.integration.sftp.session.jschlogger log info: next authentication method: password apr 14, 2015 3:56:49 pm org.springframework.integration.sftp.session.jschlogger log info: disconnecting <servername> port 22 not send file per sftp: org.springframework.integration.messagingexception: failed execute on session org.springframework.integration.messagingexception: failed execute on session     @ org.springframework.integration.file.remote.remotefiletemplate.execute(remotefiletemplate.java:306)     @ org.springframework.integration.file.remote.remotefiletemplate.send(remotefiletemplate.java:190)     @ org.springframework.integration.file.remote.remotefiletemplate.send(remotefiletemplate.java:182)     @ org.springframework.integration.file.remote.handler.filetransferringmessagehandler.handlemessageinternal(filetransferringmessagehandler.java:112)     @ org.springframework.integration.handler.abstractmessagehandler.handlemessage(abstractmessagehandler.java:73)     @ org.springframework.integration.dispatcher.unicastingdispatcher.dodispatch(unicastingdispatcher.java:115)     @ org.springframework.integration.dispatcher.unicastingdispatcher.dispatch(unicastingdispatcher.java:102)     @ org.springframework.integration.channel.abstractsubscribablechannel.dosend(abstractsubscribablechannel.java:77)     @ org.springframework.integration.channel.abstractmessagechannel.send(abstractmessagechannel.java:178)     @ org.springframework.integration.channel.abstractmessagechannel.send(abstractmessagechannel.java:149)     @ com.sftpsample.util.sftpexample.execute(sftpexample.java:32)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source)     @ java.lang.reflect.method.invoke(unknown source)     @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317)     @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java:183)     @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:150)     @ org.springframework.aop.support.delegatingintroductioninterceptor.doproceed(delegatingintroductioninterceptor.java:131)     @ org.springframework.aop.support.delegatingintroductioninterceptor.invoke(delegatingintroductioninterceptor.java:119)     @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172)     @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:204)     @ com.sun.proxy.$proxy9.execute(unknown source)     @ org.springframework.batch.core.step.tasklet.taskletstep$chunktransactioncallback.dointransaction(taskletstep.java:406)     @ org.springframework.batch.core.step.tasklet.taskletstep$chunktransactioncallback.dointransaction(taskletstep.java:330)     @ org.springframework.transaction.support.transactiontemplate.execute(transactiontemplate.java:131)     @ org.springframework.batch.core.step.tasklet.taskletstep$2.doinchunkcontext(taskletstep.java:271)     @ org.springframework.batch.core.scope.context.stepcontextrepeatcallback.doiniteration(stepcontextrepeatcallback.java:77)     @ org.springframework.batch.repeat.support.repeattemplate.getnextresult(repeattemplate.java:368)     @ org.springframework.batch.repeat.support.repeattemplate.executeinternal(repeattemplate.java:215)     @ org.springframework.batch.repeat.support.repeattemplate.iterate(repeattemplate.java:144)     @ org.springframework.batch.core.step.tasklet.taskletstep.doexecute(taskletstep.java:257)     @ org.springframework.batch.core.step.abstractstep.execute(abstractstep.java:198)     @ org.springframework.batch.core.job.simplestephandler.handlestep(simplestephandler.java:148)     @ org.springframework.batch.core.job.flow.jobflowexecutor.executestep(jobflowexecutor.java:64)     @ org.springframework.batch.core.job.flow.support.state.stepstate.handle(stepstate.java:67)     @ org.springframework.batch.core.job.flow.support.simpleflow.resume(simpleflow.java:165)     @ org.springframework.batch.core.job.flow.support.simpleflow.start(simpleflow.java:144)     @ org.springframework.batch.core.job.flow.flowjob.doexecute(flowjob.java:134)     @ org.springframework.batch.core.job.abstractjob.execute(abstractjob.java:304)     @ org.springframework.batch.core.launch.support.simplejoblauncher$1.run(simplejoblauncher.java:135)     @ org.springframework.core.task.synctaskexecutor.execute(synctaskexecutor.java:49)     @ org.springframework.batch.core.launch.support.simplejoblauncher.run(simplejoblauncher.java:128)     @ com.sftpsample.main.mainapp.main(mainapp.java:143) caused by: java.lang.illegalstateexception: failed create sftp session     @ org.springframework.integration.sftp.session.defaultsftpsessionfactory.getsession(defaultsftpsessionfactory.java:321)     @ org.springframework.integration.file.remote.remotefiletemplate.execute(remotefiletemplate.java:295)     ... 43 more caused by: java.lang.illegalstateexception: failed connect     @ org.springframework.integration.sftp.session.sftpsession.connect(sftpsession.java:250)     @ org.springframework.integration.sftp.session.defaultsftpsessionfactory.getsession(defaultsftpsessionfactory.java:316)     ... 44 more    caused by: com.jcraft.jsch.jschexception: auth fail     @ com.jcraft.jsch.session.connect(session.java:461)     @ com.jcraft.jsch.session.connect(session.java:154)     @       org.springframework.integration.sftp.session.sftpsession.connect(sftpsession.java:241)     ... 45 more 

can please let me know might wrong?

the issue resolved. batch id used, password same locked , got authentication failed. after password unlocked th program working fine.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -