vagrant (centOS)を使っていたらgitコマンドが急に使えなくなりハマった。(2018.02.23)
[vagrant@localhost vagrant]$ git clone https://github.com/hoge....
Cloning into 'hoge'...
fatal: unable to access 'https://github.com/hoge...': Peer reports incompatible or unsupported protocol version.
ググっても、それっぽいエラーは出てこず、vagrant destroy
やVagnrant、VirtualBoxの再インストールを試しても解決せず。
curl nss ライブラリの更新(2019/01/08追記)
Stack Overflowに同様の問題と解決策が載っていたらしい。
I was having the same problem on various CentOS 6 VM's and it turned out to be an issue with stale curl and nss libraries (thanks to this thread for pointing me in the right direction: cURL SSL connect error 35 with NSS error -5961).
The fix that worked for me is just:
yum update -y nss curl libcurl
root@local]# yum update -y nss curl libcurl
参考)https://urashita.com/archives/20890
yum updateしてみた
夕方に同じような現象にあった人の記事を見つけ、その記事を参考にアップデートしたら、動くようになった。
$ yum update
$ yum upgrade
参考)
http://hackerhouse.hatenablog.com/entry/2018/02/23/162708
elasticsearch-pluginのバージョンアップ
今度は、elasticsearchが動かなくなった。elasticsearch-pluginのバージョンの相違でelasticsearchが起動しなかったみたい。おそらく、yum update
を実行したことによる弊害だろう。
root@local]# /usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment
root@local]# /usr/share/elasticsearch/bin/elasticsearch-plugin remove analysis-icu
root@local]# /usr/share/elasticsearch/bin/elasticsearch-plugin remove analysis-kuromoji
root@local]# /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
root@local]# /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
root@local]# /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-kuromoji
root@local]# systemctl start elasticsearch
root@local]# systemctl status elasticsearch
root@local]# systemctl restart kibana
vagrant-vbguestでGuest Additionsをアップデート
今度は、VirtualBoxを最新(5.2)にしてみた。そうしたら、vagrant upが動かなくなった。
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.0.6
default: VirtualBox Version: 5.2
==> default: Setting hostname...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/xxxxx/Documents/XXXXX
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
git pull
Updating 282a4a0..41313b3
error: Your local changes to the following files would be overwritten by merge:
Vagrantfile
Please commit your changes or stash them before you merge.
Aborting
ググったら、Guest Additionsが古かったみたい。
vagrant-vbguestを入れて、Guset Additionsをアップデートしたら、問題なく動いた。
C:\XXXXX> vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching: micromachine-2.0.0.gem (100%)
Fetching: vagrant-vbguest-0.15.1.gem (100%)
Installed the plugin 'vagrant-vbguest (0.15.1)'!
C:\XXXXX> vagrant vbguest
[default] GuestAdditions versions on your host (5.2.6) and guest (5.0.6) do not match.
・・・
VirtualBox Guest Additions installer
Removing installed version 5.0.6 of VirtualBox Guest Additions...
Removing existing VirtualBox non-DKMS kernel modules[ OK ]
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
VirtualBox Guest Additions: Starting.
Redirecting to /bin/systemctl start vboxadd.service
Unmounting Virtualbox Guest Additions ISO from: /mnt
VM must be running to open SSH connection. Run `vagrant up`
to start the virtual machine.
C:\XXXXX> vagrant vbguest --version
Vagrant 2.0.2
参考)
https://qiita.com/isaoshimizu/items/e217008b8f6e79eccc85
考察
おそらく、もともとVirtualBox5.0でVagrant環境を構築していて、VirtualBoxを5.2にバージョンアップしたことで、おかしくなったのであろう。一週間経過したが、いまのところ、問題なく動作してるっぽい。
(追記)
もしかしたら、Windowsのアップデートでも同じ現象になるかも??