mentochan / ganymed-ssh-2

Automatically exported from code.google.com/p/ganymed-ssh-2
Other
0 stars 0 forks source link

complains Connection is closed if session is opened, execute cmd and close multiple times #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a session using connection object, execute some command and close the 
session
2. create new session using same connection object, execute some command and 
close the session
3. do the same 

What is the expected output? What do you see instead?
There are should be IOException in connection object while opening a new 
session. new session should be created successfully

What version of the product are you using? On what operating system?
251

Please provide any additional information below.
java.io.IOException: Sorry, this connection is closed.
        at ch.ethz.ssh2.transport.TransportManager.sendMessageImmediate(TransportManager.java:792)
        at ch.ethz.ssh2.transport.TransportManager.sendMessage(TransportManager.java:765)
        at ch.ethz.ssh2.channel.ChannelManager.openSessionChannel(ChannelManager.java:621)
        at ch.ethz.ssh2.Session.<init>(Session.java:42)
        at ch.ethz.ssh2.Connection.openSession(Connection.java:1097)
        at com.ericsson.monitoring.plugin.nascluster.NasServerConnection.doCollection(NasServerConnection.java:317)
        at com.ericsson.monitoring.plugin.nascluster.NasServerConnection.collectData(NasServerConnection.java:294)
        at com.ericsson.monitoring.plugin.nascluster.NasServerConnection.getNasClusterData(NasServerConnection.java:283)
        at com.ericsson.monitoring.plugin.nascluster.NasServerConnection.getValue(NasServerConnection.java:567)
        at com.ericsson.monitoring.plugin.nascluster.NasClusterMeasurement.getValue(NasClusterMeasurement.java:29)
        at org.hyperic.hq.product.MeasurementPluginManager.getPluginValue(MeasurementPluginManager.java:171)
        at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementPluginManager.java:269)
        at org.hyperic.hq.measurement.agent.server.ScheduleThread.getValue(ScheduleThread.java:438)
        at org.hyperic.hq.measurement.agent.server.ScheduleThread.access$1500(ScheduleThread.java:76)
        at org.hyperic.hq.measurement.agent.server.ScheduleThread$MetricTask.run(ScheduleThread.java:505)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.InterruptedIOException
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at ch.ethz.ssh2.crypto.cipher.CipherOutputStream.flush(CipherOutputStream.java:80)
        at ch.ethz.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:195)
        at ch.ethz.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:109)
        at ch.ethz.ssh2.transport.TransportManager.sendMessageImmediate(TransportManager.java:813)
        at ch.ethz.ssh2.transport.TransportManager.sendMessage(TransportManager.java:765)
        at ch.ethz.ssh2.channel.ChannelManager.closeChannel(ChannelManager.java:354)
        at ch.ethz.ssh2.Session.close(Session.java:453)
        at com.ericsson.monitoring.plugin.nascluster.NasServerConnection.nasServiceOnlineCount(NasServerConnection.java:860)
        at com.ericsson.monitoring.plugin.nascluster.NasServerConnection.doCollection(NasServerConnection.java:304)
        ... 15 more

Original issue reported on code.google.com by shan7...@gmail.com on 10 Oct 2013 at 2:05

GoogleCodeExporter commented 9 years ago
Typo in expected output, change find below

What is the expected output? What do you see instead?
There should not be IOException in connection object while opening a new 
session. new session should be created successfully

Original comment by shan7...@gmail.com on 10 Oct 2013 at 2:10

GoogleCodeExporter commented 9 years ago
Did you double check that your server can handle multiple sessions in one 
connection? 

In case you use OpenSSHD, please start your ssh server as follows: "sshd -d -p 
8888" and connect to port 8888 and send the debug output.

Original comment by cleondris on 10 Feb 2014 at 11:31

GoogleCodeExporter commented 9 years ago

Original comment by dkocher@sudo.ch on 8 Apr 2014 at 11:31