error: "Metadata API request failed: The org cannot be found" - sfdx is making too many DNS requests.
Issue #2271
resolved
I get error when retrieving metadata from org:
{
...
"status": 1.0,
"name": "MetadataTransfer",
"message": "Metadata API request failed: The org cannot be found",
"exitCode": 1.0,
"context": "Retrieve",
...
"stack": "MetadataTransferError: Metadata API request failed: The org cannot be found\n at MetadataApiRetrieve.pollStatus (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/client/metadataTransfer.js:83:27)\n at async Retrieve.retrieve (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-source/lib/commands/force/source/retrieve.js:106:31)\n at async Retrieve.run (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-source/lib/commands/force/source/retrieve.js:31:9)\n at async Retrieve._run (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/command/lib/sfdxCommand.js:102:40)\n at async Config.runCommand (/usr/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:272:25)\n at async run (/usr/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/main.js:74:5)\nDUE TO:\nDomainNotFoundError: The org cannot be found\n at Messages.createError (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/messages.js:446:16)\n at Connection.isResolvable (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/org/connection.js:229:28)\n at async Connection.retrieveMaxApiVersion (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/org/connection.js:187:9)\n at async getConnectionNoHigherThanOrgAllows (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/client/metadataTransfer.js:216:27)\n at async MetadataApiRetrieve.checkStatus (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/client/metadataApiRetrieve.js:110:28)\n at async MetadataApiRetrieve.poll (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/client/metadataTransfer.js:158:31)\n at async doPoll (/usr/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/status/pollingClient.js:60:26)",
...
}
I know that this org exist, and i can access it using sfdx commands.
Reason : SFDX is making too many DNS request and DNS server may stop resolving SF addresses.
Solution in command line
export SFDX_DISABLE_DNS_CHECK=true
or run
SFDX_DISABLE_DNS_CHECK=true sfdx force:mdapi:retrieve .....
There should be option in illuminated cloud to do the same…
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Resolving as this is a host environment configuration issue and not an IC2 issue.
- Log in to comment
Hi. IC2 runs the CLI using the environment inherited from the host JetBrains IDE. You can adjust for this by setting that environment variable globally and restarting the JetBrains IDE. It will then be propagated down to the CLI processes executed by IC2.