Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iperf3 stops working after a while #61

Open
Booleanac opened this issue Apr 7, 2021 · 4 comments
Open

iperf3 stops working after a while #61

Booleanac opened this issue Apr 7, 2021 · 4 comments

Comments

@Booleanac
Copy link

Hello,

Let me explain the situation. I have a server that periodically sends commands to a bunch of clients (I have written the client and the server code), when the command is sent, the clients perform an iperf test.
The server runs iperf3 servers is separate processes (no python here, just plain terminal window). So the server is fine.
The client is using asyncio to run the code that accepts commands and then runs iper3 test. This works find for a while, but after a week or so, iper3 no longer runs any test. Here is the code for running the iper3 test:

MyFunction(protocol,duration,port):
client=iperf3.Client()
client.duration=int(duration)
client.port=port
client.bind_port=17801
client.server_hostname='IP address of the server machine'
client.protocol=protocol
client.reverse=True
a=client.run()
return a

The current parameter, with which the software runs fine for a while, are - protocol TCP, duration 10.
What happens is after a while, this code does not initiate a test. I can see whether a test is being run on the iperf server, and nothing happens. Not even an initiation of a connection. I can verify the code is running on the client as I have remote access to these client boxes. I use as px and I see the process running. On the same client box, where the script is failing, if I run the iperf3 test from the terminal it works fine, and I can see the test on the server as well.
I used strace on the process, and I get the following exception:

image

This is inline with client.run() not running the test for some reason.
The function above is run by asyncio that is run in the main thread.
I am going to continue troubleshooting, but it would be great if you can help me.

OS-CentOS Linux 7 (Core)
Python3 version Python 3.6.8

@nujo
Copy link

nujo commented Apr 13, 2021

Seems I have the same issue, same os and python version. I've found that after ~12hrs tests stop running and this close_wait status stays forever


[user@vm1~]$ lsof -aP -i4 -i6 -itcp | grep 5201
python3  28741 user1022u  IPv4 4585541      0t0  TCP vm1:53334->vm2:5201 (CLOSE_WAIT)

@Sheng2216
Copy link

I had the same issue on a raspberry pi 4b+ as the client, and it won't print out the result after running for more than 100s, has anyone figured out how to fix this issue?

@tditri
Copy link

tditri commented Mar 2, 2022

I am also having the same issue with the client. After running for more than a 100s, it hangs.

@heath13
Copy link

heath13 commented Apr 21, 2022

I have found that if I include
client.json_output = True
client.duration = 100
Then Iperf3 hangs after the test is performed.

If I remove "client.json_output = True" the Iperf3 test will work for duration 100s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants