Getaddrinfo ENOTFOUND mainnet.infura.io

I have been experiencing this same error when deploying smart contracts all week with Rinkeby and Ropsten. I was hoping I wouldn’t experience the same thing with Mainnnet because I have multiple smart contacts to deploy but unfortunately this happened almost immediately on the first attempt so the migration didnt finish and now I think .7Eth is down the drain.

I’m using truffle to deploy using my infura keys. Like I said, this has happened now on Mainnet, Rinkey, and Ropsten. I’m terrified to deploy the rest of the contacts because if another one fails I will not have enough funds to continue. Can anybody please provide some guidence here?

hi @ghostalpha, I’d first make sure that there’s no dns issue, try to run “dig mx mainnet.infura.io” from the same machine you’re trying to deploy. This thread has also some useful solutions:

1 Like

I am getting similar issue while deploying in local to testnetwork…

FetchError: request to https://bafybeig7hnm4roh52ilx53qh5jlwxtiye5xp47cexzzx77pp7jep6idpti.ipfs.infura-ipfs.io/ failed, reason: getaddrinfo ENOTFOUND bafybeig7hnm4roh52ilx53qh5jlwxtiye5xp47cexzzx77pp7jep6idpti.ipfs.infura-ipfs.io

Hi :wave: @dammiee, make sure you switched your requests from GET to POST.

1 Like