Initializing provider plugins...
- Finding latest version of hashicorp/aws...
- Installing hashicorp/aws v4.30.0...
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/aws v4.30.0: read tcp 192.x.x.x:59493->108.159.15.87:443: wsarecv: An existing
│ connection was forcibly closed by the remote host.
Can i know which server ip is this(108.159.15.87:443)
Hi @tharunkumar2931,
The IP address mentioned in the error message is one of the IP addresses used by the Content Distribution Network (CDN) that serves the official Terraform providers.
If you saw this error just once and then it worked afterwards then I would guess that it was caused by a brief, unexplained system failure at our CDN vendor, and not something to worry about.
If you are seeing this error consistently every time you run terraform init
then I would instead guess that there’s some kind of firewall or other Middlebox on your system or network, intercepting and blocking Terraform CLI from accessing the CDN server.
One way these filtering systems can block outgoing connections that use TLS (HTTPS), even though they cannot see the encrypted data inside the connection, is to generate forged TCP reset packets which pretend to originate from the target server, which would then cause the client to fail with an error message like the one you saw here.
Are you running Terraform on a computer or on a network which has a restrictive firewall or other connection-tampering device? If so, you may need to reconfigure it in some way to permit Terraform to connect to remote servers to download provider plugins and modules.
Again run tf init command it will work, Surely .
Thanks
This is the solution that worked for me. it turns out the provider endpoint was not working when the IP Address is IP v6. It is strange though as if I run the same endpoint from my browser it works.
Solution is simple to disable IP v6.
Details: How to Remove IPv6 from Network Adapter as a Solution for Terraform Init Error
1 Like
This topic was automatically closed after 13 days. New replies are no longer allowed.