hierynomus / hierynomus/sshj

Is there anyway to aviod Connection Reset Exception?

Open
#562 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.7k
Forks
620
Avg merge
3d 23h
Merged PRs (30d)
11

Description

When i tried to open a session with _SSHClient_ and send a shell command to remote server by socket ,sometimes this _Connection Reset_ exception will arise!
So i searched this keyword in issues, found one, but it isn't my issue, my _SSHClient_ was enabling keep alive, so i can't figure out what else i can do.
ps. My _SSHClient_ was stored in a local map just for recycle

> 200219 16:37:02.460 soc2chan ERROR StreamCopier [] [] In pipe from java.net.SocketInputStream@19499932 to < ChannelOutputStream for Channel #6217 >
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.java:127)
at net.schmizz.sshj.common.StreamCopier.copy(StreamCopier.java:131)
at net.schmizz.sshj.common.StreamCopier$3.run(StreamCopier.java:110)
200219 16:37:02.461 sockmon ERROR Promise [] [] <> woke to: java.net.SocketException: Connection reset

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.