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/08/29 15:53:13 UTC
[GitHub] [apisix] pawarJayesh8511 opened a new issue #4925: bug: client-control is not working
pawarJayesh8511 opened a new issue #4925:
URL: https://github.com/apache/apisix/issues/4925
### Issue description
I have configured the following route. Expected result should be APISIX should reject the if
we get the request body size greater than 2, but it not happening like that.
Route:
{
"key":"/apisix/routes/1711",
"createdIndex":1712,
"modifiedIndex":1721,
"value":{
"update_time":1630093621,
"create_time":1630093094,
"id":"1711",
"upstream":{
"nodes":{
"xxx.xxx.xx.1:9282":1
},
"scheme":"http",
"hash_on":"vars",
"type":"roundrobin",
"pass_host":"pass"
},
"uri":"\/api\/upload",
"status":1,
"priority":0,
"plugins":{
"client-control":{
"max_body_size":2
}
}
}
}
Output from Upstream system:
curl -i http://xxx.xxx.xx.1:9282/api/upload -d '123'
Output:
HTTP/1.1 200
Content-Type: text/plain;charset=UTF-8
Content-Length: 50
Date: Sun, 29 Aug 2021 15:46:08 GMT
This endpoint is for client control plugin testing
Output from APISIX gateway:
curl -i httcurl -i http://127.0.0.1:9080/api/upload -d '1'
Output:
HTTP/1.1 503 Service Temporarily Unavailable
Date: Sun, 29 Aug 2021 15:47:17 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 194
Connection: keep-alive
Server: APISIX/2.8
<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>openresty</center>
</body>
</html>
### Environment
- apisix version (cmd: apisix version): 2.8
- OS (cmd: uname -a): Linux my-machine 5.11.0-27-generic
- conf: removed user resty and add server header. #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- OpenResty / Nginx version (cmd: nginx -V or openresty -V): nginx version: openresty/1.19.9.1
- etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API): 3.4.0
- apisix-dashboard version, if have: 2.7
- luarocks version, if the issue is about installation (cmd: luarocks --version): 3.4.0
### Steps to reproduce
I have followed the steps in this document:
https://apisix.apache.org/docs/apisix/plugins/client-control
### Actual result
curl -i http://127.0.0.1:9080/api/upload -d '1'
Output:
HTTP/1.1 503 Service Temporarily Unavailable
Date: Sun, 29 Aug 2021 15:47:42 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 194
Connection: keep-alive
Server: APISIX/2.8
<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>openresty</center>
</body>
</html>
--------------------------------------------------------
When we directly upload data to upstream API then it is able to upload
curl -i http://192.168.56.1:9282/api/upload -d '1'
Output:
HTTP/1.1 200
Content-Type: text/plain;charset=UTF-8
Content-Length: 50
Date: Sun, 29 Aug 2021 15:50:43 GMT
This endpoint is for client control plugin testing
### Error log
2021/08/29 21:17:42 [warn] 6062#6062: *313291 [lua] plugin.lua:658: run_plugin(): client-control exits with http status code 503, client: 127.0.0.1, server: _, request: "POST /api/upload HTTP/1.1", host: "127.0.0.1:9080"
### Expected result
curl -i http://127.0.0.1:9080/api/upload -d '1'
This should give the following output
This endpoint is for client control plugin testing
But, it is not happening.
--
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 #4925: bug: client-control is not working
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4925:
URL: https://github.com/apache/apisix/issues/4925#issuecomment-907926951
Please read the doc: http://apisix.apache.org/docs/apisix/plugins/client-control#name
> This plugin requires APISIX to run on APISIX-OpenResty.
And build APISIX-OpenResty: https://github.com/api7/apisix-build-tools
--
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 #4925: bug: client-control is not working
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4925:
URL: https://github.com/apache/apisix/issues/4925
--
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