session.close() times out
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 620
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 11
Description
Greetings,
I am getting exceptions trying to close a session:
```TRACE net.schmizz.sshj.transport.TransportImpl - Received packet CHANNEL_OPEN_CONFIRMATION
DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Initialized - < session channel: id=0, recipient=0, localWin=[winSize=2097152], remoteWin=[winSize=0] >
DEBUG net.schmizz.concurrent.Promise - Setting <> to `SOME`
DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Sending channel request for `pty-req`
DEBUG net.schmizz.concurrent.Promise - Awaiting <>
TRACE net.schmizz.sshj.transport.TransportImpl - Received packet CHANNEL_SUCCESS
DEBUG net.schmizz.concurrent.Promise - Setting <> to `SOME`
DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Sending channel request for `shell`
DEBUG net.schmizz.concurrent.Promise - Awaiting <>
TRACE net.schmizz.sshj.transport.TransportImpl - Received packet CHANNEL_WINDOW_ADJUST
DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Received window adjustment for 131072 bytes
DEBUG net.schmizz.sshj.connection.channel.Window$Remote - Increasing by 131072 up to 131072
TRACE net.schmizz.sshj.transport.TransportImpl - Received packet CHANNEL_SUCCESS
DEBUG net.schmizz.concurrent.Promise - Setting <> to `SOME`
TRACE net.schmizz.sshj.transport.TransportImpl - Received packet CHANNEL_DATA
DEBUG net.schmizz.sshj.connection.channel.Window$Local - Consuming by 64 down to 2097088
DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Sending close
DEBUG net.schmizz.concurrent.Promise - Awaiting <>
Exception in thread "main" net.schmizz.sshj.connection.ConnectionException: Timeout expired
at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32)
at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26)
at net.schmizz.concurrent.Promise.retrieve(Promise.java:139)
at net.schmizz.concurrent.Event.await(Event.java:105)
at net.schmizz.sshj.connection.channel.AbstractChannel.close(AbstractChannel.java:265)
at local.test.sshj.Main.main(Main.java:66)
Caused by: java.util.concurrent.TimeoutException: Timeout expired
... 4 more
```
The code is simple:
```
final SSHClient sshC = new SSHClient(new DefaultConfig());
sshC.addHostKeyVerifier(new PromiscuousVerifier());
sshC.connect(address, port);
sshC.authPassword(username, password);
Session session = sshC.startSession();
session.allocateDefaultPTY();
Session.Shell shell = session.startShell();
session.close();
sshC.disconnect();
System.out.println("done");
```
Any idea what could be wrong or how to further debug this?
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.