CodaHTTPErrer:HTTP 000 CONNETION FAILE D for url

3782 ワード

なぜか奇妙な出会いがありました。CondaHTTPError: HTTP 000 CONNECTION FAILED for urlエラー:
ubuntu@ubuntu-System-Product-Name:~$ conda update --all
Solving environment: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url 
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ProxyError(MaxRetryError("HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /anaconda/cloud/msys2/noarch/repodata.json (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))",),)


ネット上の多くの解決方法は、清華源に変更し、修正後のソースは:
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
show_channel_urls: true

しかし、これは私の問題を解決できません。やはり間違いを指摘します。やっとすごいブログを見つけました。よく書けました。https://www.imooc.com/article/37905 netstatを使用して、ローカルポートの使用状況を確認する。
ubuntu@ubuntu-System-Product-Name:~$ sudo netstat -ntpl
[sudo] password for ubuntu: 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1336/dnsmasq    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      979/cupsd       
tcp6       0      0 ::1:631                 :::*                    LISTEN      979/cupsd       

ローカルネットワークが代理サービスに行ったかどうかを確認します。
ubuntu@ubuntu-System-Product-Name:~$ export | grep -i prox
declare -x HTTPS_PROXY="http://127.0.0.1:33421/"
declare -x HTTP_PROXY="http://127.0.0.1:33421/"
declare -x NO_PROXY="localhost,127.0.0.0/8,::1"
declare -x http_proxy="http://127.0.0.1:33421/"
declare -x https_proxy="http://127.0.0.1:33421/"
declare -x no_proxy="localhost,127.0.0.0/8,::1"

サービスを終了
ubuntu@ubuntu-System-Product-Name:~$ unset HTTPS_PROXY(      ,  declare -x HTTPS_PROXY="http://127.0.0.1:33421/"  )
ubuntu@ubuntu-System-Product-Name:~$ export | grep -i prox
declare -x HTTP_PROXY="http://127.0.0.1:33421/"
declare -x NO_PROXY="localhost,127.0.0.0/8,::1"
declare -x http_proxy="http://127.0.0.1:33421/"
declare -x no_proxy="localhost,127.0.0.0/8,::1"

検証
ubuntu@ubuntu-System-Product-Name:~$ conda update --all
Solving environment: - 
Warning: 2 possible package resolutions (only showing differing packages):
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free::blas-1.0-mkl
  - defaults::blas-1.0-mdone

## Package Plan ##

  environment location: /home/ubuntu/anaconda2


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    blas-1.0                   |              mkl           6 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

The following packages will be UPDATED:

    blas: 1.0-mkl defaults --> 1.0-mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

Proceed ([y]/n)? Y


Downloading and Extracting Packages
blas-1.0             | 6 KB      | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

深くため息をつく