Redis, Mongo 本地访问成功,远程访问失败基本上都是bind ip导致。
redis 启动时指定conf文件, 并在文件中 找到 bind 127.0.0.1, 将注释去掉改为:bind 0.0.0.0,或者你希望的ip
重新启动:
redis-server.exe redis.window.conf
mongo类似,修改mongod.cfg
找到并修改:
net:
port: 27017
bindIp: 0.0.0.0 #原值127.0.0.1
重启mongo。
一切应该都恢复正常了。