We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java version "1.7.0_95" OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode) sshj version: 0.15.0 OpenSSH version: SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7
--- Connection establishment --- then:
int localPort = 9999; InetSocketAddress socketAddress = new InetSocketAddress(LOCALHOST, localPort); RemotePortForwarder remotePortForwarder = sshClient.getRemotePortForwarder(); remotePortForwarder.bind(new Forward(0), new SocketForwardingConnectListener(socketAddress));
Fails with BufferException: underflow
See trace:
10:22:37.345 {main} INFO c.e.nsta.utils.console.SSHConsole - Succesfully connected to 10.64.77.30:22 10:22:37.348 {main} DEBUG n.s.sshj.connection.ConnectionImpl - Attaching opener for `forwarded-tcpip` channels: net.schmizz.sshj.connection.channel.forwarded.RemotePortForwarder@76639310 10:22:37.350 {main} DEBUG n.s.sshj.connection.ConnectionImpl - Making global request for `tcpip-forward` 10:22:37.351 {main} TRACE net.schmizz.sshj.transport.Encoder - Encoding packet #10: 50 00 00 00 0d 74 63 70 69 70 2d 66 6f 72 77 61 72 64 01 00 00 00 00 00 00 00 00 10:22:37.351 {main} DEBUG net.schmizz.concurrent.Promise - Awaiting <<global req for tcpip-forward>> 10:22:37.353 {reader} TRACE net.schmizz.sshj.transport.Decoder - Received packet #14: 51 00 00 a1 4d 10:22:37.354 {reader} TRACE n.s.sshj.transport.TransportImpl - Received packet REQUEST_SUCCESS 10:22:37.355 {reader} DEBUG net.schmizz.concurrent.Promise - Setting <<global req for tcpip-forward>> to `Buffer [rpos=6, wpos=10, size=1024]` Exception in thread "main" net.schmizz.sshj.connection.ConnectionException: Underflow at net.schmizz.sshj.connection.channel.forwarded.RemotePortForwarder.bind(RemotePortForwarder.java:175) at com.ericsson.nsta.utils.console.SSHConsole.createRemoteTunnel(SSHConsole.java:405) at SSHPortForwardDemo.main(SSHPortForwardDemo.java:22) Caused by: net.schmizz.sshj.common.Buffer$BufferException: Underflow at net.schmizz.sshj.common.Buffer.ensureAvailable(Buffer.java:131) at net.schmizz.sshj.common.Buffer.readUInt32(Buffer.java:296) at net.schmizz.sshj.common.Buffer.readUInt32AsInt(Buffer.java:291) at net.schmizz.sshj.connection.channel.forwarded.RemotePortForwarder.bind(RemotePortForwarder.java:173) ... 2 more
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the bug report, I've managed to reproduce this in a testcase in commit ca49ca3.
Sorry, something went wrong.
Ok! I've found it, it was a race condition (debugging didn't trigger the exception) 😄
0532f27
No branches or pull requests
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
sshj version: 0.15.0
OpenSSH version: SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7
--- Connection establishment ---
then:
Fails with BufferException: underflow
See trace:
The text was updated successfully, but these errors were encountered: