After the virtual machine is installed. Add redis to the project and want to test the function
Then it can't connect to the physical machine.
1. Ping the IP of the virtual machine with the physical machine. . . .
2. Then. Bind 0.0.0.0 in redis.conf still has no effect or can't connect. The redis link to access the project interface is still not available.
try{
code
} No throws to handle manually anymore. Can't see exception information.
let go try
Tip: Connection time out
3. Change the winodws client to connect manually.
Prompt Can't conect to redis-server
This must be because the virtual machine redis-server cannot be connected.
4. In order to confirm that the cmd nettel ip:6379 is still the same.
5. Finally, check whether the configuration file is successfully configured and whether the service is up.
ps -ef | grep redis no problem. The service starts normally
6. Suddenly I thought that the port was not added to redis when the linux firewall just installed redis
Solution: Turn off the firewall or join redis because you are on your computer. It's simply rude.
service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
Everything is OK. . . .