You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: failure in rpc_getdescriptorinfo.py (OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted)
#25765
Open
fanquake opened this issue
Aug 1, 2022
· 5 comments
238/246 - rpc_getdescriptorinfo.py failed, Duration: 1 s
stdout:
2022-08-01T13:12:51.831000Z TestFramework (INFO): Initializing test directory C:\Users\ContainerAdministrator\AppData\Local\Temp\test_runner_₿_🏃_20220801_121834\rpc_getdescriptorinfo_6
2022-08-01T13:12:52.490000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\test_framework.py", line 133, in main
self.run_test()
File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\rpc_getdescriptorinfo.py", line 38, in run_test
self.test_desc('pkh(02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5)', isrange=False, issolvable=True, hasprivatekeys=False)
File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\rpc_getdescriptorinfo.py", line 23, in test_desc
info = self.nodes[0].getdescriptorinfo(desc)
File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\coverage.py", line 49, in __call__
return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\authproxy.py", line 142, in __call__
response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\authproxy.py", line 107, in _request
self.__conn.request(method, path, postdata, headers)
File "C:\Python39\lib\http\client.py", line 1257, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Python39\lib\http\client.py", line 1303, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Python39\lib\http\client.py", line 1252, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Python39\lib\http\client.py", line 1012, in _send_output
self.send(msg)
File "C:\Python39\lib\http\client.py", line 952, in send
self.connect()
File "C:\Python39\lib\http\client.py", line 923, in connect
self.sock = self._create_connection(
File "C:\Python39\lib\socket.py", line 843, in create_connection
raise err
File "C:\Python39\lib\socket.py", line 831, in create_connection
sock.connect(sa)
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
2022-08-01T13:12:52.568000Z TestFramework (INFO): Stopping nodes
The text was updated successfully, but these errors were encountered:
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted is unrelated to the this test being run. It happens on windows all the time.
# Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted".
@sipsorcery any chance you can weigh in here? Can we improve this workaround in some way?
I have dealt with socket address in use problems on Windows in the past (the SIP prefix in sipsorcery refers to the communications signalling protocol). The problem I had was TCP sockets not closing DESPITE correctly calling the socket close/shutdown methods and even closing the owning process. Windows seems to ang on to the socket entry in some internal table and prevent the same, or a new, process from being able to reuse it for varying amounts of time (I recall it being up to 2 minutes but am probably wrong).
The approach I used, and that is still used in my SIP library today is to set the SO_REUSEADDR on TCP sockets that rely on a well known port.
I haven't looked at the code for the test mentioned in this issue, and wouldn't know how to set socket options in Python, but if it's easy to do it may be worth setting that socket option. It could cause other problems, if multiple tests are actually attempting to use the same socket, but if that was the case it should result in the same error on other OS's as well.
DrahtBot
changed the title
test: failure in rpc_getdescriptorinfo.py
test: failure in rpc_getdescriptorinfo.py (OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted)
Jan 24, 2024
https://cirrus-ci.com/task/5258208494223360:
The text was updated successfully, but these errors were encountered: