Skip to content

CI: Conda connection errors #41725

Closed
Closed
@datapythonista

Description

@datapythonista

Looks like we've got some connection errors in Conda that we haven't seen before, see:

conda env create -q --file=environment.yml
Collecting package metadata (repodata.json): ...working... failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/runner/miniconda3/lib/python3.8/site-packages/urllib3/response.py", line 438, in _error_catcher
        yield
      File "/home/runner/miniconda3/lib/python3.8/site-packages/urllib3/response.py", line 764, in read_chunked
        self._update_chunk_length()
      File "/home/runner/miniconda3/lib/python3.8/site-packages/urllib3/response.py", line 694, in _update_chunk_length
        line = self._fp.fp.readline()
      File "/home/runner/miniconda3/lib/python3.8/socket.py", line 669, in readinto
        return self._sock.recv_into(b)
      File "/home/runner/miniconda3/lib/python3.8/ssl.py", line 1241, in recv_into
        return self.read(nbytes, buffer)
      File "/home/runner/miniconda3/lib/python3.8/ssl.py", line 1099, in read
        return self._sslobj.read(len, buffer)
    ConnectionResetError: [Errno 104] Connection reset by peer
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/runner/miniconda3/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/runner/miniconda3/lib/python3.8/site-packages/urllib3/response.py", line 572, in stream
        for line in self.read_chunked(amt, decode_content=decode_content):
      File "/home/runner/miniconda3/lib/python3.8/site-packages/urllib3/response.py", line 793, in read_chunked
        self._original_response.close()
      File "/home/runner/miniconda3/lib/python3.8/contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/runner/miniconda3/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 "/home/runner/miniconda3/lib/python3.8/site-packages/conda/exceptions.py", line 1079, in __call__
        return func(*args, **kwargs)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda_env/cli/main.py", line 80, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda_env/cli/main_create.py", line 119, in execute
        result[installer_type] = installer.install(prefix, pkg_specs, args, env)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda_env/installers/conda.py", line 31, in install
        unlink_link_transaction = solver.solve_for_transaction(
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/solve.py", line 114, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/solve.py", line 157, in solve_for_diff
        final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/solve.py", line 262, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/common/io.py", line 88, in decorated
        return f(*args, **kwds)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/solve.py", line 425, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/solve.py", line 1020, in _prepare
        reduced_index = get_reduced_index(self.prefix, self.channels,
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/index.py", line 288, in get_reduced_index
        new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 140, in query_all
        result = tuple(concat(executor.map(subdir_query, channel_urls)))
      File "/home/runner/miniconda3/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator
        yield fs.pop().result()
      File "/home/runner/miniconda3/lib/python3.8/concurrent/futures/_base.py", line 432, in result
        return self.__get_result()
      File "/home/runner/miniconda3/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
        raise self._exception
      File "/home/runner/miniconda3/lib/python3.8/concurrent/futures/thread.py", line 57, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 132, in <lambda>
        subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 145, in query
        self.load()
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 209, in load
        _internal_state = self._load()
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 371, in _load
        raw_repodata_str = fetch_repodata_remote_request(
      File "/home/runner/miniconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 694, in fetch_repodata_remote_request
        resp = session.get(join_url(url, filename), headers=headers, proxies=session.proxies,
      File "/home/runner/miniconda3/lib/python3.8/site-packages/requests/sessions.py", line 555, in get
        return self.request('GET', url, **kwargs)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
        resp = self.send(prep, **send_kwargs)
      File "/home/runner/miniconda3/lib/python3.8/site-packages/requests/sessions.py", line 697, in send
        r.content
      File "/home/runner/miniconda3/lib/python3.8/site-packages/requests/models.py", line 831, in content
        self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
      File "/home/runner/miniconda3/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'))

`$ /home/runner/miniconda3/bin/conda-env create -q --file=environment.yml`

  environment variables:
                 CIO_TEST=<not set>
                    CONDA=/usr/share/miniconda
  CONDA_AUTO_UPDATE_CONDA=false
                CONDA_EXE=/home/runner/miniconda3/bin/conda
         CONDA_PYTHON_EXE=/home/runner/miniconda3/bin/python
               CONDA_ROOT=/home/runner/miniconda3
              CONDA_SHLVL=0
           CURL_CA_BUNDLE=<not set>
      DEPLOYMENT_BASEPATH=/opt/runner
       GITHUB_ACTION_PATH=/home/runner/work/pandas/pandas/./.github/actions/setup
        GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
              GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_a635de78-1490-4
                          ff5-a562-86a9e642c5a2
                     PATH=/home/runner/miniconda3/bin:/home/runner/miniconda3/condabin:/home/run
                          ner/miniconda3/bin:/home/runner/miniconda3/bin:/home/linuxbrew/.linuxb
                          rew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/runner/.local/bin:/opt/p
                          ipx_bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendo
                          r/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/
                          local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us
                          r/local/games:/snap/bin:/home/runner/.dotnet/tools
       REQUESTS_CA_BUNDLE=<not set>
        SELENIUM_JAR_PATH=/usr/share/java/selenium-server-standalone.jar
            SSL_CERT_FILE=<not set>
               SWIFT_PATH=/usr/share/swift/usr/bin

     active environment : None
            shell level : 0
       user config file : /home/runner/.condarc
 populated config files : /home/runner/.condarc
          conda version : 4.10.1
    conda-build version : not installed
         python version : 3.8.5.final.0
       virtual packages : __linux=5.4.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/runner/miniconda3  (writable)
      conda av data dir : /home/runner/miniconda3/etc/conda
  conda av metadata url : https://repo.anaconda.com/pkgs/main
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/runner/miniconda3/pkgs
                          /home/runner/.conda/pkgs
       envs directories : /home/runner/miniconda3/envs
                          /home/runner/.conda/envs
               platform : linux-64
             user-agent : conda/4.10.1 requests/2.25.1 CPython/3.8.5 Linux/5.4.0-1047-azure ubuntu/20.04.2 glibc/2.31
                UID:GID : 1001:121
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

Upload successful.

Some examples:

@simonjayhawkins points in this comment that it may be caused by #41336. Difficult to tell, maybe it's just some problems on the conda servers, and it stops failing by itself. Opening this issue to keep track of any further information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous Integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions