Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect timeout after ~30 minutes of activity #320

Open
sy6sy2 opened this issue Jun 1, 2021 · 1 comment
Open

Connect timeout after ~30 minutes of activity #320

sy6sy2 opened this issue Jun 1, 2021 · 1 comment

Comments

@sy6sy2
Copy link

sy6sy2 commented Jun 1, 2021

Context: A Python script that use pywinrm to open a WinRM session on a remote Windows host. Once the WinRM session is open the script send continuously PowerShell command to explore the remote hard drive and retrieve each directory listing.

I use ntlm transport. My client is macOS and the remote Windows host is Windows 7 SPI with Powershell 5.1.

Problem: After ~30 minutes of run the run_ps that I use to get the directory listing failed with this error message:

ConnectTimeout(MaxRetryError("HTTPConnectionPool(host='192.168.1.42', port=5985): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f06380c1430>, 'Connection to 192.168.1.42 timed out. (connect timeout=30)'))

I can reproduce this issue each time.

Is the WinRM session has a kind of maximum time? I don't think so...

This is not an idle timeout issue because the last working run_ps command is only 1 second before the one that produce the time out issue.

Thank you for the help.

@INI-MED
Copy link

INI-MED commented Nov 3, 2021

Hi, i have the similar issue with establishing connection on windows host. If u find any solution please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants