Closed neilgee closed 1 year ago
Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.
Thanks!
Wow - shutdown so quickly - I can't be the only one who has tried to migrate and failed
When you look at ls -al ~/Library/LaunchAgents | grep homebrew
you'll see that you've got the Valet services running as yourself as well as those running as root in ls -al /Library/LaunchDaemons | grep homebrew
.
This is usually caused by manually starting those services without calling sudo
, which Valet does.
So, I'd start with running the following to stop the non-root services that are already also running as root:
brew services stop php@7.3
brew services stop php
brew services stop nginx
brew services stop dnsmasq
Then run valet restart
.
Does that solve it for you? If not, then further digging will be required ...
You've also got 2 mariadb instances configured to run:
-rw-r--r-- 1 neilg staff 730 15 Sep 18:37 homebrew.mxcl.mariadb.plist
-rw-r--r-- 1 neilg staff 740 15 Sep 18:32 homebrew.mxcl.mariadb@10.3.plist
I suggest calling brew services stop mariadb@10.3
to stop it from trying to load at login, since the other (non @10.3) appears to be running fine.
Also @neilgee while you opened this post saying "services are erroring", you didn't indicate whether your Valet sites can be accessed, or whether they are displaying any specific errors.
Just curious what other symptoms are going on ... or is it just these errors showing in brew services list
?
Thanks @drbyte for the response.
So I completely uninstalled Valet and Homebrew - then reinstalled but still have the same issues.
~/Sites ▓▒░ valet --version ░▒▓ ✔ 09:27:04
Laravel Valet 4.3.0
Launch agents
~/Sites ▓▒░ ls -al ~/Library/LaunchAgents | grep homebrew ░▒▓ ✔ 09:24:24
-rw-r--r-- 1 neilg staff 797 16 Sep 09:23 homebrew.mxcl.dnsmasq.plist
-rw-r--r-- 1 neilg staff 974 15 Sep 16:58 homebrew.mxcl.mailhog.plist
-rw-r--r-- 1 neilg staff 730 15 Sep 19:11 homebrew.mxcl.mariadb.plist
-rw-r--r-- 1 neilg staff 685 16 Sep 09:24 homebrew.mxcl.nginx.plist
-rw-r--r-- 1 neilg staff 781 15 Sep 18:56 homebrew.mxcl.php.plist
Launch Daemons
~/Sites ▓▒░ ls -al /Library/LaunchDaemons | grep homebrew ░▒▓ ✔ 09:25:33
-rw-r--r-- 1 root admin 797 16 Sep 09:19 homebrew.mxcl.dnsmasq.plist
-rw-r--r-- 1 root admin 685 16 Sep 09:19 homebrew.mxcl.nginx.plist
-rw-r--r-- 1 root admin 781 16 Sep 09:19 homebrew.mxcl.php.plist
-rw-r--r-- 1 root wheel 636 18 Feb 2021 homebrew.mxcl.php@7.3.plist
-rw-r--r-- 1 root wheel 636 28 Jun 08:57 homebrew.mxcl.php@7.4.plist
However I still get that error 512 for dnsmasq and 256 for nginx.
Brew services list
~/Sites ▓▒░ valet restart ░▒▓ ✔ 09:33:44
Restarting dnsmasq...
Restarting php...
Restarting nginx...
Valet services have been restarted.
~/Sites ▓▒░ brew services list ░▒▓ ✔ 09:24:14
Name Status User File
dnsmasq error 512 root ~/Library/LaunchAgents/homebrew.mxcl.dnsmasq.plist
mariadb started neilg ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
nginx error 256 root ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php started root ~/Library/LaunchAgents/homebrew.mxcl.php.plist
I have given up on preserving the previous websites - but I'll just import them when I have it up and running.
Everything has been installed without sudo - but I am unsure why brew services
list is stating that root is the user for 3/4 of the LaunchAgents
My aim is just to get this up and running
Okay. Your root LaunchDaemons are fine. But your NeilG LaunchAgents are not. Looks like they were left behind from yesterday/earlier.
Run the following without sudo:
brew services stop dnsmasq
brew services stop nginx
brew services stop php
valet restart
brew services list
After that run
ls -al ~/Library/LaunchAgents | grep homebrew
and if any of the following are still present, delete them manually and reboot:
-rw-r--r-- 1 neilg staff 797 16 Sep 09:23 homebrew.mxcl.dnsmasq.plist
-rw-r--r-- 1 neilg staff 685 16 Sep 09:24 homebrew.mxcl.nginx.plist
-rw-r--r-- 1 neilg staff 781 15 Sep 18:56 homebrew.mxcl.php.plist
(mailhog and mariadb are fine to run as neilg, just not dnsmasq/nginx/php)
EDIT: Here's a quick delete command for those:
rm ~/Library/LaunchAgents/homebrew.mxcl.dnsmasq.plist ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/homebrew.mxcl.php.plist
Ok done that and rebooted and the restarted valet - but the service status is set to none:
~/Sites ▓▒░ valet restart ░▒▓ ✔ 11:48:01
Restarting dnsmasq...
Restarting php...
Restarting nginx...
Valet services have been restarted.
~/Sites ▓▒░ brew services list ░▒▓ ✔ 16s 11:48:28
Name Status User File
dnsmasq none root
mariadb started neilg ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
nginx none root
php none root
So I started them with brew services and get this:
~/Sites ▓▒░ brew services start dnsmasq ░▒▓ ✔ 11:49:04
Warning: dnsmasq must be run as root to start at system startup!
==> Successfully started `dnsmasq` (label: homebrew.mxcl.dnsmasq)
~/Sites ▓▒░ brew services start nginx ░▒▓ ✔ 11:52:03
==> Successfully started `nginx` (label: homebrew.mxcl.nginx)
~/Sites ▓▒░ ░▒▓ ✔ 11:52:11
~/Sites ▓▒░ brew services start php ░▒▓ ✔ 11:52:13
==> Successfully started `php` (label: homebrew.mxcl.php)
~/Sites ▓▒░ brew services list ░▒▓ ✔ 11:52:18
Name Status User File
dnsmasq error 512 root ~/Library/LaunchAgents/homebrew.mxcl.dnsmasq.plist
mariadb started neilg ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
nginx error 256 root ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php error 19968 root ~/Library/LaunchAgents/homebrew.mxcl.php.plist
Still getting errors.
But saying that I can create WordPress sites using https://github.com/aaemnnosttv/wp-cli-valet-command
I can verify PHP, NGINX and DNSMASQ are now working eventhough their status is an error:
~/Sites ▓▒░ brew services list ░▒▓ 1 х 14:40:50
Name Status User File
dnsmasq error 512 root ~/Library/LaunchAgents/homebrew.mxcl.dnsmasq.plist
mariadb started neilg ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
nginx error 256 root ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php error 19968 root ~/Library/LaunchAgents/homebrew.mxcl.php.plist
Of course I would prefer the status to be in good standing
Ya, I've sometimes seen those services show "error" or "none" or even blank but things are working fine. Haven't fully researched why that is...
Description
I upgraded to Apple M1 and reinstalled Homebrew so it would correctly install in /opt
I removed old Homebrew intel install.
Then I now uninstalled and re-installed Valet but now services are erroring:
Steps To Reproduce
From Intel to M1 - install new Homebrew - remove old Homebrew
Uninstall and Reinstall Valet
Diagnosis
sw_vers
valet --version
cat ~/.config/valet/config.json
cat ~/.composer/composer.json
composer global diagnose
composer global outdated
ls -al /etc/sudoers.d/
brew config
brew services list
brew list --formula --versions | grep -E "(php|nginx|dnsmasq|mariadb|mysql|mailhog|openssl)(@\d\..*)?\s"
brew outdated
brew tap
php -v
which -a php
php --ini
nginx -v
curl --version
php --ri curl
/opt/homebrew/bin/ngrok version
ls -al ~/.ngrok2
brew info nginx
brew info php
brew info openssl
openssl version -a
openssl ciphers
sudo nginx -t
which -a php-fpm
/opt/homebrew/opt/php/sbin/php-fpm -v
sudo /opt/homebrew/opt/php/sbin/php-fpm -y /opt/homebrew/etc/php/8.2/php-fpm.conf --test
ls -al ~/Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchDaemons | grep homebrew
ls -al /Library/LaunchDaemons | grep "com.laravel.valet."
ls -aln /etc/resolv.conf
cat /etc/resolv.conf
ifconfig lo0
sh -c 'echo "------\n/opt/homebrew/etc/nginx/valet/valet.conf\n---\n"; cat /opt/homebrew/etc/nginx/valet/valet.conf | grep -n "# valet loopback"; echo "\n------\n"'
sh -c 'for file in ~/.config/valet/dnsmasq.d/*; do echo "------\n~/.config/valet/dnsmasq.d/$(basename $file)\n---\n"; cat $file; echo "\n------\n"; done'
sh -c 'for file in ~/.config/valet/nginx/*; do echo "------\n~/.config/valet/nginx/$(basename $file)\n---\n"; cat $file | grep -n "# valet loopback"; echo "\n------\n"; done'