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

WinRM connection error after ~25 mins of running provisioner #24408

Closed
johnkratos opened this issue Mar 19, 2020 · 4 comments
Closed

WinRM connection error after ~25 mins of running provisioner #24408

johnkratos opened this issue Mar 19, 2020 · 4 comments
Labels
bug provisioner/winrm v0.12 Issues (primarily bugs) reported against v0.12 releases

Comments

@johnkratos
Copy link

johnkratos commented Mar 19, 2020

Terraform Version

_Terraform -v_
Terraform v0.12.0
+ provider.aws v2.53.0
+ provider.null v2.1.2
+ provider.template v2.1.2


...

Terraform Configuration Files

...

Debug Output

Crash Output

Expected Behavior

Terraform run should have finished

Actual Behavior

Terraform spits out this error message after ~25 mins into the provisioner:

null_resource.post_config: Still creating... [24m1s elapsed]
null_resource.post_config: Still creating... [24m11s elapsed]
null_resource.post_config: Still creating... [24m21s elapsed]

Error: error executing "C:/Temp/terraform_2114901051.cmd": unknown error Post http://10.245.162.87:5985/wsman: read tcp 10.245.160.198:53154->10.245.162.87:5985: wsarecv: An existing connection was forcibly closed by the remote host.

Steps to Reproduce

Run a Terraform script that makes a connection via WinRM to the provisioned instance.
That script needs to run longer than ~25 mins after making the connection.

Additional Context

I used to be able to complete TF runs without any issues. After upgrading to TF v 0.12 I started getting errors when running provisioners over WinRM when the run goes over ~25 mins.

Is there a timeout that is being set somewhere for TF v0.12?

My terraform run consists of running a set of chef recipes on the provisioned node. I don't see this issue with connections over SSH for Linux boxes I provision.

References

@jbardin jbardin added provisioner/winrm bug v0.12 Issues (primarily bugs) reported against v0.12 releases labels Mar 19, 2020
@dhekimian
Copy link

@johnkratos We were seeing a bunch of WinRM issues after upgrading to 0.12.x earlier this year from 0.11.x. After trying to reproduce the issue with newer Terraform builds, we found that we are unable to reproduce them starting with 0.12.26.

#22006 (comment)

Try 0.12.26 or newer to see if this is still an issue.

@dhekimian
Copy link

We're on Terraform v1.2.5 and haven't seen this issue since we upgraded to 0.12.26.

I suggest closing this.

@crw
Copy link
Collaborator

crw commented Jul 27, 2022

Thanks for the update and all the testing, we very much appreciate it! Based on your results I shall follow your suggestion and close this issue.

@crw crw closed this as completed Jul 27, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug provisioner/winrm v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

No branches or pull requests

4 participants