REDIS Stops Listening to IPV4 Address

449 views
Skip to first unread message

psch...@crittercism.com

unread,
Oct 2, 2014, 7:59:05 PM10/2/14
to redi...@googlegroups.com
Hello, 


So we had a strange issue with REDIS recently in which the process stopped listening to the IPV4 address but not the IPV6 address. Our redis listens to port 6379, below our some console outputs of netstat and lsof that show the process not listening on IPV4 address. Any ideas? Since we don't have logs for redis my step is to get logging enabled. 



xxxx: ~$ lsof -i :6379
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
redis-ser 2472 redis 5u IPv6 204590 0t0 TCP *:6379 (LISTEN)

xxxx: ~$ netstat -tnlp
(No info could be read for "-p": geteuid()=1015 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:5666            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8126            0.0.0.0:*               LISTEN      -
tcp6       0      0 :::6379                 :::*                    LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 :::25                   :::*                    LISTEN      -

Matt Palmer

unread,
Oct 6, 2014, 12:06:40 AM10/6/14
to redi...@googlegroups.com
On Thu, Oct 02, 2014 at 04:59:05PM -0700, psch...@crittercism.com wrote:
> So we had a strange issue with REDIS recently in which the process stopped
> listening to the IPV4 address but not the IPV6 address. Our redis listens
> to port 6379, below our some console outputs of netstat and lsof that show
> the process not listening on IPV4 address. Any ideas? Since we don't have
> logs for redis my step is to get logging enabled.
>
>
>
> xxxx: ~$ lsof -i :6379
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> redis-ser 2472 redis 5u IPv6 204590 0t0 TCP *:6379 (LISTEN)

Depending on your OS and its configuration, that may well be a completely
valid listening spec to get both native IPv6 and v6-mapped IPv4 connections.
Some OSes even have knobs that can be twiddled to change the v6-mapping
behaviour, so if the configuration used to work and now doesn't, you might
want to discuss the issue with whoever has their hand on the sysctl knobs on
that machine.

- Matt

--
I was punching a text message into my phone yesterday and thought, "they need
to make a phone that you can just talk into."
-- Major Thomb

psch...@crittercism.com

unread,
Oct 7, 2014, 6:34:42 PM10/7/14
to redi...@googlegroups.com, mpa...@hezmatt.org
Thanks a bunch Matt, 

It was later discovered that redis would startup not listening on IPV4. We would just restart it till it listened onto IPV4.

Caleb Spare

unread,
Jan 21, 2016, 4:08:57 PM1/21/16
to Redis DB, mpa...@hezmatt.org, psch...@crittercism.com
I ran into this as well and filed https://github.com/antirez/redis/issues/3020.
Reply all
Reply to author
Forward
0 new messages