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

Socket hang up #430

Closed
salesforc opened this issue Jun 4, 2020 · 8 comments
Closed

Socket hang up #430

salesforc opened this issue Jun 4, 2020 · 8 comments
Labels
more information required Issue requires more information or a response from the customer

Comments

@salesforc
Copy link

ERROR: Error: socket hang up
{
"status": 1,
"name": "Error",
"message": "socket hang up",
"exitCode": 1,
"commandName": "SourcePushCommand",
"stack": "Error: socket hang up\n at createHangUpError (_http_client.js:323:15)\n at TLSSocket.socketOnEnd (_http_client.js:426:23)\n at TLSSocket.emit (events.js:194:15)\n at endReadableNT (_stream_readable.js:1125:12)\n at process._tickCallback (internal/process/next_tick.js:63:19)\nOuter stack:\n at Function.wrap (C:\Users\703239717\AppData\Local\sfdx\node_modules\salesforce-alm\node_modules\@salesforce\core\lib\sfdxError.js:151:27)\n at SourcePushCommand.catch (C:\Users\703239717\AppData\Local\sfdx\node_modules\salesforce-alm\dist\ToolbeltCommand.js:246:46)",
"warnings": []

@salesforc
Copy link
Author

Please look into it

@smaddox-sf
Copy link

Hi @salesforc - Can you please include more detail?

  • Steps to reproduce:
  • Expected result:
  • Actual Result:
  • VS Code Version:
  • SFDX CLI Version:
  • OS and version:

@lcampos lcampos transferred this issue from forcedotcom/salesforcedx-vscode Jun 5, 2020
@clairebianchi clairebianchi added the more information required Issue requires more information or a response from the customer label Jul 17, 2020
@clairebianchi
Copy link
Collaborator

@salesforc please provide steps to reproduce using the dreamhouse sample repo or provide us with a repository where you are facing this issue.

@no-response
Copy link

no-response bot commented Jul 24, 2020

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.

@no-response no-response bot closed this as completed Jul 24, 2020
@dieffrei
Copy link

@clairebianchi Hi Claire, I saw many stories that are related to the same topic were closed due to the lack of response, (like this #1417)
I think is something very difficult to reproduce, since I guess is not related to CLI but the server It is random, just happens for 2..3 hours... but it can impact all pipelines.
It's something very important to handle this properly in the plugin, cause our pipelines have been broken many times during the year randomly.

@mshanemc
Copy link
Contributor

@dieffrei since this issue, we've added workarounds for the CLI to better handle these on some of the long-polling operations like org creation and metadata deploy/retrieve.
https://github.com/forcedotcom/sfdx-core/blob/d6af541a58aa6dd0522ed4f09a4d5927ddf98954/src/status/pollingClient.ts#L68

For some of the one-request, one-response places, we are trying to figure out the best way to enable retries for all these network problems in jsforce.

@dieffrei
Copy link

dieffrei commented Nov 10, 2022

@mshanemc thank you for the quick response.
We were investigating in our GitLab runners if there is any network latency issue, but it seems related to salesforce/sfdx-cli.
It is very critical because it literally blocks our teams to work.
Since yesterday a lot of our pipelines to build scratch orgs got broken due to errors on package installation:

Do you have any suggestions, on how we could speed it up? Shall I open a salesforce case?
Best regards

Failed to execute scripts for [email protected] with alias SO1 due to { "status": 1, "name": "Fetch", "message": "request to https://enterprise-force-1253.scratch.my.salesforce.com/services/data/v56.0/tooling/sobjects/PackageInstallRequest/0Hf5r00000056BHCAY failed, reason: socket hang up", "exitCode": 1, "context": "PackageInstallCommand", "stack": "Fetch: request to https://enterprise-force-1253.scratch.my.salesforce.com/services/data/v56.0/tooling/sobjects/PackageInstallRequest/0Hf5r00000056BHCAY failed, reason: socket hang up\n at Function.wrap (/usr/local/share/.config/yarn/global/node_modules/@salesforce/core/lib/sfError.js:84:25)\n at PackageInstallCommand.catch (/usr/local/share/.config/yarn/global/node_modules/salesforce-alm/dist/ToolbeltCommand.js:255:44)\n at async PackageInstallCommand._run (/usr/local/share/.config/yarn/global/node_modules/@salesforce/command/lib/sfdxCommand.js:106:13)\n at async Config.runCommand (/usr/local/share/.config/yarn/global/node_modules/@oclif/core/lib/config/config.js:272:25)\n at async run (/usr/local/share/.config/yarn/global/node_modules/@oclif/core/lib/main.js:76:5)\nCaused by: FetchError: request to https://enterprise-force-1253.scratch.my.salesforce.com/services/data/v56.0/tooling/sobjects/PackageInstallRequest/0Hf5r00000056BHCAY failed, reason: socket hang up\n at ClientRequest.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/node-fetch/lib/index.js:1491:11)\n at ClientRequest.emit (events.js:400:28)\n at TLSSocket.socketOnEnd (_http_client.js:499:9)\n at TLSSocket.emit (events.js:412:35)\n at endReadableNT (internal/streams/readable.js:1333:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)", "warnings": [], "commandName": "PackageInstallCommand" }

@MaciekLeks
Copy link

MaciekLeks commented Dec 11, 2023

Are there any updates on this issue? We face it every day, sometimes more, sometimes less. It's become the most constant thing in our system. Now, the problem is even bigger. We also use a Squid proxy with parent-child setup. Here's what we noticed and what might be causing it:

  1. The server sends empty TLS messages, and some clients might read EOF as TCP RST.
  2. A standard node client without good agent (e.g. global-agent) can't handle the RST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

6 participants