Skip to content

fix: enable WinRM retry for transient WSMAN errors#3402

Open
raman1236 wants to merge 1 commit intopuppetlabs:mainfrom
raman1236:fix/winrm-retry-limit
Open

fix: enable WinRM retry for transient WSMAN errors#3402
raman1236 wants to merge 1 commit intopuppetlabs:mainfrom
raman1236:fix/winrm-retry-limit

Conversation

@raman1236
Copy link
Copy Markdown

Description

Enable WinRM retries for transient WSMAN errors by increasing the retry_limit from 1 to 3.

Problem

The WinRM connection in Bolt explicitly sets retry_limit: 1, which effectively disables the automatic retry mechanism provided by the WinRM gem. When a transient WSMAN error occurs (e.g. ERROR CODE: 1018), the connection fails immediately instead of retrying.

The WinRM gem's default retry behavior (3 retries with 10 second delays) is specifically designed to handle these transient errors, but Bolt overrides it.

Fix

Change retry_limit from 1 to 3 and add retry_delay: 10 to match the WinRM gem defaults. This allows the connection to recover from transient WSMAN errors without failing the entire task or plan.

Fixes #3385

Change the WinRM connection retry_limit from 1 (effectively
disabling retries) to 3 with a 10 second delay. This matches
the WinRM gem defaults and prevents bolt plans and tasks from
failing due to transient WSMAN errors (e.g. ERROR CODE: 1018).

Fixes puppetlabs#3385
@raman1236 raman1236 requested review from a team as code owners April 5, 2026 23:58
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

Successfully merging this pull request may close these issues.

Powershell execution fails sometimes with "WSMAN ERROR CODE: 1018" because of switched off retries

2 participants