在虚拟机上,我的netstat是:
$ netstat -a | egrep 'Proto|LISTEN'
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:6379 *:* LISTEN
tcp 0 0 *:6767 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:35478 *:* LISTEN
tcp 0 0 localhost:postgresql *:* LISTEN
tcp 0 0 *:8000 *:* LISTEN
tcp6 0 0 [::]:sunrpc [::]:* LISTEN
tcp6 0 0 [::]:45424 [::]:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
当我尝试从主机连接时,我得到:
$ redis-cli -h 192.168.33.10 -p 6379
Could not connect to Redis at 192.168.33.10:6379: Connection refused
不知道还能做什么。有什么想法吗?
谢谢!
答案1
该服务正在监听 127.0.0.1
tcp 0 0 localhost:6379 *:* LISTEN