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 2022/01/28 03:50:38 UTC

[GitHub] [apisix] 1657486787 opened a new issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

1657486787 opened a new issue #6221:
URL: https://github.com/apache/apisix/issues/6221


   ### Issue description
   
   Setting rejected_msg in "limit-req" plugin does not save
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - 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`):
   
   
   ### Steps to reproduce
   
   1.Set rejected_msg in "limit-req" plugin , eg:
   {
     "rate": 1,
     "burst": 1,
     "key_type": "var",
     "key": "1",
     "rejected_code": 503,
     "nodelay": false,
     "rejected_msg":"请求太多了,稍后重试..."
   }
   2. After saving, go in and check again, and find that it is not saved, eg:
   {
     "rate": 1,
     "burst": 1,
     "key_type": "var",
     "key": "1",
     "rejected_code": 503,
     "nodelay": false
   }
   
   
   ### Actual result
   
   {
     "rate": 1,
     "burst": 1,
     "key_type": "var",
     "key": "1",
     "rejected_code": 503,
     "nodelay": false
   }
   
   ### Error log
   
   nothing 
   
   ### Expected result
   
   {
     "rate": 1,
     "burst": 1,
     "key_type": "var",
     "key": "1",
     "rejected_code": 503,
     "nodelay": false,
     "rejected_msg":"请求太多了,稍后重试..."
   }


-- 
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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1031160335


   > Can you post the full configuration of this route in etcd? That way I can verify it directly.
   
   the configuration is:
   {
     "uri": "/dw2/*",
     "name": "route_limit_req",
     "methods": [
       "GET"
     ],
     "plugins": {
       "ext-plugin-pre-req": {
         "conf": [
           {
             "name": "TokenValidator",
             "value": "{\"validate_header\":\"token\",\"validate_url\":\"434\",\"rejected_code\":\"406\"}"
           }
         ],
         "disable": true
       },
       "limit-req": {
         "burst": 1,
         "disable": false,
         "key": "1",
         "key_type": "var",
         "nodelay": false,
         "rate": 1,
         "rejected_code": 503,
         "rejected_msg": "请求太多了,稍后重试..."
       },
       "request-id": {
         "disable": true,
         "header_name": "mk-id",
         "include_in_response": true
       },
       "response-rewrite": {
         "body_base64": false,
         "disable": true,
         "headers": {
           "X-Server-balancer_addr": "$balancer_ip:$balancer_port",
           "X-Server-id": 3,
           "X-Server-status": "on",
           "body": "{\"code\":\"ok\",\"message\":\"new json body\"}"
         },
         "vars": [
           [
             "status",
             "==",
             200
           ]
         ]
       }
     },
     "upstream_id": "392266237876372160",
     "status": 1
   }
   
   
   
   1.Set rejected_msg in "limit-req" plugin , eg:
   ![image](https://user-images.githubusercontent.com/44360272/152744808-cc50c7ae-4ee1-43ea-bc7e-fe10d20222dc.png)
   
   2. After saving, go in and check again, and find that it is not saved, eg:
   ![image](https://user-images.githubusercontent.com/44360272/152745335-af36a46e-e42b-4ffe-8f4e-e947e9552e60.png)
   
   
   


-- 
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 #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1024834773


   Can you post the full configuration of this route in etcd? That way I can verify it directly.


-- 
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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032170624


   > > > Can you post the full configuration of this route in etcd? That way I can verify it directly.
   > > 
   > > 
   > > the configuration is: { "uri": "/dw2/*", "name": "route_limit_req", "methods": [ "GET" ], "plugins": { "ext-plugin-pre-req": { "conf": [ { "name": "TokenValidator", "value": "{"validate_header":"token","validate_url":"434","rejected_code":"406"}" } ], "disable": true }, "limit-req": { "burst": 1, "disable": false, "key": "1", "key_type": "var", "nodelay": false, "rate": 1, "rejected_code": 503, "rejected_msg": "请求太多了,稍后重试..." }, "request-id": { "disable": true, "header_name": "mk-id", "include_in_response": true }, "response-rewrite": { "body_base64": false, "disable": true, "headers": { "X-Server-balancer_addr": "$balancer_ip:$balancer_port", "X-Server-id": 3, "X-Server-status": "on", "body": "{"code":"ok","message":"new json body"}" }, "vars": [ [ "status", "==", 200 ] ] } }, "upstream_id": "392266237876372160", "status": 1 }
   > > 1.Set rejected_msg in "limit-req" plugin , eg: ![image](https://user-images.githubusercontent.com/44360272/152744808-cc50c7ae-4ee1-43ea-bc7e-fe10d20222dc.png)
   > > 
   > > 2. After saving, go in and check again, and find that it is not saved, eg:
   > >    ![image](https://user-images.githubusercontent.com/44360272/152745335-af36a46e-e42b-4ffe-8f4e-e947e9552e60.png)
   > 
   > What's the dashboard version?
   
   2.10.1
   


-- 
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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032171838


   > > @guoqqqi @bzp2010 I tried to add the plugin with curl without any problem, is it because dashboard doesn't support it?
   > 
   > I just tried it with the dashboard and couldn't reproduce the problem either.
   
   I use dashboard version is  2.10.1, do you try?


-- 
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 #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1023982964


   How did you create the plugin? Using Admin API or Manager API?


-- 
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] 1657486787 removed a comment on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 removed a comment on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032170454


   > 
   2.10.1
   
   


-- 
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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032170454


   > 
   2.10.1
   
   


-- 
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 #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1031335670


   > > Can you post the full configuration of this route in etcd? That way I can verify it directly.
   > 
   > the configuration is: { "uri": "/dw2/*", "name": "route_limit_req", "methods": [ "GET" ], "plugins": { "ext-plugin-pre-req": { "conf": [ { "name": "TokenValidator", "value": "{"validate_header":"token","validate_url":"434","rejected_code":"406"}" } ], "disable": true }, "limit-req": { "burst": 1, "disable": false, "key": "1", "key_type": "var", "nodelay": false, "rate": 1, "rejected_code": 503, "rejected_msg": "请求太多了,稍后重试..." }, "request-id": { "disable": true, "header_name": "mk-id", "include_in_response": true }, "response-rewrite": { "body_base64": false, "disable": true, "headers": { "X-Server-balancer_addr": "$balancer_ip:$balancer_port", "X-Server-id": 3, "X-Server-status": "on", "body": "{"code":"ok","message":"new json body"}" }, "vars": [ [ "status", "==", 200 ] ] } }, "upstream_id": "392266237876372160", "status": 1 }
   > 
   > 1.Set rejected_msg in "limit-req" plugin , eg: ![image](https://user-images.githubusercontent.com/44360272/152744808-cc50c7ae-4ee1-43ea-bc7e-fe10d20222dc.png)
   > 
   > 2. After saving, go in and check again, and find that it is not saved, eg:
   >    ![image](https://user-images.githubusercontent.com/44360272/152745335-af36a46e-e42b-4ffe-8f4e-e947e9552e60.png)
   
   What's the dashboard 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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1024015553


   > How did you create the plugin? Using Admin API or Manager API?
   
   using manager api


-- 
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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032327257


   > > I use dashboard version is 2.10.1, do you try?
   > 
   > @1657486787 The test environment was launched with [`apisix-docker`](https://github.com/apache/apisix-docker/blob/master/example/docker-compose.yml), and the `apisix-dashboard` [version](https://github.com/apache/apisix-docker/blob/3dc527ccfffee9be48aa3bd4508bae59ce218f06/example/docker-compose.yml?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L22) is 2.10.1
   > 
   > Can you restart the `apisix-dashborad` and try again?
   
   I just tested restarting `apisix-dashborad` , but it didn't work


-- 
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 #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1031172542


   @guoqqqi @bzp2010 I tried to add the plugin with curl without any problem, is it because dashboard doesn't support 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] leslie-tsang commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1023862897


   Hello there, Please provide you environment info in the description.


-- 
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] leslie-tsang commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032201794


   > I use dashboard version is 2.10.1, do you try?
   
   @1657486787 The test environment was launched with [`apisix-docker`](https://github.com/apache/apisix-docker/blob/master/example/docker-compose.yml), and the `apisix-dashboard` [version](https://github.com/apache/apisix-docker/blob/3dc527ccfffee9be48aa3bd4508bae59ce218f06/example/docker-compose.yml?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L22) is 2.10.1


-- 
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] leslie-tsang commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032305537


   @1657486787 There seems to be something to do with https://github.com/apache/apisix-dashboard/issues/2285


-- 
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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1023891781


   > Hello there, Please provide you environment info in the description.
   ok ,my environment info :
   
   - apisix version (cmd: `apisix version`):2.12
   - OS (cmd: `uname -a`):Linux wx-2 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   
   


-- 
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] leslie-tsang commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1031204707


   > @guoqqqi @bzp2010 I tried to add the plugin with curl without any problem, is it because dashboard doesn't support it?
   
   I just tried it with the dashboard and couldn't reproduce the problem either.


-- 
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] 1657486787 commented on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
1657486787 commented on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032170177


   > I tried to add the plugin with curl without any problem, is it because dashboard doesn't support it?
   
   I think so


-- 
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] leslie-tsang edited a comment on issue #6221: bug: Setting rejected_msg in "limit-req" plugin does not save

Posted by GitBox <gi...@apache.org>.
leslie-tsang edited a comment on issue #6221:
URL: https://github.com/apache/apisix/issues/6221#issuecomment-1032201794


   > I use dashboard version is 2.10.1, do you try?
   
   @1657486787 The test environment was launched with [`apisix-docker`](https://github.com/apache/apisix-docker/blob/master/example/docker-compose.yml), and the `apisix-dashboard` [version](https://github.com/apache/apisix-docker/blob/3dc527ccfffee9be48aa3bd4508bae59ce218f06/example/docker-compose.yml?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L22) is 2.10.1
   
   Can you restart the `apisix-dashborad` and try again?


-- 
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