Open mikeziri opened 9 months ago
I'm encountering the same issue on an Intel Mac using the VirtualBox provider.
I'm also having the same issue on an Intel Windows using the VirtualBox provider.
I am only using Apache for all my websites. Here's a workaround that seems to be working, in case anyone else needs it:
sudo service nginx stop
sudo systemctl disable nginx
sudo systemctl enable apache2
service apache2 restart
service php"$5"-fpm restart
if [ $? == 0 ] then service apache2 reload fi
2. add this to /after.sh
sudo service nginx stop sudo systemctl disable nginx sudo systemctl enable apache2 sudo service apache2 restart sudo service php5.6-fpm restart sudo service php7.0-fpm restart sudo service php7.1-fpm restart sudo service php7.2-fpm restart sudo service php8.0-fpm restart sudo service php8.1-fpm restart sudo service php8.2-fpm restart sudo service php8.3-fpm restart sudo service apache2 reload
Versions
6c474ca51c6c8662c71c10cec11a6f1dd7a7fb3c
(v15.0.2)Host operating system
MacOS 14.3 (23D56) on Apple M2 Pro
Expected behavior
I have more than 100 vhosts on my Homestead.yaml. After upgrading to the new box homestead (not -arm), did a full provision and expected the provision to end.
Actual behavior
The
vagrant provision
fails in different places after consecutive runs. After provisioning the last "Site" before crashing, thevagrant provision
outputs:I then login via ssh with
vagrant ssh
and runjournalctl -xeu apache2.service
outputing (in the end):It seems the problem lies in the ipv4 (or ipv6) version:
Where Apache tries to bind to port 80 but fails.
My suspicion is the fact that on each Site provisioning, Nginx is disabled and then Apache is enabled. But sometimes, Nginx didn't yet release it's port 80 (socket) and Apache fails to bind.
There's not a clear pattern on which Site (vhost) it fails when provisioning. Almost always a different one.
Would it be possible to add an X seconds sleep in between Nginx disable and Apache enable commands while provisioning? Better yet, is it possible to completely disable Nginx as an installed service as we only use Apache?
Although this is on Mac M2 (Arm), I have colleagues on Intel machines with the same problem.
Our workaround is to place the vhost we need to work on, on top of the Sites list on Homestead.yaml and provision again, hoping it goes past the first one.