ccmpbll/cloudflare-speedtest-mqtt

http.client.RemoteDisconnected: Remote end closed connection without response

Closed this issue · 7 comments

Hi,

i am running this docker for weeks now and everything was working fine until yesterday. I got no data in NodeRed or MQTT explorer. Log file of container looks like this:

text error warn system array login

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 276, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/dist-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.9/dist-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 276, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/cfspeedtest", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/cloudflarepycli/main.py", line 35, in main
thedict=thetester.runalltests()
File "/usr/local/lib/python3.9/dist-packages/cloudflarepycli/cloudflareclass.py", line 155, in runalltests
isp=self.getisp(ip)
File "/usr/local/lib/python3.9/dist-packages/cloudflarepycli/cloudflareclass.py", line 85, in getisp
r=requests.get("http://www.ipdatabase.com/ip/"+ip)
File "/usr/local/lib/python3.9/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Running CloudFlare Speedtest...
Sending Data to (192.168.0.5) with no authentication...
Cleaning up for the next run...
Sleeping for 3600 Seconds...

Bildschirmfoto 2023-06-25 um 12 21 33 Bildschirmfoto 2023-06-25 um 12 21 46

Any ideas?

I encountered the same issue yesterday. Look like the culprit is the python package I used. Unfortunately, it doesn't look like that project is being actively maintained, so I've forked it and started working on a solution myself. My current plan is to package everything up in this one project and not rely on any third-party python packages, but we'll see how that goes. I'll drop you another note here once I have something for you to test.

@Rene1695 question for you though... The cloudflarepycli package I used outputs several pieces information alongside the speed test results. Do you use the service_provider output? It looks like the author of that package used a web service to get the details of your WAN IP, including the service provider. I don't find that information useful myself, so I was planning to just remove that functionality. I'd love to hear your feedback.

Hi,

thanks for the reply, glad to hear that someone else has the same problems. I double checked everything and was worried if the error might be on my side :D So there was an update on a specific python package used in this project and that's why things get mixed up now? Interestingly, cause I didn't remember to update my docker container. But cool that you have a look on that and looking for a solution :)

Regarding your question: I personally did not use the service provider info and I did not know in which scenario I would need this information. So I thing you can remove that.

If you need any additional information or help please let me know! :)

Ok great, I'm going to make some changes and repackage cloudflarepycli into something that I can maintain. I'll keep you posted.

@Rene1695 Should be working now, if you want to update your container and test. The changes I made should keep us from having issues like this moving forward.

@ccmpbll can confirm, issue can be closed, working perfectly again :) thank you!

Great, thanks for confirming!