SalesforceCommerceCloud / SalesforceCommerceCloud/b2c-developer-tooling
Deployment fails with "socket hang up" during WebDAV upload from Jenkins environment
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 19
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 33
Description
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
PUTrequest 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the b2c code:deploy entry point and reproduce the WebDAV PUT upload in the corporate Jenkins environment using --debug or --log-level trace. Compare the Jenkins failure with successful STG and DEV deployments, including b2c and Node.js versions, then determine whether the CLI or the proxy, load balancer, or sandbox resets the connection; done should include a confirmed cause and an appropriate fix or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- ci-cd, cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100