LoginSignup
0
0

terraform init 実行時に TCPエラー が発生する

Posted at

環境

  • Windows11
  • terraform v1.3.10 (on windows_amd64)

概要

terraform init 実行時、下記の通りエラーが発生しました。providerインストール時、バイナリの取得に失敗しているようです。

│ Error: Failed to install provider
│
│ Error while installing hashicorp/aws v5.38.0: releases.hashicorp.com: Get
│ "https://releases.hashicorp.com/terraform-provider-aws/5.38.0/terraform-provider-aws_5.38.0_windows_amd64.zip": read tcp
│ [240b:12:1dc0:1d10:f407:c2a:b51d:a6f4]:63187->[2600:9000:2219:5e00:5:e2b6:b380:93a1]:443: wsarecv: An existing connection
│ was forcibly closed by the remote host.

対策

エラーメッセージを参考に検索してみると、下記ページに辿り着きました。

You need to disable IP V6 , I think it is not supported, I had similar issue till I disabled IPv6 in my network card, or use a proxy srever.
you can read about it here https://anassblog.vercel.app/post/terraform-init-error/

ipv6 を無効化することで解消するかもよとのことで、ネットワークアダプターのプロパティから、ipv6を無効化することで事象を解消させることが出来ました。

暫定対応感はありますが、同様の事象で困惑している方への参考情報になれば幸いです。

備考

TCPエラーということで、OS や .NET Framework の TLS関連設定 を疑ってみましたが、事象は解消しませんでした。

(※) 下記サイトを参考に試行錯誤しました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0