技术饭 WSL2使用PHP访问Windows 11上的MongoDB报错:Uncaught MongoDB\Driver\Exception\ConnectionTimeoutException: [connection refused calling hello on 'localhost:27017']

WSL2使用PHP访问Windows 11上的MongoDB报错:Uncaught MongoDB\Driver\Exception\ConnectionTimeoutException: No suitable servers found (`serverSelectionTryOnce` set): [connection refused calling hello on 'localhost:27017'],解决方法是:1、防火墙需要运行wsl2、2、mongodb配置文件设置bindIp=0.0.0.0、3、设置wsl中对应host访问

阅读全文 » 306天前
2023年05月28日

技术饭 nginx 502 bad gateway 解决 connect() failed (111: Connection refused) while connecting to upstream

nginx 502 bad gateway 解决 connect() failed (111: Connection refused) while connecting to upstream,新安装了centos8,配置了php7.2,还没怎么用,一直报错,烦都烦死。多方求证最后才知道是php的配置是:fastcgi_pass 127.0.0.1:9000; 但是php-fpm/www.conf里配置的监听listen不是这个,所以就报错了。

阅读全文 » 1235天前
2020年11月10日

技术饭 Could not connect to Redis at 127.0.0.1:6379: Connection refused

Could not connect to Redis at 127.0.0.1:6379: Connection refused

阅读全文 » 1853天前
2019年03月02日