Update & Upgradeができにゃい
2018年9月頃あたりから様子がおかしい。
いや、なんかWindows Updateが入ると3回ぐらい環境があぼーんしたわけで、それよりも前からドッキドキしてたんだけどさ。
さて、どうなったかというと冒頭の見出し通り sudo apt update やら sudo apt upgrade やらが
エラーでできなくなった...
$ sudo apt update
Err:1 http://jp.archive.ubuntu.com/ubuntu bionic InRelease
Connection failed [IP: 160.26.2.187 80]
Err:2 http://jp.archive.ubuntu.com/ubuntu bionic-updates InRelease
Connection failed [IP: 160.26.2.187 80]
Err:3 http://jp.archive.ubuntu.com/ubuntu bionic-backports InRelease
Connection failed [IP: 160.26.2.187 80]
Err:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Connection failed [IP: 91.189.88.152 80]
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://jp.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Connection failed [IP: 160.26.2.187 80]
W: Failed to fetch http://jp.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 160.26.2.187 80]
W: Failed to fetch http://jp.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Connection failed [IP: 160.26.2.187 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Connection failed [IP: 91.189.88.152 80]
環境
Windows 10 x64 Build 17763
WSL for Ubuntu (18.04.1 LTS)
Kaspersky 17.0.0.611 (m)
結論から言うと
研究室のWindows PCはKasperskyが入ってて、以前から似たような記事さんが出てましたけど、まさかと思って一度Kasperskyを終了したら...
$ sudo apt update
Hit:1 http://jp.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://jp.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [412 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [153 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [567 kB]
Get:8 http://jp.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [149 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [186 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [89.2 kB]
Fetched 1802 kB in 3s (665 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
あら不思議、updateができました...うーん8月ぐらいまでは普通に使えてたんだけどなぁ...
どちらかのupdateで競合するようになっちゃってるのかしら
環境の方にKasperskyのversionを書いておきました
同様に...
WSLでpyenv入れて運用を(7月ぐらいまで)してたんだけど、updateと同様にgitまであぼーん
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
Cloning into '/home/.pyenv'...
fatal: unable to access 'https://github.com/yyuu/pyenv.git/': gnutls_handshake() failed: Error in the push function.
gnutls_handshake()を軽く調べるとUbuntu14.04あたりで似たような失敗があったみたい
でも、以降のバージョンでは見られないみたいですし、なんでかなーと思ってた
...で、上でKaspersky終了させたら上手くいったので、やっちゃえgit!というノリで進めると、
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
Cloning into '/home/.pyenv'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 16509 (delta 10), reused 21 (delta 10), pack-reused 16484
Receiving objects: 100% (16509/16509), 3.19 MiB | 4.72 MiB/s, done.
Resolving deltas: 100% (11202/11202), done.
うーん、やっぱりKasperskyと何らかの衝突してそう
ともあれ毎回終了させるのは面倒だし、何とかならないかな...
とりあえず救済案(自己責任でお願いします...)
ネットワークの監視ポートがあやしいとお告げがあったので、設定->詳細->ネットワーク->ネットワークポートで監視しているポートを見ると、
Port Number | explaination | State |
---|---|---|
443 | HTTPS | 有効 |
80 | HTTP | 有効 |
ふむ、監視してくれているのはありがたいけどWSLの機能を阻害してそうなのはちょっと...そもそも監視とFirewallは別なのでは?と思う気もする
さて、とりあえず無効にしてやってみる
pyenvはやってしまったので、日ごろからお世話になってるTheanoさんをGithubからcloneしてみる
なお、有効状態ではできなかったのは確認済み
みんなもTheanoさんを敬おう!
$ git clone https://github.com/Theano/Theano.git
Cloning into 'Theano'...
remote: Enumerating objects: 65, done.
remote: Counting objects: 100% (65/65), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 165406 (delta 22), reused 38 (delta 22), pack-reused 165341
Receiving objects: 100% (165406/165406), 65.67 MiB | 6.61 MiB/s, done.
Resolving deltas: 100% (131830/131830), done.
うごいちゃった、やっぱり監視ポートの設定がどうなってるのか気になるところ
因みにUbuntuのupadteはエラー内容見る限り80番ポートでやり取りしてるみたいなので、80番ポートを無効化したらできました
監視とfirewallがどうなっているか大変危険ですが、それでもいいのであれば無効化してみてください(いや、まぁ普通は良くないよね...)
蛇足
ちなみに80番ポートを有効化したままだと、そもそもWSL自体が起動しないことも
更にいえばKaspersky自体を落とさないとWSLが起動すらしなかった時もあります(そのまま亡くなった場合も...)
個人的には突然に扱えなくなった(気がする)ので、今後こういうことがなくなるといいな
というか公式の対応マダカナー