Laravel Homestead and Connection Refused. Retrying messages on Windows 10 - laravel

I am trying to install homestead on windows 10 and I have this warning messages on start-up, I can ( vagrant ssh & ping ) the VB machine but the local website refuses connection.
$ vagrant up
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '9.6.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: 3306 (guest) => 33060 (host) (adapter 1)
homestead: 4040 (guest) => 4040 (host) (adapter 1)
homestead: 5432 (guest) => 54320 (host) (adapter 1)
homestead: 8025 (guest) => 8025 (host) (adapter 1)
homestead: 9600 (guest) => 9600 (host) (adapter 1)
homestead: 27017 (guest) => 27017 (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 => D:/homestead
homestead: /home/vagrant/code => D:/Homestead_Projects
==> homestead: Detected mount owner ID within mount options. (uid: 1000 guestpath: /home/vagrant/code)
==> homestead: Detected mount group ID within mount options. (gid: 1000 guestpath: /home/vagrant/code)
==> homestead: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> homestead: flag to force provisioning. Provisioners marked to run always will still run.

You don't need to run this command, vagrant up command is just for installation, and your installation is successfully done you need to run this command.
Run this command, I think it should help you :
vagrant provision
if you turn off your pc then you need to run this command.
vagrant reload --provision

Related

Why does vagrant up not generate a code directory?

Currently trying to set up a laravel project I cloned using vagrant on Windows 10. This is my Homestead.yaml file
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.sshhstead/id_rsa.pub
keys:
- ~/.sshhstead/id_rsa
folders:
- map: C:\Users\nikulas\Homestead\code\api
to: /home/vagrant/code
sites:
- map: homestead.test
to: /home/vagrant/code/public
databases:
- homestead
features:
- mysql: false
- mariadb: true
- postgresql: false
- ohmyzsh: false
- webdriver: false
#services:
# - enabled:
# - "postgresql#12-main"
# - disabled:
# - "postgresql#11-main"
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
Inside of my homestead folder I have a code folder that contains my project. Currently it is not being mapped to my vagrant environment and when I ssh into it after running vagrant up and ls I get nothing back.
This is what I get in the terminal when I run vagrant up.
PS C:\Users\nikulas\Homestead> vagrant up
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '11.0.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: 3306 (guest) => 33060 (host) (adapter 1)
homestead: 4040 (guest) => 4040 (host) (adapter 1)
homestead: 5432 (guest) => 54320 (host) (adapter 1)
homestead: 8025 (guest) => 8025 (host) (adapter 1)
homestead: 9600 (guest) => 9600 (host) (adapter 1)
homestead: 27017 (guest) => 27017 (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: 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/nikulas/Homestead
==> homestead: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> homestead: flag to force provisioning. Provisioners marked to run always will still run.

Vagrant Laravel setup, no input file specified

I am trying to setup homestead and laravel on a vagrant box. I get the error 'no input file specified' when I browse to my url:
http://homestead.app/, I have this setup in my hosts file 192.168.10.10 homestead.app
My current Homestead.yaml file is located in c:/users/me/Homestead and looks like this:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/Sites/Homestead_Projects
to: /home/vagrant/Sites
sites:
- map: homestead.app
to: /home/vagrant/code/laravel/public
databases:
- homestead
WHen I run vagrant up I get this message:
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> homestead-7: flag to force provisioning. Provisioners marked to run always will still run.
PS C:\Users\me\Homestead>
My project files I would like to be stored in, C:\sites\Homestead_Projects this is empty at the moment.
Can anyone advise how I can get my laravel site up and running?
My Virtualbox states homestead is running
Git bash shows homestead installed:
I also have a basic laravel site installed in my local folder:
Where do I install Laravel and how can I get a basic site setup?
Here is my powershell when I reload:
PS C:\Users\Becky\Homestead> vagrant reload --provision
==> homestead-7: Attempting graceful shutdown of VM...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Clearing any previously set forwarded ports...
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
homestead-7: Adapter 1: nat
homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
homestead-7: 80 (guest) => 8000 (host) (adapter 1)
homestead-7: 443 (guest) => 44300 (host) (adapter 1)
homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
homestead-7: 4040 (guest) => 4040 (host) (adapter 1)
homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
homestead-7: 8025 (guest) => 8025 (host) (adapter 1)
homestead-7: 27017 (guest) => 27017 (host) (adapter 1)
homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
homestead-7: SSH address: 127.0.0.1:2222
homestead-7: SSH username: vagrant
homestead-7: SSH auth method: private key
==> homestead-7: Machine booted and ready!
==> homestead-7: Checking for guest additions in VM...
==> homestead-7: Setting hostname...
==> homestead-7: Configuring and enabling network interfaces...
==> homestead-7: Mounting shared folders...
homestead-7: /vagrant => C:/Users/Becky/Homestead
homestead-7: /home/vagrant/Sites => C:/sites/Homestead_Projects
==> homestead-7: Running provisioner: file...
==> homestead-7: Running provisioner: shell...
homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
homestead-7: Running: C:/Users/Becky/AppData/Local/Temp/vagrant-shell20171016-6452-167i9e9.sh
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Creating Certificate: homestead.app
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Creating Site: homestead.app
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Checking for old Schedule
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Restarting Nginx
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Creating MySQL Database: homestead
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Creating Postgres Database: homestead
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Clear Variables
==> homestead-7: Running provisioner: shell...
homestead-7: Running: script: Update Composer
==> homestead-7: You are already using composer version 1.5.2 (stable channel).
==> homestead-7: Running provisioner: shell...
homestead-7: Running: C:/Users/Becky/AppData/Local/Temp/vagrant-shell20171016-6452-196tg7e.sh
==> homestead-7: Running provisioner: shell...
homestead-7: Running: C:/Users/Becky/AppData/Local/Temp/vagrant-shell20171016-6452-1v1vhk.sh
PS C:\Users\Becky\Homestead>
Your site should be homestead.app instead of homestead.localhost. in your Homestead.yaml file, or reversed for the hosts file. Try to change it and then run vagrant provision!
EDIT
Apply the following changes :
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
map: C:/Sites
to: /home/vagrant/Sites

Error booting after Virtualbox VM upgrade

I am using Vagrant and Homestead for laravel development. After updgrading my VM, when I vagrant up from Homestead root location I got an error:
$ vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
homestead-7: Adapter 1: nat
homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding por`enter code here`ts...
homestead-7: 80 (guest) => 8000 (host) (adapter 1)
homestead-7: 443 (guest) => 44300 (host) (adapter 1)
homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
homestead-7: 8025 (guest) => 8025 (host) (adapter 1)
homestead-7: 27017 (guest) => 27017 (host) (adapter 1)
homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
homestead-7: SSH address: 127.0.0.1:2222
homestead-7: SSH username: vagrant
homestead-7: SSH auth method: private key
homestead-7: Warning: Remote connection disconnect. Retrying...
homestead-7:
homestead-7: Vagrant insecure key detected. Vagrant will automatically repla ce
homestead-7: this with a newly generated keypair for better security.
homestead-7:
homestead-7: Inserting generated public key within guest...
homestead-7: Removing insecure key from the guest if it's present...
homestead-7: Key inserted! Disconnecting and reconnecting using new SSH key. ..
==> homestead-7: Machine booted and ready!
==> homestead-7: Checking for guest additions in VM...
==> homestead-7: Setting hostname...
==> homestead-7: Configuring and enabling network interfaces...
==> homestead-7: Mounting shared folders...
homestead-7: /vagrant => D:/Development/homestead
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant
enter code here
The error output from the command was:
: No such file or directory

Vagrant VM does not boot up properly

I am trying to get up my vagrant up, but am having some trouble with it. This is what happens when I do a vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'puphpet/centos65-x64' is up to date...
==> default: A newer version of the box 'puphpet/centos65-x64' is available! You currently
==> default: have version '20161004'. The latest is version '20161102'. Run
==> default: `vagrant box update` to update.
==> 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: 8080 (guest) => 9090 (host) (adapter 1)
default: 8443 (guest) => 9443 (host) (adapter 1)
default: 8787 (guest) => 8787 (host) (adapter 1)
default: 3306 (guest) => 3307 (host) (adapter 1)
default: 9990 (guest) => 9990 (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
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.
When I do a vagrant ssh-config, I get the following
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile "/Users/ritwickgupta/.vagrant.d/insecure_private_key"
IdentitiesOnly yes
LogLevel FATAL
I tried looking what was happening in my VM, and everything looks ok. I can login into my VM without any issue. Does anyone what what's happening here?
I built the box version you are currently using, 20161004, with VirtualBox 5.1.x. This required users to upgrade to that version for boxes to work.
I have since rebuilt the boxes using VirtualBox 5.0.16, 20161102.
Please delete your local box and download the new version.

Windows: Running vagrant as administrator not working - works normally

I've been using vagrant to run laravel/lumen as well as just other general stuff such as node js scripts. I've run into problems installing some things using npm, and it seems that a solution working for a lot of people is just running the command line (or git bash in my case) as an administrator. However when I try this and use vagrant up, I get a long list of errors. I've also tried vagrant init which gives the same errors.
Here are the errors
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> 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: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
v==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/Andy McNally/Homestead
vag default: /home/vagrant/home => C:/Users/Andy McNally/home
r==> default: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always
will still run.

Resources