4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

vagrantでcentos7をインストールする際のOpenSSL SSL_read: Connection reset by peer, errno 54というエラーを解決した

Last updated at Posted at 2020-02-29

vagrantでcentos7をインストールしようと思い、こちらを参考にcentos7のboxをインストール。

% vagrant box add centos/7

しかし、上記コマンド実行後にOpenSSL SSL_read: Connection reset by peer, errno 54というエラーが出た。

% vagrant box add centos/7
==> box: Loading metadata for box 'centos/7'
    box: URL: https://vagrantcloud.com/centos/7
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) hyperv
2) libvirt
3) virtualbox
4) vmware_desktop

Enter your choice: 3
==> box: Adding box 'centos/7' (v1905.1) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/virtualbox.box
    box: Download redirected to host: cloud.centos.org
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

OpenSSL SSL_read: Connection reset by peer, errno 54

原因

ダウンロード関係のファイル等が格納されている~/.vagrant.d/tmpフォルダに、ダウンロードに失敗したゴミファイルが残ってしまっているのが原因だった。

% ls ~/.vagrant.d/tmp
box2105a8feebeaa01a32d7ed5e2fdbadf5b94181a5

解決方法

ゴミファイルを削除。

% rm ~/.vagrant.d/tmp/*
zsh: sure you want to delete the only file in /Users/username/.vagrant.d/tmp [yn]? y
remove /Users/username/.vagrant.d/tmp/box2105a8feebeaa01a32d7ed5e2fdbadf5b94181a5? 

これで再度vagrant addを実行したら無事インストールされた。

% vagrant box add centos/7
==> box: Loading metadata for box 'centos/7'
    box: URL: https://vagrantcloud.com/centos/7
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) hyperv
2) libvirt
3) virtualbox
4) vmware_desktop

Enter your choice: 3
==> box: Adding box 'centos/7' (v1905.1) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
    box: Download redirected to host: cloud.centos.org
==> box: Successfully added box 'centos/7' (v1905.1) for 'virtualbox'!
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?