You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, the vagrant provision outputs:
homestead: Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
homestead: Executing: /lib/systemd/systemd-sysv-install disable nginx
homestead: Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
homestead: Executing: /lib/systemd/systemd-sysv-install enable apache2
homestead: Job for apache2.service failed.
homestead: See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.
I then login via ssh with vagrant ssh and run journalctl -xeu apache2.service outputing (in the end):
░░ A reload job for unit apache2.service has begun execution.
░░
░░ The job identifier is 32278.
Jan 31 15:39:06 homestead apachectl[96200]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.2.1. Set the 'ServerName' directi>
Jan 31 15:39:06 homestead apachectl[96200]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 31 15:39:06 homestead apachectl[96200]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 31 15:39:06 homestead apachectl[96200]: no listening sockets available, shutting down
Jan 31 15:39:06 homestead apachectl[96200]: AH00015: Unable to open logs
Jan 31 15:39:06 homestead apachectl[96200]: httpd not running, trying to start
Jan 31 15:39:06 homestead apachectl[96197]: Action 'graceful' failed.
Jan 31 15:39:06 homestead apachectl[96197]: The Apache error log may have more information.
Jan 31 15:39:06 homestead systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
It seems the problem lies in the ipv4 (or ipv6) version:
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
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.
The text was updated successfully, but these errors were encountered:
service apache2 restart
service php"$5"-fpm restart
if [ $? == 0 ]
then
service apache2 reload
fi
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, the
vagrant 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.
The text was updated successfully, but these errors were encountered: