forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
474 stars 77 forks source link

Metadata API request failed : request to **** /Soap/m/60./ Failed,reason :connect ECONNREFUSED 22.113.58.131:8080 #2919

Open Tanvidh opened 3 weeks ago

Tanvidh commented 3 weeks ago

Note Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

Steps To Reproduce

Getting error while running command sf project deploy validate -l RunSpecifiedTests -t prompt_lex_c_PriorityPrompts_Test -x "delta-source/package/package.xml" --target-org *** -w 180 --json

IMPORTANT Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue. We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

Expected result

Validation successful

Actual result

Error: MetadataTransferError: Metadata API request failed: request to https://buk-b2b--bbcrmdev12.sandbox.my.salesforce.com/services/Soap/m/61.0 failed, reason: connect ECONNREFUSED 22.113.58.131:8080 at MetadataApiDeploy.pollStatus (/apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/client/metadataTransfer.js:72:27) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async DeployMetadataValidate.run (file:///apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-deploy-retrieve/lib/commands/project/deploy/validate.js:174:24) at async DeployMetadataValidate._run (/apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:311:22) at async Config.runCommand (/apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:433:25) at async run (/apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:92:16) DUE TO: FetchError: request to https://buk-b2b--bbcrmdev12.sandbox.my.salesforce.com/services/Soap/m/61.0 failed, reason: connect ECONNREFUSED 22.113.58.131:8080 at ClientRequest. (/apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/node-fetch/lib/index.js:1501:11) at ClientRequest.emit (node:events:532:35) at onerror (/apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/https-proxy-agent/node_modules/agent-base/dist/src/index.js:117:21) at callbackError (/apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli/node_modules/https-proxy-agent/node_modules/agent-base/dist/src/index.js:136:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

System Information

{ "architecture": "linux-x64", "cliVersion": "@salesforce/cli/2.45.6", "nodeVersion": "node-v22.2.0", "osVersion": "Linux 4.18.0-513.24.1.el8_9.x86_64", "rootPath": /apps/external/4/downloaded_tools/.nvm/versions/node/v22.2.0/lib/node_modules/@salesforce/cli, "shell": "ksh", "pluginVersions": [ "@oclif/plugin-autocomplete 3.1.2 (core)", "@oclif/plugin-commands 4.0.2 (core)", "@oclif/plugin-help 6.1.0 (core)", "@oclif/plugin-not-found 3.2.2 (core)", "@oclif/plugin-plugins 5.2.2 (core)", "@oclif/plugin-search 1.1.1 (core)", "@oclif/plugin-update 4.3.3 (core)", "@oclif/plugin-version 2.2.2 (core)", "@oclif/plugin-warn-if-update-available 3.1.4 (core)", "@oclif/plugin-which 3.2.1 (core)", "@salesforce/cli 2.45.6 (core)", "apex 3.1.14 (core)", "auth 3.6.17 (core)", "data 3.4.3 (core)", "deploy-retrieve 3.8.4 (core)", "info 3.3.4 (core)", "limits 3.3.10 (core)", "marketplace 1.2.10 (core)", "org 4.1.19 (core)", "packaging 2.4.5 (core)", "schema 3.3.10 (core)", "settings 2.3.0 (core)", "sobject 1.4.8 (core)", "source 3.3.21 (core)", "telemetry 3.3.12 (core)", "templates 56.2.9 (core)", "trust 3.7.4 (core)", "user 3.5.11 (core)" ] }

Additional information

github-actions[bot] commented 3 weeks ago

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

github-actions[bot] commented 3 weeks ago

Hello @Tanvidh :wave: None of the versions of sf you shared match the latest release.

Shared: 2.44.8 Latest: 2.45.6

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue. You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

Tanvidh commented 3 weeks ago

Still the same issue

Tanvidh commented 3 weeks ago

Hi any update on this?

shetzel commented 3 weeks ago

You have something in your environment blocking access to the metadata API endpoint: https://buk-b2b--bbcrmdev12.sandbox.my.salesforce.com/services/Soap/m/61.0

If you are using a proxy or firewall please reference this doc for proper configuration: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli_firewall.htm

Tanvidh commented 2 weeks ago

Hi @shetzel , Previously it was working fine with SFDX CLI.I have set HTTP_PROXY and HTTPS_PROXY already. For eg: export HTTPS_PROXY = Do I need to add any more environment variables for this?

shetzel commented 2 weeks ago

If you are behind a proxy the configuration docs are at the link I posted. I would set all 4 env vars (upper and lowercase).

If it was previously working then something was changed in your environment related to proxies or firewalls. Running sf doctor in that environment will probably report the same thing.

Tanvidh commented 2 weeks ago

Hi @shetzel , All environment variables are added.pleae find the details. image001

And this issue is intermittent.Like out of 10 it comes for 5-6 times.

shetzel commented 1 week ago

Those proxy env vars look correct. You should consider using the LTS version of NodeJS since using the current latest is not recommended for production apps (i.e., the Salesforce CLI) per NodeJS documentation. However, since this is an intermittent error I suspect your network might be the issue. If after switching to NodeJS v20.15.0, which is the latest LTS version you are still experiencing intermittent errors I would work with your networking team to inspect the traffic to see if there is a problem with either the proxies or something else in the Network. A tool such as WireShark might come in handy.