maheedharan / sshxcute

Automatically exported from code.google.com/p/sshxcute
0 stars 0 forks source link

?what the reason about "session is down" ? #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
when i do ssh.exec() and uploadSingleDataToServer()

com.jcraft.jsch.JSchException: session is down
    at com.jcraft.jsch.Session.openChannel(Session.java:752)
    at net.neoremind.sshxcute.core.SSHExec.exec(SSHExec.java:164)
    at com.standard.business.healthcheck.HealthCheckConutExecutor.main(HealthCheckConutExecutor.java:78)

Original issue reported on code.google.com by woshili...@gmail.com on 12 Jul 2012 at 8:28

GoogleCodeExporter commented 8 years ago
There are two possible reasons for this error.

1.Either the credentials are wrong.
2.The server you are trying to connect is down. Just type ping servername in 
Command prompt and see server is up or not.

Original comment by bonyt...@gmail.com on 25 Nov 2012 at 7:24

GoogleCodeExporter commented 8 years ago
when i do ssh.exec()

com.jcraft.jsch.JSchException: session is down
    at com.jcraft.jsch.Session.openChannel(Session.java:752)
    at net.neoremind.sshxcute.core.SSHExec.exec(SSHExec.java:164)

bt when i run same code from different machine itz working.

please solve this issue ASAP

thx

Original comment by i.ramandas on 27 Nov 2012 at 1:35

shwethasihi commented 4 years ago

Even I have the same issue, I tried updating JCE and update the Jsch to 0.1.55 version.It dint help.Can some one please help us what can be done to this error:

Connect fails with the following exception: com.jcraft.jsch.JSchException: Algorithm negotiation fail session is down com.jcraft.jsch.JSchException: session is down at com.jcraft.jsch.Session.openChannel(Session.java:752) at net.neoremind.sshxcute.core.SSHExec.exec(SSHExec.java:108)

jbhattac commented 1 month ago

I am having the same issue as well.

Caused by: com.jcraft.jsch.JSchException: session is down
2024-06-05 09:28:55 
    at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-6.0.13.jar:6.0.13]
2024-06-05 09:28:55 
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-6.0.13.jar:6.0.13]
2024-06-05 09:28:55 
    at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
2024-06-05 09:28:55 
    at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[na:na]

I observed from the Jsch logs that I am getting the following error even though I am disconnecting the connection.

: Caught an exception, leaving main loop due to SSH_MSG_DISCONNECT: 12 Maximum connections for host/user reached en-US

Code to disconnect the connection and that method is called from finally.

 private void disconnectSftp(ChannelSftp channelSftp){
        channelSftp.exit();
    }

My question is disconnecting for the channel not good enough, or we still do have to discoonect from the session explicitly.