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 5 years have passed since last update.

何度もハマル 『vagrant up で InvalidByteSequenceError 発生』 問題

Last updated at Posted at 2015-05-14
追記 2017/12/27

Vagrant2.0.1 (Windows10, VirtualBox5.2.0) でも同じエラーが発生!
今回はこれで一発解決!感謝! -> VagrantコマンドでEncoding::InvalidByteSequenceError
恐らく、以下の『再発』の現象もこれで解決できたんじゃないかと。


現象

Windows8.1上でこんなエラーが発生して、VirtualBox上のCentOS6が起動しなかった。

> vagrant up
F:/tools/DevelopmentTools/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/io.rb:32:in `encode': incomplete "\x95" on Windows-31J (Encoding::InvalidByteSequenceError)

さっきまでは動いてたのに突然(-_-)

これ関連ありそうだったけど… 違った。
http://uchimanajet7.hatenablog.com/entry/2015/03/13/204916

解決

VirtualBoxで他のCentOSを起動していている場合にこのエラーが発生することが分かった。他のを全て落としたら、vagrant upで正常に起動するようになった。

ポートフォワードのバッティングが原因だったのかもしれない。

再発

VirtualBox5.0+Vagrant1.7.3の組み合わせで同じエラーが発生した。

> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: A newer version of the box 'ubuntu/trusty64' is available! You currently
==> default: have version '20150506.0.0'. The latest is version '20150609.0.10'. Run
==> default: `vagrant box update` to update.
==> default: Clearing any previously set forwarded ports...
F:/tools/DevelopmentTools/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.3/lib/vagrant/util/io.rb:32:in `encode': inco
mplete "\x82" on Windows-31J (Encoding::InvalidByteSequenceError)
        from F:/tools/DevelopmentTools/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.3/lib/vagrant/util/io.rb:32:in `
read_until_block'
:
:

vagrant box updateしてから

==> default: Updating 'ubuntu/trusty64' with provider 'virtualbox' from version
==> default: '20150506.0.0' to '20150609.0.10'...
==> default: Loading metadata for box 'https://atlas.hashicorp.com/ubuntu/trusty64'
==> default: Adding box 'ubuntu/trusty64' (v20150609.0.10) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20150609.0.10/

再度vagrant upしてみたが、やはりダメ。

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?