06:00:47 GMT Is there a recommended guide for configuring a cluster? I am attempting to follow the clustering tutorial on redis.io site, and I'm failing. is there a "reset all nodes" forget everything command? 08:43:52 GMT hey everyone 08:44:11 GMT I am trying to set a couple of sentinels but there's something wrong somewhere 08:44:41 GMT I have one sentinel + redis per server, 3 servers, on a pseudo-lan (vpn) 08:45:06 GMT how is sentinel supposed to spot the other sentinels? 08:45:09 GMT I think that's the main problem 08:45:33 GMT because: master0:name=redis-net,status=sdown,address=10.0.0.1:6379,slaves=2,sentinels=1 08:49:03 GMT kralor, sentinels use ordinary redis servers for exchanging data (state information) with each other. 08:49:37 GMT ok thanks 08:49:39 GMT afaict (just recently started exploring sentinel myself) your redis master candidates must be configured as slaves of one master initially 08:49:49 GMT they are 08:49:56 GMT I tested the master-slave stuff and it works 08:50:31 GMT hence: slaves=2 in what I pasted btw 08:50:41 GMT good :) 08:58:17 GMT if I restart a redis-sentinel it says: +sdown master redis-net 10.0.0.1 6379 08:59:00 GMT "Each Sentinel detects the master is down with an +sdown event." ... 08:59:26 GMT which is wrong .. 09:06:53 GMT ok found the bug 09:07:30 GMT "one of them" at least 09:07:45 GMT if you bind the interface to: 127.0.0.1 10.0.0.1 09:08:22 GMT redis (or sentinel?) will bind the socket to the first address, and then try to connect it to the master (which is on the interface interface not lo obviously) 09:08:44 GMT kralor, this is my 3-node-playground setup that works: http://paste.debian.net/hidden/2f4b9686/ 09:08:47 GMT bind(8, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 09:08:55 GMT connect(8, {sa_family=AF_INET, sin_port=htons(6379), sin_addr=inet_addr("10.0.0.1")}, 16) = -1 EINVAL (Invalid argument 09:08:58 GMT strace output 09:08:59 GMT "protected-mode no" is key, iirc 09:09:02 GMT that's why it couldn't reach the master 09:09:16 GMT I did it, it is a bug in redis code 09:24:58 GMT it works now, I changed "bind 127.0.0.1 10.0.0.x" (x == lan interface) to "bind 10.0.0.x" in redis and sentinel confs (3 servers) 09:25:54 GMT so yeah it seems to be a logical bug, like: s = socket(), bind(s, "first iface"), connect(s, "to second iface"). 09:26:14 GMT I don't know if it is clear enough to understand 09:43:03 GMT kralor: not much of a bug, more the way it is done in Redis 09:43:10 GMT but yes, it is unexpected sometimes 10:13:58 GMT badboy_: when in the code, you bind a socket to the wrong interface I call it a bug 10:14:15 GMT you are trying to reach 10.0.0.0/16 and you bind on 127.0.0.1? come on ;) 10:14:54 GMT yeah, but how should it figure out which interface works? 10:15:01 GMT Redis goes the easy way and just uses the first 10:15:02 GMT don't bind yourself 10:15:18 GMT the OS will sort it out for you 10:15:20 GMT That would be one way 10:15:25 GMT the main question: why do you have to bind the outgoing connection 10:15:35 GMT but Redis needs to make sure it uses a fixed address to communicate 10:15:40 GMT that's why it explicitely binds 10:15:40 GMT if there's a good reason then there will be a good solution, but if not required, don't 10:16:55 GMT I think there's a misconecption somewhere then if you guys think a fixed address can only be obtained through binding (even more when it is an outgoing connection) 10:16:58 GMT furthermore 10:17:00 GMT look the output 10:17:05 GMT bind(8, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 10:17:09 GMT connect(8, {sa_family=AF_INET, sin_port=htons(6379), sin_addr=inet_addr("10.0.0.1")}, 16) = -1 EINVAL (Invalid argument 10:17:15 GMT it doesn't even bind to a specific port 10:17:23 GMT so really, I don't see any advantage here 10:17:59 GMT there was _some_ reason, I would have to look it up though 10:18:42 GMT ok, at least now you know if causes problems when trying to use lo and some other interface ;) 10:18:47 GMT why would it bind to a specific _outgoing_ port? 10:19:07 GMT I do know it causes problems for users if bound in the wrong order :) 10:19:11 GMT well that could have been a reason to bind to a specific IP address (-> interface) 10:19:24 GMT I mean like, you only want source port beeing 1337 10:19:44 GMT then again it is not my project, so I can't make the decisions ¯\_(ツ)_/¯ 10:20:04 GMT heh ok ;)