0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

iperf3でサーバを起動しているのにConnection refusedになる

Posted at

状況

AWS EC2環境にiperfサーバを立ててローカルWindows PCからパケットロス率を計測しようとしたら以下のエラーで接続できない現象が発生した

iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Connection refused

原因

サーバ側で間違えてバージョン2系をインストールしていた

誤)Amazon Linux 2023 でバージョン2系が入る

sudo yum install iperf

正)Amazon Linux 2023 でバージョン3系が入る

sudo yum install iperf3

確認したこと

  • ps ax | grep iperf でサーバが起動していることを確認
  • netstat -an で5001がLISTENしていることを確認
  • セキュリティグループで外部からの接続が許可されていることを確認
  • クライアント側PowerShellで Test-NetConnection X.X.X.X -Port 5001 して該当ポートにTCPで接続できることを確認
  • クライアント側 iperf3 -c X.X.X.X -p 5001 とポート指定するとエラーメッセージが iperf3: error - control socket has closed unexpectedly と変わる
  • その時サーバ側では read tcp test info failed: Resource temporarily unavailable のログが出る

単純な間違いのわりにエラーメッセージが分かりづらくて解決に時間が掛かったので記録しておきます

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?