ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

asked 2018-07-15 23:39:00 -0500

liaodalin19903 gravatar image

I am installing the devstack, when I run sudo -u stack ./stack.sh, after minutes there will get bellow error:

   File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/response.py", line 436, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/response.py", line 401, 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 "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/response.py", line 316, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+inc/python:pip_install:1                  exit_trap
+./stack.sh:exit_trap:515                  local r=2
++./stack.sh:exit_trap:516                  jobs -p
+./stack.sh:exit_trap:516                  jobs=
+./stack.sh:exit_trap:519                  [[ -n '' ]]
+./stack.sh:exit_trap:525                  '[' -f '' ']'
+./stack.sh:exit_trap:530                  kill_spinner
+./stack.sh:kill_spinner:425               '[' '!' -z '' ']'
+./stack.sh:exit_trap:532                  [[ 2 -ne 0 ]]
+./stack.sh:exit_trap:533                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:535                  type -p generate-subunit
+./stack.sh:exit_trap:536                  generate-subunit 1531713999 831 fail
+./stack.sh:exit_trap:538                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:541                  /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
+./stack.sh:exit_trap:550                  exit 2

I also tried sudo -u stack ./stack.sh --default-timeout=100, still not work.

I locate China, I don't know whether this is caused by network issue.

edit retag flag offensive close merge delete

Comments

Can you access https://files.pythonhosted.org in your browser? If not, it's indeed a network issue or at least a glitch; right now, I can.

If you can access it but stack.sh can't, something is wrong in the connection of DevStack to the world.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-16 00:42:28 -0500 )edit

The log should tell you what Python package is installed from pythonhosted.org. Perhaps you find another source, install it manually then run the stack.sh again (or, better, reinstall the DevStack system from scratch first).

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-16 00:43:35 -0500 )edit

Hmm, reading the text that appears when opening https://files.pythonhosted.org, I guess that all pypi packages are hosted there. But if so, it would be strange that your government blocks this site. Is there a mirror inside China, perhaps?

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-16 00:45:40 -0500 )edit

I can access it, and after I upgrade my pip, seems there I can install now.

liaodalin19903 gravatar imageliaodalin19903 ( 2018-07-16 02:26:58 -0500 )edit