Laravel Homestead not logging in - laravel

I'm currently trying to setup Laravel Homestead 2.0+. When running homestead up, the machine boots up, but then timeouts with the messages:
default: Warning: Connection timeout. Retrying...
The status of the box is running, and I cannot SSH into it.
Looking further into it, when I boot up the VirtualBox GUI, it seems that the box is awaiting login information.
Its asking for a username and password - is this the reason it timeout? Also what is the login information for the box... strange how it doesn't login automatically.

It's a bug. Make sure you have a working internet connection. If not, turn off the router/modem completely while starting vm.

Related

Vagrant | Homestead - vagrant up command connection timeout

When I execute the 'vagrant up' command, it says
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.

Skip/Ignore boot errors for vagrant up

Hi Guys I have a situation where I don't want use vagrant user or any other user for ssh. Whenever I do vagrant up the VM's boots and I get the below error for ssh. Its because of timeout as it is unable to find vagrant user. By default when we do vagrant up the vagrants checks for vm to boot and it does the same by sshing. Is there is way where I can ignore this bootstrap error or skip the ssh step? I did an extensive search and unable to find any documentation regarding the same. The reason I need this is because I have multiple VM which needs to be started one by one. I need to skip this error or ignore the below error so that all the VM's are started.
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.

Vagrant hangs after macOS upgrade

After upgrading to macOS Mojave, my local vagrant stopped working with timeout error after SSH auth method: private key as below:
mch1: SSH address: 127.0.0.1:2222
mch1: SSH username: vagrant
mch1: 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.
Vagrant version : 2.2.2
VirtualBoxVersion 5.2.22 r126460 (Qt5.6.3)
Most probably this is an issue with the new security features on Mojave.
Please give the console app (from where you ran vagrant up, e.g. iTerm2) full write permissions on the disk
System preferences
Security & Privacy
Privacy
Full Disk Access
then restart console and try again.

Figwheel not hot reloading or updating on file save when using vagrant

When running figwheel from with a vagrant box it seems that file changes aren't noticed and as a result figwheel does not update/reload the page.
After spending hours trying to figure out what was going on it eventually came down to how figwheel detects file changes.
To detect file changes figwheel uses the hawk library which in turn uses the operating system to that tell hawk the file has updated. Because vagrant defaults to using vboxsf there is no underlying update mechanism to provide updates that the file has changed, see here. To fix this we just need to tell figwheel, and thus hawk, to poll for file changes:
:figwheel {:hawk-options {:watcher :polling}
Just pop this in the your profile.clj and that will allow figwheel to see changes after the file has been saved, although it does take a while for the polling to pick up the changes so wait a little bit.
This only however solves half of the problem because figwheel still requires an active websocket connection to actually push the code changes. This is complicated by the fact the a vagrant vm is a separate machine on the network and requires you expose this websocket to more than just localhost. This can be achieved by adding another key to the figwheel map in project.clj:
:figwheel {:server-ip "0.0.0.0"}
and then exposing the figwheel websocket port in the vagrantfile:
config.vm.network "forwarded_port", guest: 3449, host: 3449
and that should fix figwheel on vagrant!
FYI had a similar problem and work on the following solution
troubleshooting on vagrant docker
to quote
Watch Task not working in Docker / Vagrant?
Scenario: Changes made to a file mounted with Docker / Vagrant between
the guest and host os via NFS; filesystem events are not received
correctly.
Resolution: Use rsync in these environments, as NFS does not support
inotify. You may also wish to run a repl server in the guest os and
connect to it from the host.

heroku: Running console attached to terminal...

I am trying to deploy a simple rails application to an heroku account, I was able to login and push, only it seems to hang when I try to
heroku run rake db:migrate
or to
heroku run console
I get the message
Running console attached to terminal...
and then nothing happens... it just hangs. I read that it could be I have some blocked ports (like, port 5000) but it seems quite strange to me, I never had such problems before...
I am on Ubuntu, how can I check if that's the case? or how could I fix the issue? Anybody got any hint? I already tried to heroku update, same issue...
Its the port problem i also face the same issue a while ago and their support guys told me top make open the port.
Here is their reply
This problem is typically caused by a connectivity or firewall issue. You can test your connection to our heroku run and heroku console servers by running the following commands:
telnet rendezvous.heroku.com 5000
telnet s1.runtime.heroku.com 5000
Some users have success after whitelisting these hostname+port combinations in their firewall. We recommend contacting your IT department to move forward with this issue.
If you are successfully able to connect, press Ctrl+] (right bracket) and then type quit to exit the telnet session.
An application which takes a long time to boot can also exasperate connectivity issues. If the server does not respond quickly enough, your local connection will timeout before the app can boot.
To test the net enabled access to that port try the following. They mention that filtered-port issue on their guide.
$ telnet rendezvous.heroku.com 5000

Resources