You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/11/30 07:58:44 UTC
[GitHub] [apisix] jianmaikj opened a new issue #5648: limit-count plugin does not work in redis mode?
jianmaikj opened a new issue #5648:
URL: https://github.com/apache/apisix/issues/5648
### Issue description
When the policy is redis, this error occurs: `limit-count.lua:187: phase_func(): failed to limit count: connection refused`,
Tested that redis is normally connectable
### Environment
- apisix version (cmd: `apisix version`):2.10
- OS (cmd: `uname -a`):Centos 7.6
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
- etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
- apisix-dashboard version, if have:
- the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
- luarocks version, if the issue is about installation (cmd: `luarocks --version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jianmaikj commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
jianmaikj commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-982500938
upstream:

route:

When the policy is local or limit-count is not enabled, everything is ok.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-982610480
from the error log, it is clear that this is a network connection problem.
> Tested that redis is normally connectable
How did you tested it was normal?
Can you capture network packets?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jianmaikj edited a comment on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
jianmaikj edited a comment on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-984440347
> Sorry. The people who said the problem is solved isn't the author of this issue.
Redis is installed on the host, and the host client can connect and use normally.

In addition, redis is used in other containers in the host, which is normal.
Tested that the Kong gateway enabled rate-limit plug-in is also normal (redis mode).
I have tried ip as 127.0.0.1 and 172.18.0.1 but they all doesn’t work, I don’t understand why
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] ybbtuubj commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
ybbtuubj commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-982450472
我自己写的自定义插件,用的limit-count-redis.lua里面的代码,几乎一模一样复制过来的

上图是代码,然后错误里面显示

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tokers commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-984460641
> > Sorry. The people who said the problem is solved isn't the author of this issue.
>
> Redis is installed on the host, and the host client can connect and use normally.  In addition, redis is used in other containers in the host, which is normal. Tested that the Kong gateway enabled rate-limit plug-in is also normal (redis mode). I have tried ip as 127.0.0.1 and 172.18.0.1 but they all doesn’t work, I don’t understand why
Where did you deploy APISIX? Host or container?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] ybbtuubj commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
ybbtuubj commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-982445335
同样的问题,也是2.10版本,我的redis版本是6.2.6 用的127,0,0.1 6379 redis和apisix都在本地 用redis-cli本地测试redis没有问题
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-983489740
Consider solved?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jianmaikj commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
jianmaikj commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-984497140
> > > Sorry. The people who said the problem is solved isn't the author of this issue.
> >
> >
> > Redis is installed on the host, and the host client can connect and use normally.  In addition, redis is used in other containers in the host, which is normal. Tested that the Kong gateway enabled rate-limit plug-in is also normal (redis mode). I have tried ip as 127.0.0.1 and 172.18.0.1 but they all doesn’t work, I don’t understand why
>
> Where did you deploy APISIX? Host or container?
Deploy with container,and after I changed to host mode, it works normally. Is there a way to bridge mode?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tokers commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-982446254
What's the route looks like?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] ybbtuubj commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
ybbtuubj commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-983208082
嗯,我那个问题早上测了下是我自己的问题,我用容器创建的redis,是容器网络配置的问题。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-985133281
> 用容器部署,我改成host模式后就正常了
So it seems that this is not a problem with the plugin, but with access to the host network within the container.
> 有没有桥接模式的方法?
I'm not too familiar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tokers commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-982443074
Please provide more details about this, also, please provide the way you test the redis.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-983493254
Sorry. The people who said the problem is solved isn't the author of this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander edited a comment on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-983489740
Consider solved. Feel free to reopen it if need.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5648:
URL: https://github.com/apache/apisix/issues/5648
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tokers commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-985138730
> > > > Sorry. The people who said the problem is solved isn't the author of this issue.
> > >
> > >
> > > Redis is installed on the host, and the host client can connect and use normally.  In addition, redis is used in other containers in the host, which is normal. Tested that the Kong gateway enabled rate-limit plug-in is also normal (redis mode). I have tried ip as 127.0.0.1 and 172.18.0.1 but they all doesn’t work, I don’t understand why
> >
> >
> > Where did you deploy APISIX? Host or container?
> > Deploy with container,and after I changed to host mode, it works normally. Is there a way to bridge mode?
You can also run the redis in container with the same container network.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] fatihbm commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
fatihbm commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-1058893686
>
I'm having a similar problem. I don't understand the purpose of why I should open a new issue. If this is still necessary, I will of course open it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-1059031133
> I'm having a similar problem. I don't understand the purpose of why I should open a new issue
1. you did not provide steps to reproduce the problem, even if it was similar.
2. you provide an error log in another project.
3. opening a new issue helps us to focus on solving your issue, which we do when it is necessary to merge issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] fatihbm commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
fatihbm commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-1058651293
> Hi There is the same issue own setup. We try the Redis cluster, but It has unsuccessful connection errors. I think the root cause is related to [lua-resty-redis-cluster](https://github.com/api7/lua-resty-redis-cluster), but I couldn't find any evidence. I opened another issue where you can find some more details about it. [steve0511/resty-redis-cluster#98](https://github.com/steve0511/resty-redis-cluster/issues/98)
By the way, our Redis cluster is setup on a virtual machine. I don't use the container. Also, Redis client can connect to any Redis nodes from any apisix node.
```
root@apisix3:/apisix-2.12.1# redis-cli -h 192.168.55.50 -p 7000 ping
PONG
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-1058738037
> Hi There is the same issue own setup. We try the Redis cluster, but It has unsuccessful connection errors. I think the root cause is related to [lua-resty-redis-cluster](https://github.com/api7/lua-resty-redis-cluster), but I couldn't find any evidence. I opened another issue where you can find some more details about it. [steve0511/resty-redis-cluster#98](https://github.com/steve0511/resty-redis-cluster/issues/98)
can you submit an new issue to trace this problem?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] fatihbm commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
fatihbm commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-1058636311
Hi
There is the same issue own setup. We try the Redis cluster, but It has unsuccessful connection errors. I think the root cause is related to [lua-resty-redis-cluster](https://github.com/api7/lua-resty-redis-cluster), but I couldn't find any evidence.
I opened another issue where you can find some more details about it.
https://github.com/steve0511/resty-redis-cluster/issues/98
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tokers edited a comment on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
tokers edited a comment on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-982446254
What does the route/upstream configurations look like?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jianmaikj commented on issue #5648: limit-count plugin does not work in redis mode?
Posted by GitBox <gi...@apache.org>.
jianmaikj commented on issue #5648:
URL: https://github.com/apache/apisix/issues/5648#issuecomment-984440347
> Sorry. The people who said the problem is solved isn't the author of this issue.
Redis is installed on the host, and the host client can connect and use normally.

In addition, redis is used in other containers in the host, which is normal.
I have tried ip as 127.0.0.1 and 172.18.0.1 but they all doesn’t work, I don’t understand why
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org