LoginSignup
10
10

More than 5 years have passed since last update.

vagrant upでエラー

Posted at

いつものようにvagrant upしようとしたら、

[yusuke@Yusukes-MBP myLocalEnvironment]$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 3000 => 3000 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
The SSH connection was unexpectedly closed by the remote end. This
usually indicates that SSH within the guest machine was unable to
properly start up. Please boot the VM in GUI mode to check whether
it is booting properly.

なに?SSH接続が途切れた?GUIで正しくブートされているか確認してみよ、とのこと。VMを見てみたらちゃんと起動されている。

なんやねん、と思いながらvagrant reload

[yusuke@Yusukes-MBP myLocalEnvironment]$ vagrant reload
An action 'reload' was attempted on the machine 'default',
but another process is already executing an action on the machine.
Vagrant locks each machine for access by only one process at a time.
Please wait until the other Vagrant process finishes modifying this
machine, then try again.

If you believe this message is in error, please check the process
listing for any "ruby" or "vagrant" processes and kill them. Then
try again.

別のプロセスがゲストマシン上で動いているためreloadができません。と。vagrant haltをしてみても同じ結果だった。

Vagrant locks each machine for access by only one process at a time.のエラー文をじっとみつめる。

複数のアクセスが一つのプロセスから同時に行われた場合、そのマシンをロック、する・・と、いう解釈でいいのかな。

SSHアクセスの他にホスト → ゲストに向けて何かしらアクセスをしようとしている、のかな?

明示的にやった覚えはないので、勝手に起こっちゃってるっぽいので、取り急ぎ実行中のプロセスをみてみる。

[yusuke@Yusukes-MBP myLocalEnvironment]$ ps
  PID TTY           TIME CMD
  423 ttys000    0:00.01 -bash
  528 ttys000    0:00.00 vagrant-notify-server (2250)  

お!vagrant-notify-serverあやしすぎる。

[yusuke@Yusukes-MBP myLocalEnvironment]$ kill 528

これで無事vagrant reloadvagrant sshできました。

10
10
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
10
10