Skip to content

Deployment fails with "socket hang up" during WebDAV upload from Jenkins environment #620

Description

@imollm

Describe the bug

b2c code:deploy fails during the WebDAV cartridge upload step when executed from a corporate Jenkins environment. The deployment starts correctly and the ZIP upload request is sent to the Salesforce Commerce Cloud sandbox, but the connection is unexpectedly reset by the remote endpoint before the operation completes.

The same deployment may succeed when retried, suggesting a network-related interruption, proxy/load balancer timeout, or an issue handling long-running upload operations between Jenkins and the sandbox.

Command and output

Please run the failing command with debug or trace logging and include the output:

b2c code:deploy --debug
# or for maximum verbosity
b2c code:deploy --log-level trace
Debug output
[14:18:38.489] DEBUG: [WebDAV REQ] PUT https://bfhq-007.my.commercecloud.salesforce.com/on/demandware.servlet/webdav/Sites/Cartridges/_sync-1786025879151.zip
    command: "code:deploy"
    method: "PUT"
    url: "https://XXX-XXX.my.commercecloud.salesforce.com/on/demandware.servlet/webdav/Sites/Cartridges/_sync-1786025879151.zip"

[14:18:39.438] ERROR: Deployment failed: HTTPS request to XXX-XXX.my.commercecloud.salesforce.com failed: the connection was reset (socket hang up). The server, proxy, or load balancer closed the connection unexpectedly. This often happens when the sandbox is processing a long-running operation server-side (e.g., code activation) or when a network intermediary drops an idle connection. Retrying may succeed.

    command: "code:deploy"

 › Error: Deployment failed: HTTPS request to
 › bfhq-007.my.commercecloud.salesforce.com failed: the connection was reset
 › (socket hang up). The server, proxy, or load balancer closed the
 › connection unexpectedly. This often happens when the sandbox is processing
 › a long-running operation server-side (e.g., code activation) or when a
 › network intermediary drops an idle connection. Retrying may succeed.

Environment

  • b2c-cli version: (please fill in output from b2c --version)
  • Node.js version: (please fill in output from node --version)
  • OS: Jenkins corporate agent (Linux)
  • Deployment target: Salesforce Commerce Cloud Sandbox (bfhq-007)

Additional context

  • The issue occurs only when deploying from a corporate Jenkins environment.
  • The failure happens during the WebDAV PUT request used to upload the cartridge ZIP.
  • The connection is reset almost immediately after the upload request is initiated.
  • Error message suggests that the connection is being closed by the server, a proxy, or a load balancer.
  • Retries may sometimes succeed.
  • It would be helpful to know if there are any known timeout, keep-alive, upload-size, proxy, or WebDAV-related limitations that could trigger this behavior in b2c-cli.
  • Deploys to STG and DEV are OK.

Expected behavior

The cartridge ZIP should be uploaded successfully and the deployment should complete without the connection being reset.

Actual behavior

The deployment fails with:

socket hang up

during the WebDAV upload step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions