sshnet / sshnet/SSH.NET

Socket read operation has timed out after 30000 milliseconds - after several successful connections

Abierto
#642 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
C#
Estrellas
4.4k
Forks
993
Merge medio
9 d 21 h
PR fusionados (30 d)
1

Descripción

Hi!
I have a different issue then similiar ones. After serveral successful connection I'm getting an error as in the title.
It's a Windows Service that checks documents status on a SFTP server. And, yes, it is a proper SFTP (SSH) server. I think it's an ISP issue on server side that adds all IPs to blacklist, but I have to make sure that this is not a bug...

My application connects to SFTP server every 5 minutes. Tried on 3 different machines with different IPs, everything ends with the same error after couple successful ones.

Scheduler is Quartz.

2020-03-13 16:05:00.8389|INFO|CONNECTED
2020-03-13 16:10:00.7614|INFO|CONNECTED
2020-03-13 16:15:00.8870|INFO|CONNECTED
2020-03-13 16:20:00.9344|INFO|CONNECTED
2020-03-13 16:25:00.7007|INFO|CONNECTED
2020-03-13 16:30:00.7013|INFO|CONNECTED
2020-03-13 16:35:00.7175|INFO|CONNECTED
2020-03-13 16:40:00.7181|INFO|CONNECTED
2020-03-13 16:45:00.7187|INFO|CONNECTED
2020-03-13 16:50:00.7037|INFO|CONNECTED
2020-03-13 16:55:00.6886|INFO|CONNECTED
2020-03-13 17:00:00.7517|INFO|CONNECTED
2020-03-13 17:05:00.6898|INFO|CONNECTED
2020-03-13 17:10:00.7061|INFO|CONNECTED
2020-03-13 17:15:00.6754|INFO|CONNECTED
2020-03-13 17:20:00.7854|INFO|CONNECTED
2020-03-13 17:25:00.6922|INFO|CONNECTED
2020-03-13 17:30:00.6928|INFO|CONNECTED
2020-03-13 17:35:00.6934|INFO|CONNECTED
2020-03-13 17:40:00.6940|INFO|CONNECTED
2020-03-13 17:45:30.5072|ERROR|Renci.SshNet.Common.SshOperationTimeoutException: Socket read operation has timed out after 30000 milliseconds.
   w Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   w Renci.SshNet.Session.SocketReadLine(TimeSpan timeout)
   w Renci.SshNet.Session.Connect()
   w Renci.SshNet.BaseClient.Connect()
   w OptimoKurierService.Jobs.MainJob.<Execute>d__0.MoveNext()
2020-03-13 17:50:30.5078|ERROR|Renci.SshNet.Common.SshOperationTimeoutException: Socket read operation has timed out after 30000 milliseconds.
   w Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   w Renci.SshNet.Session.SocketReadLine(TimeSpan timeout)
   w Renci.SshNet.Session.Connect()
   w Renci.SshNet.BaseClient.Connect()
   w OptimoKurierService.Jobs.MainJob.<Execute>d__0.MoveNext()
2020-03-13 17:55:30.5240|ERROR|Renci.SshNet.Common.SshOperationTimeoutException: Socket read operation has timed out after 30000 milliseconds.
   w Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   w Renci.SshNet.Session.SocketReadLine(TimeSpan timeout)
   w Renci.SshNet.Session.Connect()
   w Renci.SshNet.BaseClient.Connect()
   w OptimoKurierService.Jobs.MainJob.<Execute>d__0.MoveNext()
2020-03-13 18:00:30.5246|ERROR|Renci.SshNet.Common.SshOperationTimeoutException: Socket read operation has timed out after 30000 milliseconds.
   w Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   w Renci.SshNet.Session.SocketReadLine(TimeSpan timeout)
   w Renci.SshNet.Session.Connect()
   w Renci.SshNet.BaseClient.Connect()
   w OptimoKurierService.Jobs.MainJob.<Execute>d__0.MoveNext()
2020-03-13 18:05:30.5096|ERROR|Renci.SshNet.Common.SshOperationTimeoutException: Socket read operation has timed out after 30000 milliseconds.
   w Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   w Renci.SshNet.Session.SocketReadLine(TimeSpan timeout)
   w Renci.SshNet.Session.Connect()
   w Renci.SshNet.BaseClient.Connect()
   w OptimoKurierService.Jobs.MainJob.<Execute>d__0.MoveNext()

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el seguimiento de pila informado a través de Renci.SshNet.Abstractions.SocketAbstraction.Read, Session.Connect y BaseClient.Connect; después, revisa la secuencia de conexión repetida de OptimoKurierService.Jobs.MainJob. Reproduce las conexiones correctas seguidas de tiempos de espera agotados y compara el comportamiento de la biblioteca con el servidor SFTP y las condiciones de red. Se considera completado cuando se determine si el tiempo de espera agotado es un defecto de la biblioteca o un problema de conexión externo.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp
Área
networking
Tipo de issue
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
15/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.