Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Bad file descriptor is the operating system’s EBADF error attached to an iperf3 failure. It means a local iperf3 process tried to use a descriptor that was not valid for that operation; by itself, it does not show that the remote host, firewall, cable, or network is at fault. Start with the complete output, identify the operation named before the colon, and compare what the client and server logged.
What “Bad file descriptor” means in iperf3
The text after the colon is EBADF, an operating-system error. The words before it identify the operation that failed, such as sending a control message, reading a stream socket, or calling select(). Those stages involve different descriptors, so the suffix alone cannot identify the cause.
A prior error may also matter: cleanup after an earlier failure can close a descriptor, and a later code path may then try to use it. Read the log from the beginning rather than treating the final line as a complete diagnosis.
What to check first
- Capture both endpoints’ complete output. Include the lines before the final error, and note whether each message came from the client or server. One endpoint’s failure may trigger a different message at the other.
- Identify the failed operation. Read the text before
Bad file descriptor. A control-message write, stream-socket read, cookie reception, andselect()failure are not interchangeable. - Verify the server and port. Confirm that iperf3 is running on the server and listening on the port the client targets. Debian bug #972109 describes a connection attempt to a non-running server with Debian’s iperf3 package version 3.9-1; the client reported “unable to send control message: Bad file descriptor.” The report also noted that an earlier version gave clearer connection-refused wording. This is a version-specific historical example, not proof that every such error means the server is down. Read Debian bug #972109.
- Record the test context. Note both iperf3 versions, the selected transport, how long the test ran, and whether it used unusual duration or traffic conditions. These details help distinguish unlike failures.
How to interpret common messages
unable to send control message: Bad file descriptor
The failed operation was a control-message write using a local descriptor. Check earlier output, server availability, and the state of the control connection at both endpoints. The message does not by itself implicate the network.
#1 Best Overall
- Multifunctional Network Cable Tester: TESMEN TLP-123A Supports RJ45 and RJ11, enabling rapid detection of line connectivity, short circuits, open circuits, miswiring, and cable shielding status. An essential tool for troubleshooting line faults and network maintenance, it effectively boosts your work efficiency
- Convenient and Efficient: Featuring one-button operation and a test speed adjustment gear on the main control unit for enhanced flexibility. Clear LED indicators provide intuitive test result displays, making it easy for both professionals and home users to operate
- Portable and Durable: Compact and lightweight design for easy portability. Constructed with high-quality plastic housing for robust structure, ensuring both durability and stability. Ideal for home wiring, IT equipment setup, electrical maintenance, and LAN DIY projects
- Detachable design: The main control unit and remote unit can be separated and used independently, allowing you to test both ends of long cables. This makes it ideal for wall-mounted ports, long-distance cabling, or structured cabling systems, perfect for homes, offices, or professional IT environments
- What you will get: 1 * TLP-123A Network Cable Tester, 1 * user manual, 2 * AAA batteries
unable to read from stream socket: Bad file descriptor
A stream-socket read failed. Use the protocol and endpoint logs to establish which stream and stage were involved. In ESnet issue #1852, an SCTP test using iperf 3.1.3 stopped after several intervals; the server logged a stream-read EBADF while the client reported that the control socket had closed unexpectedly. The report does not establish a root cause. Read ESnet iperf issue #1852.
unable to receive cookie at server: Bad file descriptor
This wording identifies cookie reception on an accepted data-stream socket. ESnet issue #1882 records cookie and parameter EBADF messages in a server log for version 3.18. The issue text says the cookie message was also present in 3.15, so it does not confirm a 3.18 regression. Read ESnet iperf issue #1882.
Rank #2
- Multi-Cable Tester: TESMEN TLP-528A Network Cable Tester supports RJ45/RJ11 network cables and telephone lines, quickly detecting line continuity and shielding status; features connector crimping QC check for network maintenance, improving your work efficiency
- Convenient and Efficient: Supports free switching between fast and slow test modes for greater flexibility. Clear LED indicators intuitively display test results, making it easy for both professionals and home users to use
- Portable and Durable: Compact and lightweight design for easy portability. Featuring a high-quality plastic shell and non-slip silicone, its robust structure ensures both durability and stability. Ideal for home wiring, IT equipment setup, electrical maintenance, and LAN DIY projects
- Detachable Design: The main control unit and remote unit can be separated and used independently, allowing you to test both ends of long cables. This makes it ideal for wall-mounted ports, long-distance cabling, or structured cabling systems, perfect for homes, offices, or professional IT environments
- What you will get: 1 TLP-528A with dual RJ11 RJ45 interface, 1 storage box, 1 user manual, 2 * AAA batteries
select failed: Bad file descriptor
A descriptor included in the select() set was rejected; the message does not establish that the descriptor was the control socket. Historical reports show this wording in distinct situations: an iperf 3.2/3.2rc1 long-running test using -t 0 ended after about 15 seconds, with unexpected control-socket closure on the client and a server-side select failure (ESnet issue #645); another report described delayed UDP packets on a constrained, queued link before the server printed the error (ESnet issue #753). These individual cases do not establish a universal cause.
control socket has closed unexpectedly
This message has no errno suffix. Its meaning depends on the endpoint and surrounding state: a client-side empty read indicates end-of-file from the peer, while the server’s read path may also return after a ten-second wait. Correlate it with the other endpoint’s log instead of treating the wording alone as a definitive diagnosis.
Rank #3
- Multi-Function Network Cable Tester: Supports RJ45 (CAT5, CAT5e, CAT6, CAT6A, CAT7) and RJ11 telephone cables. Quickly detects continuity, short circuits, open wires, miswiring, and cable shielding status, ensuring your LAN or phone lines are correctly wired and ready to use.
- Fast/Slow Mode with LED Indicators: Switch between fast and slow scan speeds to identify wiring issues more precisely. LED lights on both master and remote units show wire order, making it easy to spot errors like open pairs or misaligned pins at a glance.
- Split-Type Design for Long-Distance Testing: Master and remote units can be detached and used separately, allowing you to test both ends of a long cable run, ideal for wall-mounted ports, long runs, or structured cabling. Perfect for home, office, or professional IT setups.
- Compact, Lightweight & Durable: Ergonomically designed with sturdy ABS housing, this pocket-sized tester is ideal for on-the-go network engineers, DIYers, and electricians. It’s your go-to toolkit for cable maintenance, upgrades, or new installations.
- Safe & Easy to Use: Simple one-button operation makes testing quick and hassle-free. LED indicators clearly show wiring status, while the G light instantly identifies shielded (FTP/STP) or unshielded (UTP) cables. Supports safe testing of telephone lines with typical voltages under 48-72V, ideal for both home and professional use.
Use reports as examples, not universal explanations
iperf3 error reports cover different versions, transports, test lengths, and endpoint behavior. Debian’s 3.9-1 report concerns a non-running server; the 2017 and 2018 ESnet reports describe different long-running and UDP conditions; the 2025 reports cover an SCTP test with iperf 3.1.3 and server messages in 3.18. They are useful for recognizing possible contexts, but individual reports do not establish prevalence or prove that the same cause applies to a new test.
When sharing a failure for diagnosis, include the full client and server logs, both versions, transport, test duration, and the port used. Those details preserve the distinctions needed to investigate the failed operation.
Quick Recap
Best Value
- Cable tester with single button testing of RJ11, RJ12 and RJ45 terminated voice and data cables
- Tests CAT3, CAT5e and CAT6/6A cables
- Fast LED responses indicate cable status (Pass, Miswire, Open-Fault, Short-Fault, and Shield)
- Test remote stores securely in tester body
- Compact tester easily fits in your pocket
Rank #4
- The LAN cable tester can test both of the RJ11 telephone cable and RJ45 network cables such as RJ45 Cat5 Cat6 Cat7. Built-in high performance chip, which provide faster test results when checking wires and data points.
- The network provides the verification detail of wires to ensure that your networking is flowing optimally. And it will inform you whether the cables are paired and connected correctly or not.
- The network cable tester features a nice LED display which indicates. And the results that are easy for anyone to understand. It can be used by both professionals and unskilled home-users.
- Note: The cable tester needs a 9-volt battery to function. The battery is not included in the package at the time of purchase.
- If you are not satisfied with this Ethernet cable tester, please feel free to contact us. We will solve all your problems well.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →

