Session operation has timed out
Just recently I started having an issue where New-SSHSession will provide "Session operation has timed out" but will run 5 times in a row then not run another x amount of times, then again will run successfully. It is sporadic throughout a 24 hour period. Any thought on how I can get more detail or what the issue might be? It has been running for years without any problems until last week.
This is the command:
Invoke-SSHCommand -SessionId 0 -Command "/export/home/nz/scripts/KillLongRunningQueries.sh LongRunningEmailList" -TimeOut 999999
This is the error on occassion:
Exception calling "BeginExecute" with "0" argument(s): "Session operation has timed out"
At C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.8\Posh-SSH.psm1:377 char:17
-
$Async = $cmd.BeginExecute() -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : SshOperationTimeoutException
This is success that happens on occasion: SessionId Host Connected
0 xxxxxxxxxxxx True
Output : {}
ExitStatus : 0
Error :
Host : xxxxxxxxxxxx
Duration : 00:00:01.3460091
True
It could be a slow connection. I have fount that the library used works great in local area network but depending on congestion and WAN speed it errors out On Oct 2, 2023, at 12:34 PM, strongnet7 @.***> wrote: Just recently I started having an issue where New-SSHSession will provide "Session operation has timed out" but will run 5 times in a row then not run another x amount of times, then again will run successfully. It is sporadic throughout a 24 hour period. Any thought on how I can get more detail or what the issue might be? It has been running for years without any problems until last week. This is the command: Invoke-SSHCommand -SessionId 0 -Command "/export/home/nz/scripts/KillLongRunningQueries.sh LongRunningEmailList" -TimeOut 999999 This is the error on occassion: Exception calling "BeginExecute" with "0" argument(s): "Session operation has timed out" At C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.8\Posh-SSH.psm1:377 char:17
$Async = $cmd.BeginExecute()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : NotSpecified: (:) [], MethodInvocationException FullyQualifiedErrorId : SshOperationTimeoutException
This is success that happens on occasion: SessionId Host Connected
0 xxxxxxxxxxxx True
Output : {} ExitStatus : 0 Error : Host : xxxxxxxxxxxx Duration : 00:00:01.3460091 True
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>