An another FPM instance seems to already listen on /Users/***/.valet/valet.sock
Mac 环境下,使用 brew-php-switcher 将 PHP 版本由 5.6 切换为 7.0 后,重启 php-fpm 服务报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
☁ etc brew-php-switcher 70 Switching to php70 Switching your shell Unlinking /usr/local/Cellar/php53/5.3.29_8... 0 symlinks removed Unlinking /usr/local/Cellar/php54/5.4.45_7... 0 symlinks removed Unlinking /usr/local/Cellar/php55/5.5.38_12... 0 symlinks removed Unlinking /usr/local/Cellar/php56/5.6.32_8... 17 symlinks removed Unlinking /usr/local/Cellar/php70/7.0.26_18... 0 symlinks removed Unlinking /usr/local/Cellar/php71/7.1.6_18... 0 symlinks removed Linking /usr/local/Cellar/php70/7.0.26_18... 17 symlinks created You will need sudo power from now on Switching your apache conf Restarting apache All done! ☁ etc sudo killall php-fpm && sudo php-fpm [15-Dec-2017 11:36:55] ERROR: An another FPM instance seems to already listen on /Users/gaoxuhui/.valet/valet.sock [15-Dec-2017 11:36:55] ERROR: FPM initialization failed |
找到 php-fpm 配置文件,发现里面的 listen 有误导致的:/usr/local/etc/php/7.0/php-fpm.d/www.conf
1 2 3 4 5 6 7 8 9 10 11 |
; The address on which to accept FastCGI requests. ; Valid syntaxes are: ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on ; a specific port; ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on ; a specific port; ; 'port' - to listen on a TCP socket to all addresses ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. listen = /Users/gaoxuhui/.valet/valet.sock |
参考里面的 www.conf.default 默认配置文件,将 listen 修改为:
1 2 3 4 5 6 7 8 9 10 11 |
; The address on which to accept FastCGI requests. ; Valid syntaxes are: ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on ; a specific port; ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on ; a specific port; ; 'port' - to listen on a TCP socket to all addresses ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. listen = 127.0.0.1:9000 |
即可解决。
but,重启 php-fpm 服务依然有报错信息,但暂时不影响使用了,如下:
1 2 3 4 |
☁ ~ sudo nginx -s reload ☁ ~ sudo killall php-fpm && sudo php-fpm [15-Dec-2017 14:45:33] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (48) [15-Dec-2017 14:45:33] ERROR: FPM initialization failed |
waiting for solve …
近期评论