docker中的Redis无法连接

我运行在ip 10.201.57.26的docker集装箱的Redis服务器,它的工作很好,直到有一段时间。 telnet 10.201.57.26 6379的输出如下:

 [root@service-6-125 ~]# telnet 10.201.57.26 6379 Trying 10.201.57.26... Connected to 10.201.57.26. Escape character is '^]'. info Connection closed by foreign host. 

但使用docker exec与容器进行交互后,它再次运行良好:

 [root@service-6-125 ~]# docker exec -it 1cbe1335bf94 /bin/sh /data/redis # exit [root@service-6-125 ~]# telnet 10.201.57.26 6379 Trying 10.201.57.26... Connected to 10.201.57.26. Escape character is '^]'. info $2418 # Server redis_version:3.2.11 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:dd9e4fe7ae130e8b redis_mode:standalone os:Linux 3.10.0-123.el7.x86_64 x86_64 arch_bits:64 multiplexing_api:epoll 

但是这与nsenter无法与容器交互:

 [root@service-6-125 ~]# nsenter --target 187555 --mount --uts --ipc --net --pid -- /bin/sh / # . /etc/profile 49:/# [root@service-6-125 ~]# telnet 10.201.57.26 6379 Trying 10.201.57.26... Connected to 10.201.57.26. Escape character is '^]'. info Connection closed by foreign host. 

过程和networking连接信息如下所示:

 49:/# ps PID USER TIME COMMAND 1 redis 5:29 redis-server /data/config/redis.conf 152 root 0:00 /bin/sh 159 root 0:00 ps 49:/# top Mem: 7771316K used, 240604K free, 412668K shrd, 421048K buff, 5211372K cached CPU: 0% usr 0% sys 0% nic 100% idle 0% io 0% irq 0% sirq Load average: 0.44 0.55 0.72 2/1770 155 PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND 1 0 redis R 75884 1% 1 0% redis-server /data/config/redis.conf 152 0 root S 1520 0% 0 0% /bin/sh 155 152 root R 1508 0% 2 0% top 49:/# netstat -antp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 129 0 0.0.0.0:6379 0.0.0.0:* LISTEN 1/redis-server tcp 0 0 10.201.57.26:6379 10.201.57.1:56259 SYN_RECV - 49:/# 

redis的进程状态始终保持为R ,并且每个进入的连接都是SYN_RECV 。 就像redis进程被状态为R的容器冻结一样,只有docker exec可以响应。 为什么? 请帮忙。 谢谢。