Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis cluster connection failure #98

Open
fatihbm opened this issue Mar 3, 2022 · 2 comments
Open

redis cluster connection failure #98

fatihbm opened this issue Mar 3, 2022 · 2 comments

Comments

@fatihbm
Copy link

fatihbm commented Mar 3, 2022

Hi, I have an interesting issue
I wanna use the Redis cluster for the high available proxy cache but something is wrong and I couldn't find the reason.
I printed an extra error.log for a better understanding of this. You can see this on lines 107 and 111.
After doing this, when I open the error.log, I noticed the strange situation that you can see below.
The IP and port information are correct in the first six lines, but these are incorrect in the following lines.
So the port numbers are right, but the IP addresses somehow change to 127.0.0.1.

Has anyone encountered this before? What is your suggestion for a solution?
Ps. The log was generated to only one HTTP request.

rediscluster.lua
image

http error logs;

2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 192.168.55.51:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 192.168.55.52:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 192.168.55.53:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 192.168.55.54:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 192.168.55.55:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 192.168.55.50:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:107: try_hosts_slots(): debug --ccc-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7000, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7003, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7001, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7004, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7002, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
2022/03/03 14:18:32 [] 10106#10106: *276 [lua] rediscluster.lua:111: try_hosts_slots(): debug --iii-- 127.0.0.1:7005, client: 192.168.44.1, server: _, request: "GET / HTTP/1.1", host: "abc.cc"
@toredash
Copy link
Contributor

toredash commented Mar 3, 2022

Could you give us your config?

@fatihbm
Copy link
Author

fatihbm commented Mar 3, 2022

Sorry, I couldn't know how can I do it because I use this with apisix. I don't use any special configuration. Maybe following links give you any ideas.

https://apisix.apache.org/docs/apisix/2.7/plugins/limit-count
https://github.com/apache/apisix/blob/d4154bc0a02511f77785a965a4f6285b700997dd/apisix/plugins/limit-count/limit-count-redis-cluster.lua#L41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants