Network error while checking for updates

What is the problem?
Software update gives this error on every item
What did you already try to solve it?
Manual update, pip re install, reflash of SD, change of DNS
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
Octpi 0.14
Updated to dev -OctoPrint: 1.4.0.dev806+g03d421c trying to solve issue with no help
Pi 3
Network cable plugged directly into main router

All functions work perfectly including accessing Octoprint from outside the network. Installing plugins works perfectly.

1 Like

What error? Also please share your logs, both the application log and the software update log. See

https://discourse.octoprint.org/t/where-can-i-find-octoprints-log-files/299?u=foosel

The error is - Network error while checking for updates, thats exactly what it says on every item. But when you hit check for updates the box pops up and says up to date but they are not.

There's no way to help you unless you share your logs.

I am trying to upload the log but it wont let me I am looking for a alternative upload service

https://drive.google.com/file/d/1YxihGkIl6jSGAziPHVLoA1-KTHQ9QFkU/view?usp=sharing

the only log i see for software update is blank when you open it, is there any other log you would want other then the main one?

Looks like it isn't even trying to start the software update because it's already falling on its face while looking for updates.

Since it requires an SSL connection to the Github servers to work for that, I suggest to check item 1 and 3 here:

https://discourse.octoprint.org/t/i-cant-install-any-plugins-from-the-repository-it-is-unreachable/178

but instead of testing if you can reach plugins.octoprint.org to test if you can reach api.github.com. Also check and provide what output a

~/oprint/bin/python -c "import requests; r=requests.get('https://api.github.com'); print(repr(r))"

produces.

Set time to UTC and verified time

Pinging all three locations come out good

pi@octopi:~ $ pi@octopi:~ $ ~/oprint/bin/python -c "import requests; r=requests.get('https://api.github.com'); print(repr(r))"
-bash: pi@octopi:~: command not found
pi@octopi:~ $ Traceback (most recent call last):
-bash: syntax error near unexpected token `most'
pi@octopi:~ $   File "<string>", line 1, in <module>
-bash: syntax error near unexpected token `newline'
pi@octopi:~ $   File "/home/pi/oprint/local/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/api.py", line 72, in get
-bash: File: command not found
pi@octopi:~ $     return request('get', url, params=params, **kwargs)
-bash: syntax error near unexpected token `('
pi@octopi:~ $   File "/home/pi/oprint/local/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/api.py", line 58, in request
-bash: File: command not found
pi@octopi:~ $     return session.request(method=method, url=url, **kwargs)
-bash: syntax error near unexpected token `('
pi@octopi:~ $   File "/home/pi/oprint/local/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/sessions.py", line 508, in request
-bash: File: command not found
pi@octopi:~ $     resp = self.send(prep, **send_kwargs)
-bash: syntax error near unexpected token `('
pi@octopi:~ $   File "/home/pi/oprint/local/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/sessions.py", line 618, in send
-bash: File: command not found
pi@octopi:~ $     r = adapter.send(request, **kwargs)
-bash: syntax error near unexpected token `('
pi@octopi:~ $   File "/home/pi/oprint/local/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/adapters.py", line 506, in send
-bash: File: command not found
pi@octopi:~ $     raise SSLError(e, request=request)
-bash: syntax error near unexpected token `('
pi@octopi:~ $ requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),))
-bash: syntax error near unexpected token `('
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),))

You are definitely getting an SSL certificate validation error though, just as I feared. If the date and time are indeed correct then I'm unsure right now how best to narrow the cause of this down further. Maybe someone else has an idea.

Yha i just read that at the bottom, at least i am closer to the issue

Got it - It was a DNS error on the Pi, I ran int the same issue on a Pi running Pi-Star on a friend of mines network. Even tho Octoprint's connectivity setting is checking 8.8.8.8 it was using 192.168.1.1 and falling flat on it's face.

I did the following to it

I edited

/etc/network/interfaces

to add

dns-nameservers 8.8.4.4 208.67.222.222

