askforalfred / alfred

ALFRED - A Benchmark for Interpreting Grounded Instructions for Everyday Tasks
MIT License
360 stars 77 forks source link

Cannot complete running "check_thor.py" because of ConnectionResetError. #90

Closed maguro27 closed 3 years ago

maguro27 commented 3 years ago

I met the ConnetionResetError when I ran "check_thor.py" after running the docker container based on slightly modified Dockerfile. The main modification of the Dockerfile is that I change the docker image from nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 to nvcr.io/nvidia/pytorch:20.12-py3 because my GPU machine does not match the NVIDIA driver version (namely, use cuda 11.1 because of using NVIDIA RTX A6000) The full error message is as follows,

thor-201909061227-Linux64: [||||||||||||||||||||||||||||||||||||||||||   98% 502.4 KiB/s]  of 390.MBTraceback (most recent call last):
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/urllib3/response.py", line 438, in _error_catcher
    yield
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/urllib3/response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/usr/lib/python3.8/http/client.py", line 458, in read
    n = self.readinto(b)
  File "/usr/lib/python3.8/http/client.py", line 502, in readinto
    n = self.fp.readinto(b)
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/requests/models.py", line 753, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/urllib3/response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/urllib3/response.py", line 541, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/urllib3/response.py", line 455, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "check_thor.py", line 4, in <module>
    c.start()
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/ai2thor/controller.py", line 858, in start
    self.download_binary()
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/ai2thor/controller.py", line 786, in download_binary
    zip_data = ai2thor.downloader.download(
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/ai2thor/downloader.py", line 48, in download
    for buf in r.iter_content(1024):
  File "/home/maguro/alfred_env/lib/python3.8/site-packages/requests/models.py", line 756, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))

Although I inserted time.sleep(0.01) before downloader.py in line 18, I cannot resolve this error. How do I fix it? Please lend me your hands.

MohitShridhar commented 3 years ago

@maguro27, have you looked at this https://github.com/devpi/devpi/issues/597?

I would also suggest starting a fresh docker container in shell mode and manually installing everything in the Dockerfile one-by-one. This is much easier to debug than directly building docker images.

maguro27 commented 3 years ago

@MohitShridhar Thank you for replying!

I didn't meet the ConnectionResetError when I installed the newest version of ai2thor of pypi. However, I met another error. If I continue to suffer from the new error, I make a new issue. Thank you for the advice!

maguro27 commented 3 years ago

I couldn't find the cause of the ConnectionResetError. However, I found another solution.

  1. download the ai2thor environment files directly from http://s3-us-west-2.amazonaws.com/ai2-thor/builds/thor-201909061227-Linux64.zip.
  2. unzip the ai2thor environment files.
  3. move the unzipped files to ~/.ai2thor/release/.

Although I complete running the check_thor.py, I get another error/warning.

(alfred_env) maguro@s184:~$ python alfred/check_thor.py 
Found path: /home/maguro/.ai2thor/releases/thor-201909061227-Linux64/thor-201909061227-Linux64
Mono path[0] = '/home/maguro/.ai2thor/releases/thor-201909061227-Linux64/thor-201909061227-Linux64_Data/Managed'
Mono config path = '/home/maguro/.ai2thor/releases/thor-201909061227-Linux64/thor-201909061227-Linux64_Data/Mono/etc'
Unable to preload the following plugins:
    ScreenSelector.so
Display 0 'VGA-1': 1024x768 (primary device).
Logging to /home/maguro/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-Thor/Player.log
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
(300, 300, 3)
Everything works!!!

Is it a critical error/warning?

MohitShridhar commented 3 years ago

@maguro27 these warnings can be ignored. (300, 300, 3) Everything works!!! is all that is important.

maguro27 commented 3 years ago

@MohitShridhar Thank you for the reply! I really really appreciate you.