Rad*_*dek 1 scripting bash port telnet
当我跑步时,'(sleep 1; echo flush_all; sleep 1; echo quit; ) | telnet localhost 11211'
我得到
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
OK
Connection closed by foreign host.
Run Code Online (Sandbox Code Playgroud)
上面的命令做了我想要的,但那::1
部分呢?
侦听端口 11211 的软件不支持 IPv6。由于 localhost 是 hosts 文件中的一个条目,它首先尝试使用 IPv6 地址,因此您只能在 IPv6 失败后故障回退到 IPv4。您可以通过更新软件(或正确配置为侦听 IPv6,如果它是配置文件中的一个选项)或将命令更改telnet 127.0.0.1
为telnet localhost
.
归档时间: |
|
查看次数: |
22200 次 |
最近记录: |