I am using Laravel 6.2, Vagrant 2.2.6 and VirtualBox 5.2. Followed the tutorial for Homestead setup. But when I visited myapp.local (out of the box without modifying any code), I got the following error message:
NotFoundHttpException in RouteCollection.php line 161
(Please see my comment below explaining why I was getting this error)
Mistakenly, I modified the ip address in my Homestead.yaml file and now, no matter what I do, I am getting the following error message.
Network settings specified in your Vagrantfile define an invalid
IP address. Please review the error message below and update your
Vagrantfile network settings:
Address: 192.168.10:10
Netmask:
Error: invalid address
Example:
machine1234:Homestead my_user_name$ vagrant destroy
homestead: Are you sure you want to destroy the 'homestead' VM? [y/N] y
==> homestead: Destroying VM and associated drives...
machine1234:Homestead my_user_name$ vagrant up --provision
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 '9.2.0' is up to date...
==> homestead: Setting the name of the VM: homestead
==> homestead: Clearing any previously set network interfaces...
Network settings specified in your Vagrantfile define an invalid
IP address. Please review the error message below and update your
Vagrantfile network settings:
Address: 192.168.10:10
Netmask:
Error: invalid address
Homestead.yaml looks like this:
> --- ip: "192.168.10:10" memory: 2048 cpus: 2 provider: virtualbox
>
> authorize: ~/.ssh/id_rsa.pub
>
> keys:
> - ~/.ssh/id_rsa
>
> folders:
> - map: ~/Sites/myapp
> to: /home/vagrant/myapp
>
>
> sites:
> - map: myapp.local
> to: /home/vagrant/myapp/public
> databases:
> - MY_APP_DEV
>
> features:
> - mariadb: false
> - ohmyzsh: false
> - webdriver: false "Homestead.yaml" 41L, 667C
Any idea on how I can fix this issue?
Your IP address has a colon!
Change:
Address: 192.168.10:10
To:
Address: 192.168.10.10
Related
I updated Virtualbox to 6.0.2 and Vagrant into 2.2.3 in MacOSX Siera. Also remove old laravel/homestead folder and download new one v8.0.2. But when install virtualbox and vagrant on my MacOSX and run vagrant up it make new ssh keys and move it into new virtual box machine. First indicator that I saw is that he forward only 22 port into virtual machine and make it in some strange name(previous naming is like homestead-7), and last time is homestead_default_1549352737068_70025. Here is list of logs that I get from console:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' version '7.0.0' is up to date...
==> default: Setting the name of the VM: homestead_default_1549352737068_70025
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
Next problem that I see when ssh to it that it didn't have project folder with sub-folders that defined in Homestead.yaml file also it didn't have mysql connection also apache/nginx didn't belongs there(my web sites didn't wants to start). Here is my Homestead.yaml snippet:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/developing/projects
to: /home/vagrant/projects
sites:
- map: project_test.test
to: /home/vagrant/projects/project_test/public
- map: project_test2.test
to: /home/vagrant/projects/project_test2/public
databases:
- project_test
- project_test2
I try multiple times vagrant destroy && vagrant up --provision but it didn't helps me. Can anybody help me what to do next?Any idea?
After uninstall all(Vagrant and Virtualbox) and install new version. It's partially works. I can ssh to it, it works mysql connect when set ip to be 127.0.0.1 (didn't bind to be "192.168.10.10" from Homestead file) but still can't access to any of my websites over my browser :(
Try adding your sites to your local /etc/hosts file.
192.168.10.10 project_test.test
192.168.10.10 project_test2.test
I am trying to create a Laravel App with the help of homestead vagrant. I am using a Windows 7 development environment. I'm using the Per Project Installation and I'm at the point in the Laravel Documentation that I can vagrant up my project. When I do vagrant up in my project I get hung up on
SSH auth method: password
and I get the following message:
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.
I am using Laravel 5.3 and Vagrant 1.9.0. I was using Vagrant 1.8.4, but once I started having trouble I installed Vagrant 1.9.0, but received the exact same error. I tried te following fix from here, and from the vb.gui I could see the following error from the launched server:
[ 0.100000] Failed to access perfctr msr (MSR c0010007 is 0)
lvmetad is not active yet, using direct activation during sysinit
lvmetad is not active yet, using direct activation during sysinit
Scanning for Btrfs filesystems
/dev/mapper/vagrant--vg-root:clean, 127066/2559088 files, 1241443/10228736 blocks
[ 10.420196] piix4_smbus 0000:00:07.0: SMBus base address uninitialized - updrade BIOS or use force_addr=0xadr
[ ] A start jon is running for Raise network interfaces (4 min 44s / 5min 5 s)
and then the server start and I can log in, but my folders and IP from my Homestead.yaml file are not set on the server.
This is my Homestead.yaml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
hostname: mysite
name: mysite
provider: virtualbox
authorize: C:/Users/xxx/.ssh/id_rsa.pub
keys:
- C:/Users/xxx/.ssh/id_rsa
folders:
- map: "C:/Users/xxx/www/mysite"
to: "/home/vagrant/mysite"
sites:
- map: homestead.app
to: "/home/vagrant/mysite/public"
databases:
- homestead
While the instance is running and I run:
vagrant ssh-config
I get
Host mysite
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentitiesOnly yes
LogLevel FATAL
ForwardAgent yes
when I run:
vagrant global-status
I get:
id name provider state directory
-----------------------------------------------------------------------
66eb5bf mysite virtualbox running C:/Users/xxx/www/mysite
When I try and get the degub info from vagrant by using this:
vagrant up --debug > vdebug.txt
generates a lot of messages in the command prompt but only this in the vdebug.txt file:
Bringing machine 'mysite' up with 'virtualbox' provider...
==> mysite: Importing base box 'laravel/homestead'...
[KProgress: 20%
[KProgress: 30%
[KProgress: 60%
[KProgress: 70%
[KProgress: 90%
[K==> mysite: Matching MAC address for NAT networking...
==> mysite: Checking if box 'laravel/homestead' is up to date...
==> mysite: Setting the name of the VM: mysite
==> mysite: Clearing any previously set network interfaces...
==> mysite: Preparing network interfaces based on configuration...
mysite: Adapter 1: nat
mysite: Adapter 2: hostonly
==> mysite: Forwarding ports...
mysite: 80 (guest) => 8000 (host) (adapter 1)
mysite: 443 (guest) => 44300 (host) (adapter 1)
mysite: 3306 (guest) => 33060 (host) (adapter 1)
mysite: 5432 (guest) => 54320 (host) (adapter 1)
mysite: 22 (guest) => 2222 (host) (adapter 1)
==> mysite: Running 'pre-boot' VM customizations...
==> mysite: Booting VM...
==> mysite: Waiting for machine to boot. This may take a few minutes...
mysite: SSH address: 127.0.0.1:2222
mysite: SSH username: vagrant
mysite: SSH auth method: password
If you made it to the end of this post thank you! My questions is how do I get my IP and Folders from my Homestead.yaml file to the server. Any help would be greatly appreciated. Also Let me know if I can add any more info. I will keep you updated on my status.
EDIT 1
I forgot to add that I enabled virtualization already.
EDIT 2
I changed the Homestead.yaml file in my projects folder to have the IP set to 192.168.10.20 instead of 192.168.10.10 and still no changes. I will keep updating till I have an answer.
EDIT 3
Tried to change the Vagrantfile located in my project folder to add the following in the Vagrant.configure function:
config.vm.network "public_network", ip: "192.168.10.20", :bridge => "en1: Realtek PCIe GBE Family Controller #2"
I received the same error, but I also received this:
Specific bridge 'en1: Realtek PCIe GBE Family Controller #2' not found. You may be asked to specify
which network to bridge to.
This error occurs because the Ubuntu tries to raise all your network interfaces, but your cable isn't connected, then it waits until this timeout.
It seems that this problem occurs when you export a VM, more info on https://www.virtualbox.org/ticket/15705
You can edit your Vagrantfile and add these lines in the end of Vagrant.configure loop:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
Basically add this right before the very last "end".
I did have the same error in the past it was because the virtualization in my machine wasn't enabled.
Try to enable it in your machine. To do it you need to get into the BIOS.
There are useful information at Vagrant stuck connection timeout retrying as well.
[ ] A start jon is running for Raise network interfaces (4 min 44s / 5min 5 s)
https://askubuntu.com/a/841432
That link shows how to reduce the timeout for the DHCP client from 5 minutes to 15 seconds. I logged in via VirtualBox to do it. That worked for me.
I have been attempting getting this to work now for 4 hours now and I am struggling.
I am trying to get my homestead working. I followed the installation guide here:
https://laravel.com/docs/5.2/homestead
I have a few questions:
1.) When I install homestead by cloning the github repo - I get a src folder in that installation and in that src folder I have this: src/stubs/Homestead.yaml. When I followed the instructions I ran bash init.sh inside of the root of that installation and that created a /.homestead folder with 3 files in it a after.sh a aliases and a Homestead.yml file. From my understanding I am to modify the Homestead.yml to reflect my enviornment. The question is which one? The one in the hidden .homestead folder or the one in the place where I installed Homestead?
2.) When I go to http://site1.local:8000/ in a browser I get a Site cannot be reached error - refused to connect. When i go to http://localhost:8000/ I get 'No input file specified.'
3.) The command Homestead from the command line isn't recognized as a internal or external command - should it be? I read people with similar problems should run the command homestead up yet it isn't recognized for me.
Here is my Homestead.yml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/LaravelProjects/projects
to: /home/vagrant/Code
sites:
- map: site1.local
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
Here is my host file:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
#laravel project 1
192.168.10.10 site1.local
I have updated my hosts file. I have tried running vagrant reload --provision and vagrant destroy and other vagrant commands without luck. Any suggestions?
Here is the dump of running vagrant reload --provision
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'laravel/homestead' is up to date...
==> 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: 80 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. 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.20
default: VirtualBox Version: 5.1
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/Radley.Anaya/LaravelProjects/Homestead
default: /home/vagrant/Code => C:/Users/Radley.Anaya/LaravelProjects/projects
==> default: Running provisioner: file...
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: C:/Users/RADLEY~1.ANA/AppData/Local/Temp/vagrant-shell20160801-10000-y9i8nr.sh
==> default: Running provisioner: shell...
default: Running: script: Creating Site: site1.local
==> default: Running provisioner: shell...
default: Running: script: Restarting Nginx
==> default: Running provisioner: shell...
default: Running: script: Creating MySQL Database
==> default: Running provisioner: shell...
default: Running: script: Creating Postgres Database
==> default: Running provisioner: shell...
default: Running: script: Clear Variables
==> default: Running provisioner: shell...
default: Running: inline script
==> default: You are already using composer version 1.2.0 (stable channel).
==> default: Running provisioner: shell...
default: Running: C:/Users/RADLEY~1.ANA/AppData/Local/Temp/vagrant-shell20160801-10000-i2qk4o.sh
Update
I ssh'd into the VM and my folder structure looks like: Code/first/index.php how do I update it?
My Homestead.yml file has a different directory structure - I think that is likely causing my issues. How do I fix this?
From my understanding the .yml file dictates the folder structure of the virtual machine? This isn't the case??
Solved
My mappings were messed up. I ssh'd into the vm to verify and updated my .yaml file then provisioned the vm and everything is working. Also I had to remove the port from my url.
I have installed virtual box, vagrant, git bash. everything runs well.
when I command 'vagrant up', no errors shows.
forhad#BlindMirror MINGW64 ~/Homestead (master)
$ vagrant reload --provision
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'laravel/homestead' is up to date...
==> 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: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Mounting shared folders...
default: /vagrant => C:/Users/forhad/Homestead
forhad#BlindMirror MINGW64 ~/Homestead (master)
but when I enter website address on browser, it shows http://laravel.dev is not available.
url containing port 2222 works, e.g 127.0.0.1:2222, it shows
SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6
on the browser.
no other url works,
Homestead.yaml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/Users/forhad/Homestead
to: /home/vagrant/Code
sites:
- map: laravel.dev
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
#ports:
# - send: 93000
# to: 80
# - send: 7777
# to: 777
# protocol: udp
I'm trying to install Laravel+Vagrant+Homestead on my Ubuntu 14.04. My /etc/hosts have this line:
192.168.10.10 homestead.app
and my .homestead/Homestead.yaml have
ip: "192.168.10.10"
...
folders:
- map: ~/blog
to: /home/vagrant/blog
sites:
- map: homestead.app
to: /home/vagrant/blog/public
That's because I have made a test with "laravel new blog" before, so I'm trying to use this as a test.
But when I put "homestead.app" in my browser, it says:
The following error was encountered while trying to retrieve the URL: http://homestead.app/
Connection to 127.0.53.53 failed.
The system returned: (111) Connection refused
Where is this address "127.0.53.53" coming from?
Also, when I issued the command
vagrant box add laravel/homestead
and received
==> box: Adding box 'laravel/homestead' (v0.2.7) for provider: virtualbox
box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.2.7/providers/virtualbox.box
==> box: Successfully added box 'laravel/homestead' (v0.2.7) for 'virtualbox'!
there shouldn't exist a "laravel/homestead" visible when I open virtualbox?
You don't own homestead.app so don't use it as a URL.
That IP is telling is ICANN informing you of a name collision.