Memo

メモ > 技術 > フレームワーク: Laravel6 > Homestead トラブル対応メモ

Homestead トラブル対応メモ
■起動時にエラー ※未解決
>cd C:\Users\refirio\Vagrant\homestead >vagrant up Bringing machine 'homestead' up with 'virtualbox' provider... ==> homestead: Importing base box 'laravel/homestead'... ==> homestead: Matching MAC address for NAT networking... ==> homestead: Checking if box 'laravel/homestead' version '11.4.0' is up to date... ==> homestead: Setting the name of the VM: homestead ==> homestead: Clearing any previously set network interfaces... ==> homestead: Preparing network interfaces based on configuration... homestead: Adapter 1: nat homestead: Adapter 2: hostonly ==> homestead: Forwarding ports... homestead: 80 (guest) => 8000 (host) (adapter 1) homestead: 443 (guest) => 44300 (host) (adapter 1) homestead: 22 (guest) => 2222 (host) (adapter 1) ==> homestead: Running 'pre-boot' VM customizations... ==> homestead: Booting VM... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["startvm", "883f2b65-3c93-4840-ac71-c6fe2c9b19fd", "--type", "headless"] Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3' (VERR_INTNET_FLT_IF_NOT_FOUND). VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
VirtualBox で Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' が出た時の対処 - Qiita https://qiita.com/ExA_DEV/items/ae80a7d767144c2e1992 VirtualBoxでネットワーク関連のエラー CodeLab(コードラボ)技術ブログ https://www.codelab.jp/blog/?p=3025 "ネットワークと共有センター" を開く(コントロールパネル → ネットワークとインターネット → ネットワークと共有センター) "アダプターの設定の変更" を開く "VirtualBox Host-Only Network #N" のプロパティを開く "VirtualBox NDIS6 Bridged Networking Driver" にチェックを入れる "インターネットプロトコル バージョン6(TCP/IPv6)" のチェックを外す [OK] を押し、プロパティウィンドウを閉じる "VirtualBox Host-Only Network #N" の右クリックメニューで「無効」にする 再度、「有効」にし直す 「VirtualBox Host-Only Network #N」に該当するものとして、「イーサネット4」「イーサネット5」「イーサネット6」があった 「イーサネット4」と「イーサネット6」で「インターネットプロトコル バージョン6(TCP/IPv6)」にチェックが入っていたので、これらに対して作業した
>vagrant halt
さらにWindowsも再起動
>cd C:\Users\refirio\Vagrant\homestead >vagrant up Bringing machine 'homestead' up with 'virtualbox' provider... ==> homestead: Checking if box 'laravel/homestead' version '11.4.0' is up to date... ==> homestead: Clearing any previously set forwarded ports... ==> homestead: Clearing any previously set network interfaces... ==> homestead: Preparing network interfaces based on configuration... homestead: Adapter 1: nat homestead: Adapter 2: hostonly ==> homestead: Forwarding ports... homestead: 80 (guest) => 8000 (host) (adapter 1) homestead: 443 (guest) => 44300 (host) (adapter 1) homestead: 22 (guest) => 2222 (host) (adapter 1) ==> homestead: Running 'pre-boot' VM customizations... ==> homestead: Booting VM... ==> homestead: Waiting for machine to boot. This may take a few minutes... homestead: SSH address: 127.0.0.1:2222 homestead: SSH username: vagrant homestead: SSH auth method: private key Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong. If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well. If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value.
まだエラーになる Laravel の Homestead を立ち上げる時に Timed out while waiting for the machine to boot がでる - Qiita https://qiita.com/pugiemonn/items/e4aef6afe3b17d63f9fb 起動したボックスの一覧から「homestead」を選択 右画面に表示される「設定」アイコンをクリック ネットワーク → アダプター1 → 高度 で表示される「ケーブル接続」にチェックを入れる…とあるが、チェックは入っている 特に変更せず、ボックスを再起動してみる
>vagrant halt ==> homestead: Attempting graceful shutdown of VM... homestead: homestead: Vagrant insecure key detected. Vagrant will automatically replace homestead: this with a newly generated keypair for better security. homestead: homestead: Inserting generated public key within guest... homestead: Removing insecure key from the guest if it's present... homestead: Key inserted! Disconnecting and reconnecting using new SSH key... >vagrant up Bringing machine 'homestead' up with 'virtualbox' provider... ==> homestead: Checking if box 'laravel/homestead' version '11.4.0' is up to date... ==> homestead: Clearing any previously set forwarded ports... ==> homestead: Clearing any previously set network interfaces... ==> homestead: Preparing network interfaces based on configuration... homestead: Adapter 1: nat homestead: Adapter 2: hostonly ==> homestead: Forwarding ports... homestead: 80 (guest) => 8000 (host) (adapter 1) homestead: 443 (guest) => 44300 (host) (adapter 1) homestead: 22 (guest) => 2222 (host) (adapter 1) ==> homestead: Running 'pre-boot' VM customizations... ==> homestead: Booting VM... ==> homestead: Waiting for machine to boot. This may take a few minutes... homestead: SSH address: 127.0.0.1:2222 homestead: SSH username: vagrant homestead: SSH auth method: private key homestead: Warning: Connection reset. Retrying... homestead: Warning: Connection aborted. Retrying... ==> homestead: Machine booted and ready! ==> homestead: Checking for guest additions in VM... ==> homestead: Setting hostname... ==> homestead: Configuring and enabling network interfaces... ==> homestead: Mounting shared folders... homestead: /vagrant => C:/Users/refirio/Vagrant/homestead homestead: /home/vagrant/homestead => C:/Users/refirio/Vagrant/homestead/code/homestead ==> homestead: Detected mount owner ID within mount options. (uid: 1000 guestpath: /home/vagrant/homestead) ==> homestead: Detected mount group ID within mount options. (gid: 1000 guestpath: /home/vagrant/homestead) ==> homestead: Running provisioner: file... homestead: C:/Users/refirio/Vagrant/homestead/aliases => /tmp/bash_aliases ==> homestead: Running provisioner: handle_aliases (shell)... homestead: Running: inline script ==> homestead: Running provisioner: setting authorize key (shell)... homestead: Running: inline script homestead: homestead: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHSTaGwKmzv23Uv+HQBFKfXmoh2KJnXXMOMoJsKES4XAoUtoLVWUC4cB04+LTcgtz7FzgTfzTolwdYHdG3Q1waAaoPTBnB0A4hSBQCg9WrAeTMkWao7fjCbsCY9weJuRxIvyE92Y0bC29N0dDNvl2vjOM0XOBCBE154vrJtUt6n0pg2p6/Vv9aZjsrvqhi8LcQsJgf6jXTyTf0L/uPfo6YJ/tLw3wFUR8AUTsKSXJDzpMtTknYPPgYfLgpBFu0pwwFlBNmC7WpDHA/tOJV9XNryKD6FXbFLT27uU+LIHNAKn6JWv8feAK2qRWEH0N4bPQybG+rp8SEDFN8Vw7Ku8wHD2Zir0+HW4+lhtAyh1sccFYeGe9FKlMI3Mr6xkzeph2fPwl7v674XG5IfVLe9+kKq+gpUJTBfiT+Yvpc7j6eLry9nViNo5XC+5GCuQ6hPav1/Q0fAi/SO3WU5Rl9OGHtNrDISDYz5GtglD8m3FJWjTHxfoOgYhYozI4woUZAafIuCQ+DuryAgZ4MpwT07n29Ro80L7t/xspbX0iNW8RXbK8oIT4yEMjb+tZFSswjKxPZo+rJUfWk9FNp2XfDy4q0XIsMh+oSOFhXWyG71M5k5nJTaCDGiE5FP/3hXiTbhDF75ILlV+UmxQ/ScmoI/4pxUGapW3/dlZA3/dL4wyhOWw== refirio@Surface-Laptop ==> homestead: Running provisioner: setting authorize permissions (shell)... homestead: Running: inline script ==> homestead: Running provisioner: mk_features (shell)... homestead: Running: inline script ==> homestead: Running provisioner: own_features (shell)... homestead: Running: inline script ==> homestead: Running provisioner: apt_update (shell)... homestead: Running: inline script homestead: Get:1 https://download.docker.com/linux/ubuntu focal InRelease [52.1 kB] homestead: Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] homestead: Hit:3 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu focal InRelease homestead: Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease homestead: Get:5 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [86.7 kB] homestead: Hit:6 https://deb.nodesource.com/node_14.x focal InRelease homestead: Get:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] homestead: Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease homestead: Get:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] homestead: Get:10 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [822 kB] homestead: Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,170 kB] homestead: Get:12 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [213 kB] homestead: Get:13 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [274 kB] homestead: Get:14 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [161 kB] homestead: Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [522 kB] homestead: Get:16 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [364 kB] homestead: Get:17 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [52.1 kB] homestead: Get:18 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [640 kB] homestead: Get:19 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [252 kB] homestead: Get:20 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [410 kB] homestead: Get:21 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [509 kB] homestead: Get:22 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [100 kB] homestead: Get:23 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [58.7 kB] homestead: Get:24 http://archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [632 kB] homestead: Get:25 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [851 kB] homestead: Get:26 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [179 kB] homestead: Fetched 7,676 kB in 32s (237 kB/s) homestead: Reading package lists... ==> homestead: Running provisioner: shell... homestead: Running: inline script homestead: Invalid feature: mysql ==> homestead: Running provisioner: shell... homestead: Running: inline script homestead: Ignoring feature: mariadb because it is set to false ==> homestead: Running provisioner: shell... homestead: Running: inline script homestead: Ignoring feature: postgresql because it is set to false ==> homestead: Running provisioner: shell... homestead: Running: inline script homestead: Ignoring feature: ohmyzsh because it is set to false ==> homestead: Running provisioner: shell... homestead: Running: inline script homestead: Ignoring feature: webdriver because it is set to false ==> homestead: Running provisioner: shell... homestead: Running: C:/Users/refirio/AppData/Local/Temp/vagrant-shell20210822-3508-1j39xiq.sh ==> homestead: Running provisioner: shell... homestead: Running: C:/Users/refirio/AppData/Local/Temp/vagrant-shell20210822-3508-e4dd1k.sh ==> homestead: Running provisioner: Creating Certificate: homestead.test (shell)... homestead: Running: script: Creating Certificate: homestead.test homestead: Updating certificates in /etc/ssl/certs... homestead: rehash: warning: skipping duplicate certificate in ca.homestead.homestead.pem homestead: 1 added, 0 removed; done. homestead: Running hooks in /etc/ca-certificates/update.d... homestead: done. ==> homestead: Running provisioner: Creating Site: homestead.test (shell)... homestead: Running: script: Creating Site: homestead.test ==> homestead: Running provisioner: shell... homestead: Running: inline script ==> homestead: Running provisioner: shell... homestead: Running: C:/Users/refirio/AppData/Local/Temp/vagrant-shell20210822-3508-zr5pv9.sh ==> homestead: Running provisioner: Checking for old Schedule (shell)... homestead: Running: script: Checking for old Schedule ==> homestead: Running provisioner: Clear Variables (shell)... homestead: Running: script: Clear Variables ==> homestead: Running provisioner: Restarting Cron (shell)... homestead: Running: script: Restarting Cron ==> homestead: Running provisioner: Restart Webserver (shell)... homestead: Running: script: Restart Webserver ==> homestead: Running provisioner: Creating MySQL / MariaDB Database: homestead (shell)... homestead: Running: script: Creating MySQL / MariaDB Database: homestead homestead: We didn't find a PID for mariadb, skipping $DB creation ==> homestead: Running provisioner: Update Composer (shell)... homestead: Running: script: Update Composer homestead: Upgrading to version 2.1.6 (stable channel). homestead: homestead: Use composer self-update --rollback to return to version 2.1.5 ==> homestead: Running provisioner: shell... homestead: Running: C:/Users/refirio/AppData/Local/Temp/vagrant-shell20210822-3508-fpn9o0.sh ==> homestead: Running provisioner: Update motd (shell)... homestead: Running: script: Update motd ==> homestead: Running provisioner: Run after.sh (shell)... homestead: Running: C:/Users/refirio/AppData/Local/Temp/vagrant-shell20210822-3508-14hyo7e.sh
これで起動できた…ことがある 駄目な場合、さらに以下を修正 C:\Users\refirio\Vagrant\homestead\Vagrantfile
if Vagrant.has_plugin?('vagrant-notify-forwarder') config.notify_forwarder.enable = true end end
if Vagrant.has_plugin?('vagrant-notify-forwarder') config.notify_forwarder.enable = true end if Vagrant.has_plugin?('vagrant-vbguest') config.vbguest.auto_update = false end end
vagrant upでGuestAdditions seems to be installed (6.0.14) correctly, but not running. The following SSH command responded with a non-zero exit status. - Qiita https://qiita.com/Kosuke-nick/items/7e7b49804219d04071e2 Vagrant/VirtualBoxで「GuestAdditions seems to be installed (6.0.8) correctly, but not running.」出たときの対処法 - Qiita https://qiita.com/sola-msr/items/ce6ea764b5236554cb32 これで起動できた…ことがある 改めて起動を試して、また「Timed out while waiting for the machine to boot.」のエラーになることがあった Vagrantの停止&起動で正常に起動できたようだが原因は不明 以下をインストールすることで、フォルダ同期が高速になるとされる ただしインストールしても状況は変わらず
>vagrant plugin install vagrant-winnfsd
整理すると以下の状況 現状、タイムアウトになったりならなかったり…なので開発環境として使うのは難しい ・まったく起動できないわけでは無いので、「根本的にWindowsが対応していない」ということは無いはず ・正常に起動できたものを「vagrant reload」や「vagrant halt」「vagrant up」で再起動するとタイムアウトになることがある ・不意に起動できるようになることがある…ような いったん起動できたものを、 何も変更せずに「vagrant reload」して再起動できることを確認し、 再度実行しても問題なく、さらに実行すると5分ほどでタイムアウトになる …という状態 なお、Homestead以外のボックスは問題なく起動できる 原因不明 ■Poderosaで接続エラー ※未解決 PoderosaからSSHで接続しようとすると 「The negotiation of kex algorithm is failed」 というエラーになった Poderosaで「The negotiation of encryption algorithm is failed」エラー https://mook.jpn.org/archives/2016/01/post-4505.html Poderosaのバージョンが古いだけ、みたい? ただ、上記ページでは 「新しいbetaの Poderosa 4.3.16 を使ってみたところ、ちゃんと接続することが出来ました。」 とあるが、上記エラーが発生したのは 4.3.16 環境だった

Advertisement