Tests fail intermittently on Windows (appveyor) “OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted” #18548

issue MarcoFalke openend this issue on April 6, 2020
  1. MarcoFalke commented at 8:33 pm on April 6, 2020: member
  2. MarcoFalke added the label Bug on Apr 6, 2020
  3. hebasto commented at 11:03 pm on April 7, 2020: member
  4. MarcoFalke closed this on Apr 13, 2020

  5. deadalnix referenced this in commit dff6b6a293 on Sep 22, 2020
  6. ryanofsky commented at 12:36 pm on September 21, 2021: member

    I saw a new instance of this OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted opening a connection in https://cirrus-ci.com/task/5711752030584832?logs=functional_tests#L2626 in #22937.

    It looks like the fix that was implemented for this previously tries to get around the problem by retrying the connection, but I guess this may not be effective depending on what the cause of the problem is. From a google search, it seems like maybe another way to prevent this may be to increase “dynamic port range”. From https://help.socketlabs.com/docs/how-to-fix-error-only-one-usage-of-each-socket-address-protocolnetwork-addressport-is-normally-permitted

    If you see the error, “Only one usage of each socket address (protocol/network address/port) is normally permitted” in the logs when a connection is being made, it means that you are exhausting all the available network ports on the machine. By default the OS only has around 4000 ports available that are not reserved by the system. What happens is that when any network connection is closed it goes into a TIME_WAIT state for 240 seconds and cannot be reused until this wait state is over.

    You can fix this by modifying the below values.

    1. One of the ways is to increase the dynamic port range. The max by default is 5000. You can set this up to 65534.
  7. MarcoFalke reopened this on Sep 21, 2021

  8. MarcoFalke added the label Tests on Sep 21, 2021
  9. ryanofsky commented at 4:27 pm on September 21, 2021: member
    I wonder if this is happening more frequently? Here is another case: https://cirrus-ci.com/task/4904963898867712?logs=functional_tests#L2583
  10. PastaPastaPasta referenced this in commit 086f9346fd on Sep 25, 2021
  11. darosior commented at 7:19 am on September 25, 2021: member
    Encountered this in #23074 (comment) too
  12. MarcoFalke referenced this in commit 747f91c0a3 on Sep 25, 2021
  13. MarcoFalke closed this on Sep 25, 2021

  14. PastaPastaPasta referenced this in commit af79508f7e on Sep 28, 2021
  15. kittywhiskers referenced this in commit 37b812c370 on Oct 12, 2021
  16. DrahtBot locked this on Oct 30, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me