Menu

#4 Issue while connecting with SFTP server while using J2SSH API(java.io.IOException: Corrupt Mac on input)

v1.0 (example)
open
nobody
None
5
2014-12-11
2014-12-11
vishal
No

We are facing the issue while connecting with SFTP server while using J2SSH API. Same code works properly when code is executed with JRE 6 but when the same code is executed with JRE 7 then it used to give error.

Here is error stack trace coming with JRE 7 :

2014-12-12 16:06:23,459 ERROR [Transport protocol 1] com.sshtools.j2ssh.transport.TransportProtocolCommon com.sshtools.j2ssh.transport.TransportProtocolCommon.run(TransportProtocolCommon.java:389) - The Transport Protocol thread failed:java.io.IOException: Corrupt Mac on input
2014-12-12 16:06:23 java.io.IOException: Corrupt Mac on input
2014-12-12 16:06:23 at com.sshtools.j2ssh.transport.TransportProtocolInputStream.readMessage(TransportProtocolInputStream.java:345)
2014-12-12 16:06:23 at com.sshtools.j2ssh.transport.TransportProtocolCommon.processMessages(TransportProtocolCommon.java:1385)
2014-12-12 16:06:23 at com.sshtools.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(TransportProtocolCommon.java:1007)
2014-12-12 16:06:23 at com.sshtools.j2ssh.transport.TransportProtocolCommon.run(TransportProtocolCommon.java:381)
2014-12-12 16:06:23 at java.lang.Thread.run(Unknown Source)
2014-12-12 16:06:23,463 INFO [Transport protocol 1] com.sshtools.j2ssh.transport.TransportProtocolCommon com.sshtools.j2ssh.transport.TransportProtocolCommon.sendDisconnect(TransportProtocolCommon.java:769) - Disconnecting:The Transport Protocol thread failed:java.io.IOException: Corrupt Mac on input
2014-12-12 16:06:23,466 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol com.sshtools.j2ssh.connection.ConnectionProtocol.onStop(ConnectionProtocol.java:239) - Closing all active channels
2014-12-12 16:06:23,469 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.Channel com.sshtools.j2ssh.connection.Channel.close(Channel.java:417) - Finializing channel close
2014-12-12 16:06:23,472 INFO [ssh-connection 1] com.sshtools.j2ssh.connection.ConnectionProtocol com.sshtools.j2ssh.connection.ConnectionProtocol.freeChannel(ConnectionProtocol.java:954) - Freeing channel 0 [sftp]
2014-12-12 16:06:23,473 ERROR [RMI TCP Connection(8)-127.0.0.1] BPMServer com.adeptia.indigo.services.transport.sftp.J2SSHSFTP.testConnection(J2SSHSFTP.java:452) - ||||null|||||null|Error while making connection with FTP server[The SFTP Subsystem could not be initialized]|localhost|
2014-12-12 16:06:23 com.sshtools.j2ssh.SshException: The SFTP Subsystem could not be initialized
2014-12-12 16:06:23 at com.sshtools.j2ssh.SshClient.openSftpChannel(SshClient.java:1262)
2014-12-12 16:06:23 at com.sshtools.j2ssh.SftpClient.<init>(SftpClient.java:100)
2014-12-12 16:06:23 at com.sshtools.j2ssh.SshClient.openSftpClient(SshClient.java:1132)
2014-12-12 16:06:23 at com.sshtools.j2ssh.SshClient.openSftpClient(SshClient.java:1115)
2014-12-12 16:06:23 at com.adeptia.indigo.services.transport.sftp.J2SSHSFTP.getClient(J2SSHSFTP.java:331)
2014-12-12 16:06:23 at com.adeptia.indigo.services.transport.sftp.J2SSHSFTP.testConnection(J2SSHSFTP.java:449)
2014-12-12 16:06:23 at com.adeptia.indigo.event.EventManager.activateFtpTrigger(EventManager.java:768)
2014-12-12 16:06:23 at com.adeptia.indigo.event.QuartzEventFactory.activateFtpTrigger(QuartzEventFactory.java:463)
2014-12-12 16:06:23 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-12-12 16:06:23 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-12-12 16:06:23 at java.lang.reflect.Method.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.reflect.misc.Trampoline.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-12-12 16:06:23 at java.lang.reflect.Method.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
2014-12-12 16:06:23 at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown Source)
2014-12-12 16:06:23 at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown Source)
2014-12-12 16:06:23 at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source)
2014-12-12 16:06:23 at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source)
2014-12-12 16:06:23 at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source)
2014-12-12 16:06:23 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
2014-12-12 16:06:23 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
2014-12-12 16:06:23 at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
2014-12-12 16:06:23 at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source)
2014-12-12 16:06:23 at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
2014-12-12 16:06:23 at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
2014-12-12 16:06:23 at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-12-12 16:06:23 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-12-12 16:06:23 at java.lang.reflect.Method.invoke(Unknown Source)
2014-12-12 16:06:23 at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
2014-12-12 16:06:23 at sun.rmi.transport.Transport$1.run(Unknown Source)
2014-12-12 16:06:23 at sun.rmi.transport.Transport$1.run(Unknown Source)
2014-12-12 16:06:23 at java.security.AccessController.doPrivileged(Native Method)
2014-12-12 16:06:23 at sun.rmi.transport.Transport.serviceCall(Unknown Source)
2014-12-12 16:06:23 at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
2014-12-12 16:06:23 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
2014-12-12 16:06:23 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
2014-12-12 16:06:23 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2014-12-12 16:06:23 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2014-12-12 16:06:23 at java.lang.Thread.run(Unknown Source)

Note : This issue comes when code is executed on Linux machine but the same works with Windows machine with JRE 7.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.