Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Long-lived  `WinRMClient` keeps failing with WSManFault 2150859174 after a terminate Signal fails

Fermée
#196 4 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@NassimBtk y travaille déjà.

Depuis le 8/10/2026.

  • #197 par @NassimBtk — fusionnée

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
java
Domaine
backend

Piste de recherche

Start by reading WsmanClient.terminateCompleted() and the issue’s reproduction steps; the payload does not name a source file or test. Check open pull request #197 before starting, since work is already underway. Done means a failed terminate Signal triggers best-effort shell deletion and clears shellId, while the command result is still returned and the quota-1 reproduction can run another command.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Disclaimer: Although the following content is generated by AI, I have thoroughly reviewed and cleaned it.

Problem

A long-lived WinRMClient used for periodic polling can start failing every command with:

HTTP 500 (WSManFault 2150859174): The WS-Management service cannot process the request. The maximum number of concurrent operations for this user has been exceeded.

It never recovers on its own. Only closing the client and recreating it fixes the problem.

Cause

After a command completes, the client sends a Terminate Signal so the server releases the command's resources. According to [MS-WSMV] 2.2.4.38:

  • http://schemas.microsoft.com/wbem/wsman/1/windows/shell/signal/Terminate
    This control code is sent by the client to acknowledge receipt of the end of the command output from the service and to clean up any resources associated with command execution. Because the service might have to cache this information until it knows that the client has received the entire stream, the client MUST send this before a new command can be executed.

When the server answers that Signal with a fault, WsmanClient.terminateCompleted() ignores it:

} catch (final WinRMFaultException ignored) {
    // The Signal was answered with a fault: the exchange completed, the connection is in
    // sync — and the command's completion is what matters.
}

As a result:

  1. The command is never terminated and keeps holding an operation of the user's quota (MaxConcurrentOperationsPerUser).
  2. The Signal is never retried, and the shell is kept and reused by the next commands.
  3. Each failed Signal leaves one more operation open. Once the quota is full, every Command is refused.
  4. Nothing releases those operations until the shell is deleted, which only happens in  close() .

The failure is swallowed silently, so nothing in the logs shows the Signals failing before the quota errors start.

Reproduction

A FakeWsmanServer with an operation quota of 1 (a counter: +1 per accepted Command, −1 per accepted Terminate Signal, reset on shell Delete):

  1. Poll 1: Create, Command, Receive, then the terminate Signal fails. The poll still returns success.
  2. Poll 2: the Command reuses the same shell and is refused with WSManFault 2150859174.

Proposed Fix

When the terminate Signal fails, delete the shell (best effort) and clear shellId. Deleting the shell releases the command still open in it, and the next command creates a fresh shell. The caller still gets the command's result.

Langage dominant
Java
Étoiles
15
Forks
4
Merge moyen
11 h 58 min
PR mergées (30 j)
20

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de MetricsHub/winrm-java

Toutes les issues de MetricsHub/winrm-java

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.