And software update is working now

running your command above now equals

<Response [200]>

I think it is a Netgear router issue with Raspberry Pi's since his issue started when he changed to one and I am running the same model since last year.

2 Likes

Perfect! Don't forget to mark your answer as the solution so others facing the same issue might find it easily.

For anyone stumbling upon this thread, I had a similar problem and it was due to a PiHole on my network that was blocking requests to https://codeload.github.com/, as it's commonly used to host malicious software.

Adding that to the whitelist resolved the issue!

2 Likes

Do you know maybe what might be wrong if I get different message?

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pi/oprint/local/lib/python2.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('No status line received - the server has closed the connection',))

Worked for me perfectly! Thank you!

Sorry for reviving an old thread, but I had issues upgrading and adding the line

dns-nameservers 8.8.4.4

is what helped me. Thanks!

Hi@all
I got the same failure when updating to the latest versions.
network failure, please check logs, but I get a green box it would be all up to date

I checked my time and set the DNS-Nameserver to8.8.4.4 208.67.222.222

In the log file SSL failure is mentioned.....


2023-12-27 07:00:16,202 - octoprint.plugins.softwareupdate - INFO - Fetching check overlays from https://plugins.octoprint.org/update_check_overlay.json
2023-12-27 07:00:16,264 - octoprint.plugins.softwareupdate - ERROR - Could not fetch check overlay from https://plugins.octoprint.org/update_check_overlay.json: HTTPSConnectionPool(host='plugins.octoprint.org', port=443): Max retries exceeded with url: /update_check_overlay.json (Caused by SSLError(SSLError(9, '[X509] PEM lib (_ssl.c:4262)')))
2023-12-27 07:00:18,936 - octoprint.server.util.flask - INFO - Passively logging in user Feuer-Fritz from ::ffff:192.168.178.27
2023-12-27 07:00:18,938 - octoprint.access.users - INFO - Logged in user: Feuer-Fritz
2023-12-27 07:00:20,525 - octoprint.server.util.sockjs - INFO - User Feuer-Fritz logged in on the socket from client ::ffff:192.168.178.27
2023-12-27 07:00:21,277 - octoprint.plugins.announcements - ERROR - Could not fetch channel _important from https://octoprint.org/feeds/important.xml
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 402, in ssl_wrap_socket
    context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
ssl.SSLError: [X509] PEM lib (_ssl.c:4262)
.
.
.

Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/plugins/announcements/__init__.py", line 490, in _get_channel_data_from_network
    r = requests.get(url, timeout=3.05)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='octoprint.org', port=443): Max retries exceeded with url: /feeds/octoblog.xml (Caused by SSLError(SSLError(9, '[X509] PEM lib (_ssl.c:4262)')))
2023-12-27 08:43:51,777 - octoprint.plugins.announcements - ERROR - Could not fetch channel _plugins from https://plugins.octoprint.org/feed.xml
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 402, in ssl_wrap_socket
    context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
ssl.SSLError: [X509] PEM lib (_ssl.c:4262)
.
.
.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 1991, in _fetch_repository_from_url
    r = requests.get(repository_url, timeout=3.05)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/home/pi/oprint/lib/python3.9/site-packages/requests/adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='plugins.octoprint.org', port=443): Max retries exceeded with url: /plugins.json (Caused by SSLError(SSLError(9, '[X509] PEM lib (_ssl.c:4262)')))
2023-12-27 09:04:56,184 - octoprint.plugins.softwareupdate - WARNING - Could not check octoprint for updates due to a network error
2023-12-27 09:04:56,246 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk
2023-12-27 09:05:02,490 - octoprint.plugins.softwareupdate - WARNING - Could not check octoprint for updates due to a network error
2023-12-27 09:05:02,556 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk

What is to do now?

Hello @Feuer-Fritz !

This thread is over 5 years old and it is already marked as solved.
Chances are low to get a solution here.

Please open a new thread with all requested information.

Hi and thx:

the new post is here to find:

1 Like