Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. QA Testing
  3. Question
QA Testing

EAI_AGAIN errors when pushing or running unit tests in a newly created scratch org from Jenkins CI using SFDX

Asked by Ben Butler Jul 9, 2021 1.4K views 1 answer
Share

About this question

We sometimes get this error reported from a sfdx force:source:push of a largish code base: ERROR: Error: getaddrinfo EAI_AGAIN nosoftware-momentum-7459-dev-ed.cs9.my.salesforce.com:443 some six and a half minutes into the push. The push starts about 20 seconds after the sfdx force:org:create that creates the scratch org has completed. We are running Jenkins Pipeline CI on AWS.Some Googling suggests this EAI_AGAIN error (coming from Node.js that sfdx runs on) means: Temporary failure in name resolution Has anyone found a workaround for this? Note we are running on AWS. PS We are using parallel pipelines and running many builds at once: does this error get generated when the DNS service is overloaded with requests? PPS From the AWS docs this might be relevant: Each Amazon EC2 instance limits the number of packets that can be sent to the Amazon-provided DNS server to a maximum of 1024 packets per second per network interface. This limit cannot be increased.

More... Interesting to see some explicit checking for this error in yarn.js:

async exec(args = []) { ... try { await this.fork(this.bin, args, options); debug('done'); } catch (err) { // TODO: https://github.com/yarnpkg/yarn/issues/2191 let networkConcurrency = '--network-concurrency=1'; if (err.message.includes('EAI_AGAIN') && !args.includes(networkConcurrency)) { debug('EAI_AGAIN'); return this.exec(args.concat(networkConcurrency)); } else throw err; } }

Your answer

1 Answer

More QA Testing discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest QA Testing Blogs

Guides, tips and career advice on QA Testing from JanBask experts.