[Fixed] I'm having problems updating Octoprint or updating or installing plugins


#1

Update: After trying again and again on updating Octoprint, or install/update Plug-ins, it worked. I guess the Chinese Great Firewall "semi-bans" the servers, making timeouts and packet losses. It's just matter of spend hours clicking on [Close] , [Update , [Close] , [Update] , [Close] , [Update] , [Close] , [Update]... Like a possessed... Thanks for your help and time.

What is the problem?
The situation is that all the tries to install new plugins, update the old ones, or updating OctoPrint, get errors.
I'm living in china, so I suspect the Great Firewall is avoiding me to access to the servers.

What did you already try to solve it?
I was having an error about the version of PIP, so I've fixed, but It's being the same error even with PIP 18.0

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...) The actual version of OctoPi is 0.15.1, and the version of OctoPrint, 1.3.8. I can't figure out where to find the log, so I'll copypaste the status in the update window:

Exception:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 141, in main
status = self.run(options, args)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 299, in run
resolver.resolve(requirement_set)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 283, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 836, in unpack_url
progress_bar=progress_bar
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 673, in unpack_http_url
progress_bar)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 897, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 619, in _download_url
consume(downloaded_chunks)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 844, in consume
deque(iterator, maxlen=0)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 585, in written_chunks
for chunk in chunks:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/utils/ui.py", line 159, in iter
for x in it:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 574, in resp_read
decode_content=False):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 430, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 345, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='codeload.github.com', port=443): Read timed out.
The update did not finish successfully. Please consult <code>octoprint.log</code> and <code>plugin_softwareupdate_console.log</code> for details.

#2

Can you access http://codeload.github.com ?


#3

Yes. I'm using ping.pe to check the flow to codeload.github.com, and specially Jiangsu, China, the province where I live, is having cuts with the connection to this webpage...
I have VPN in the computer, but of course not in the raspi... I don't know what to do


#4

Using blockedinchina:

Maybe it's just the congestion of the routers. Try again at different times of the day and see if it gets any further.


#5

Good morning from China.
Well, I'm in tmy office, I've set up the wifi as the same SSID and password from my home, I've connected the Raspi, got inside the webUI, and tried to update OctoPrint... With the same result. The status window keeps saying:

Updating, please wait.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/foosel/OctoPrint/archive/1.3.9.zip
Downloading https://github.com/foosel/OctoPrint/archive/1.3.9.zip (5.0MB)
Exception:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 141, in main
status = self.run(options, args)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 299, in run
resolver.resolve(requirement_set)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 283, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 836, in unpack_url
progress_bar=progress_bar
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 673, in unpack_http_url
progress_bar)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 897, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 619, in _download_url
consume(downloaded_chunks)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 844, in consume
deque(iterator, maxlen=0)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 585, in written_chunks
for chunk in chunks:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/utils/ui.py", line 159, in iter
for x in it:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_internal/download.py", line 574, in resp_read
decode_content=False):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 430, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 345, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='codeload.github.com', port=443): Read timed out.
The update did not finish successfully. Please consult <code>octoprint.log</code> and <code>plugin_softwareupdate_console.log</code> for details.

I'm out of clues. I don't even know if it's because of the Chinese great wall, or some other reason, but this country is frustrating, due that they don't only block the webpages, but let them open, with a lot of ping, or packet loss. It's not just blocking when the "webpage can harm the party's ideology", but also they make every foreign connection slow, laggy and with timeouts.

Is there something I could do with the computer? I have VPN, so I can avoid the Chinese Great Wall. Or if there's any way to put my VPN (Shadowsocks) into Raspberry...

Thank you for your help.


#6

Well, after hours of trying and trying just after the fails, like a kind of a clicking robot, suddenly, it worked...
So, the servers used for the update of OctoPrint, or some plugins, are in "semi-ban" here in china...
We can say that the issue is fixed. Thank you for your help!
God save Mao...


#7

It's possible that China's government-controlled routers are on a round-robin DNS:

dns.whatever.gov ->

  • govrouter1
  • govrouter2
  • govrouter3
  • govrouter4which-does-not-have-the-full-ban-list(yet)

Like I said, keep trying and eventually you hit the router that hasn't received the full patch of the latest banned sites.


#8

I'd jokingly ask, "Have you tried turning the GF off and then on again?" But the government in question seems to like me and I'd like to keep it that way, and an AI or translator somewhere likely will not have seen The IT Crowd and/or done support enough to understand the humor.


#9

For the future, you could use a government approved VPN product to gain access, since it's not a privacy issue, just an access issue. If you don't have anything to hide, it shouldn't be a huge issue that the government will be able to ask what you accessed in the future, since you're not doing anything illegal and you're using a product you're aware is transparent to them. Just don't use a foreign VPN product for something like this and expect it to both work and not raise questions...one or both are bound to not be true.

It's kind of a curious thing that there are products said government allows to be used to circumvent the restrictions, in certain circumstances, as long as you are transparent about it, but it's an advantage in your case, and something worth investigating in a transparent manner. Again, transparency is key, because you don't want to cause trouble for yourself. Also, if you go to HK a lot, IIRC, it's much less of an issue, though it's been a few years since I had to deal with this issue and, at least in my case, I simply could wait until I got back home.