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 2020/11/23 10:31:46 UTC

[GitHub] [apisix-dashboard] cleverpig opened a new issue #856: After create a consumer on dashboard, apisix throw a exception

cleverpig opened a new issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856


   # Bug report
   
   After create a consumer on dashboard with this config.
   {"algorithm":"HS256","base64_secret":false,"exp":86400,"key":"123"}
   
   then Apisix throws exception:
   2020/11/23 18:20:25 [error] 3694#3694: *40311 [lua] config_etcd.lua:483: failed to fetch data from etcd: failed to check item data of [/apisix/consumers] err:additional properties forbidden, found id,  etcd key: /apisix/consumers, context: ngx.timer
   
   And if deleted this consumer, exception will disappear.
   
   ## How to Reproduce
   
   1. Go to 'main menu'
   2. Click on 'consumer'
   3. Add new consumer with jwt auth.
   4. See error in apisix log output
   
   ## System information
   
   - OS: Centos7
   - Browser: Chrome, Firefox
   - dashboard version: checkout from the master 
   - apisix version: checkout from the master
   
   ## Screensnap
   ![image](https://user-images.githubusercontent.com/580435/99951815-a4ae0600-2db9-11eb-840f-1ad1eb8800e8.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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736628515


   > this depends on APISIX, we can fix this bug at `2.2`. @nic-chen would you like to create a new issue to APISIX?
   > 
   APISIX fixed this by addon code,not schema
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736617039


   there are two bugs:
   1. when user not fill in `remote address` , `remote_addrs` should be [], but not [""]
   2. the field `secret` of plugin `jwt-auth` should be required. 
   
   @membphis @juzhiyuan @spacewander 
    
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734822827


   > 
   > 
   > It may be the default value from json schema problem
   
   @nic-chen 
   Do you mean the `"remote_addrs":[""]` in @cleverpig's route?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736624035


   > * when user not fill in `remote address` , `remote_addrs` should be [], but not [""]
   
   When the user not filled, should no field `remote_addrs`. this should be a bug of the frontend. @juzhiyuan 
   
   BTW, I think `[""]` should be an invalid input, the JSON schema should return wrong. I make a test, confirm this.
   
   > * the field `secret` of plugin `jwt-auth` should be required.
   
   this depends on APISIX, we can fix this bug at `2.2`. @nic-chen would you like to create a new issue to APISIX?
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734801426


   my route configuration :
   ```
   /apisix/routes/
   init_dir
   /apisix/routes/328530522223411227
   {"id":"328530522223411227","create_time":1605349050,"update_time":1606124128,"uris":["/index.html"],"name":"httpd-front","methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"hosts":["192.168.56.101"],"vars":[],"plugins":{"limit-conn":{"burst":4,"conn":2,"default_conn_delay":2,"key":"remote_addr","rejected_code":503},"limit-req":{"burst":5,"key":"remote_addr","rate":2,"rejected_code":503}},"upstream_id":"328530185320136731"}
   /apisix/routes/328543152380051483
   {"id":"328543152380051483","create_time":1605356578,"update_time":1606120439,"uris":["/demo/*"],"name":"swPractice","methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"hosts":["192.168.56.101"],"vars":[],"plugins":{"skywalking":{"endpoint":"http://192.168.56.101:12800","sample_ratio":1}},"upstream_id":"328543040492797979"}
   /apisix/routes/329827033766952987
   {"id":"329827033766952987","create_time":1606121831,"update_time":1606466025,"uris":["/jwt-auth.html"],"name":"httpd-jwt-test","methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"hosts":["192.168.56.101"],"remote_addrs":[""],"vars":[],"plugins":{"jwt-auth":{}},"upstream_id":"328530185320136731"}
   ```
   @spacewander 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734724040


   If I use curl script to access JWT authed page following the guide (https://github.com/apache/apisix/blob/master/doc/plugins/jwt-auth.md),
   Apisix will throw 500 exception.
   
   ```
   curl http://127.0.0.1:9080/index.html -H 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1c2VyLWtleSIsImV4cCI6MTYwNjU1MzYwMH0.GnuK08zLtaNyNW6NiqhkBlnxe7amZpSltU2dYDRRJM4' -i
   HTTP/1.1 500 Internal Server Error
   Date: Fri, 27 Nov 2020 08:54:08 GMT
   Content-Type: text/html; charset=utf-8
   Content-Length: 174
   Connection: close
   Server: APISIX/2.0
   
   <html>
   <head><title>500 Internal Server Error</title></head>
   <body>
   <center><h1>500 Internal Server Error</h1></center>
   <hr><center>openresty</center>
   </body>
   ```
   
   This is backend output:
   ```
   2020/11/27 16:54:08 [error] 3280#3280: *36299 lua entry thread aborted: runtime error: ...0-master-version//deps/share/lua/5.1/resty/radixtree.lua:380: invalid IP address: invalid ip address: 
   stack traceback:
   coroutine 0:
           [C]: in function 'error'
           ...0-master-version//deps/share/lua/5.1/resty/radixtree.lua:341: in function 'pre_insert_route'
           ...0-master-version//deps/share/lua/5.1/resty/radixtree.lua:380: in function 'new'
           .../git-storage/apisix/apisix/http/router/radixtree_uri.lua:77: in function 'create_radixtree_router'
           .../git-storage/apisix/apisix/http/router/radixtree_uri.lua:84: in function 'match'
           /app/install/git-storage/apisix/apisix/init.lua:382: in function 'fun_org'
           /app/install/git-storage/apisix/apisix/debug.lua:132: in function 'http_access_phase'
           access_by_lua(nginx.conf:163):2: in main chunk, client: 127.0.0.1, server: , request: "GET /index.html HTTP/1.1", host: "127.0.0.1:9080"
   ```


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736192131


   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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis edited a comment on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735243176


   @cleverpig you can make a try with the latest `master` branch or `2.1` branch
   
   https://github.com/apache/apisix/tree/v2.1
   
   I think this issue should have been fixed in APISIX


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735243176


   @cleverpig you can make a try with the latest `master` branch or `2.1` branch


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander edited a comment on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732514806


   I guess it is because consumer id is removed in the master branch. We need to update the stored etcd data.
   https://github.com/apache/apisix/pull/2679


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735640104


   @cleverpig 
   
   If you are convenient, please contact my QQ 4061470
   
   thanks.
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732572672


   https://github.com/apache/apisix/pull/2829
   
   @spacewander  Just to make sure, this PR will fix 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735201702


   @cleverpig 
   
   Please run etcdctl --endpoints=$your_server get /apisix/consumer --prefix to get your consumer configuration and paste them here. Thanks.
   
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734718924


   > [apache/apisix@c8823d0](https://github.com/apache/apisix/commit/c8823d0eedcdc6e329afc48d6f41e7c92637ae28)
   > 
   > fixed in APISIX already. @cleverpig you can make a try with this commit or the latest version of APISIX.
   
   @membphis 
   I checked out the master version of APISIX, the problem still stay on after I'd created a consumer from dashboard.
   ```
   2020/11/27 16:40:20 [error] 3280#3280: *53 [lua] config_etcd.lua:483: failed to fetch data from etcd: failed to check item data of [/apisix/consumers] err:additional properties forbidden, found id,  etcd key: /apisix/consumers, context: ngx.timer
   2020/11/27 16:40:20 [error] 3279#3279: *36 [lua] config_etcd.lua:483: failed to fetch data from etcd: failed to check item data of [/apisix/consumers] err:additional properties forbidden, found id,  etcd key: /apisix/consumers, context: ngx.timer
   2020/11/27 16:40:20 [error] 3283#3283: *16 [lua] config_etcd.lua:483: failed to fetch data from etcd: failed to check item data of [/apisix/consumers] err:additional properties forbidden, found id,  etcd key: /apisix/consumers, context: ngx.timer
   ```
   
   It's the output from git log:
   ```
   commit f4161d39a495879edffbc75e2099f6e487bae81d
   Author: willmafh <wi...@hotmail.com>
   Date:   Wed Nov 25 19:27:04 2020 +0800
   
       chore: minor change in bin/apisix (#2847)
   ....
   commit c8823d0eedcdc6e329afc48d6f41e7c92637ae28
   Author: 罗泽轩 <sp...@gmail.com>
   Date:   Tue Nov 24 11:02:44 2020 +0800
   
       **fix(consumer): keep the id field for compatibility (#2829)**
   ```
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735624995


   > @cleverpig
   > 
   > Please run etcdctl --endpoints=$your_server get /apisix/consumer --prefix to get your consumer configuration and paste them here. Thanks.
   
   ok, I ran "etcdctl --endpoints=IP:port get /apisix/consumer --prefix", and got these: 
   ```
   /apisix/consumers/
   init_dir
   /apisix/consumers/jack
   {"update_time":1606723309,"username":"jack","create_time":1606723309,"plugins":{"jwt-auth":{"secret":"my-secret-key","algorithm":"HS256","exp":86400,"key":"user-key"}}}
   ```
   
   @nic-chen 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732179960


   Hi, I think it's because Apisix-dashboard had written consumer data with id field into etcd.
   
   @cleverpig you can have a try on the v2.0 branch.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732512564


   > Please use the latest master codes, it's 2.1 now.
   
   I used the latest version.
   ```
   dashboard version: checkout from the master
   apisix version: checkout from the master
   ```
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander edited a comment on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732537568


   @cleverpig 
   ~~Could you show your dashboard commit so that we can reproduce the issue? It look like the latest dashboard (1a38fa6cf6540bc966098f6467a160312fb6b0fd) doesn't write the id to etcd.~~
   OK, I can confirm that the latest dashboard (1a38fa6cf6540bc966098f6467a160312fb6b0fd) does write the id to etcd.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734784304


   It may be the default value from json schema 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732105988


   hi,
   what is your APISIX and dashboard version?
   thanks.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732600680


   Yes


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734722240


   @spacewander  Do you have any suggestion?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis closed issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis closed issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen closed issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen closed issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734854361


   @spacewander 
   
   field `algorithm` defines a default value (HS256) in json schema, but creating a consumer on dashboard will not set this default value.
   
   it's for consumer not route.
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735532186


   Can't reproduce at my side, please make sure you are running the new code. Thanks. @cleverpig  


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735629306


   @idbeta please confirm if you can reproduce this error


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732537568


   @cleverpig 
   Could you show your dashboard commit so that we can reproduce the issue? It look like the latest dashboard (1a38fa6cf6540bc966098f6467a160312fb6b0fd) doesn't write the id to etcd.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen edited a comment on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen edited a comment on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735640104


   @cleverpig 
   
   If you are convenient, please contact my QQ
   
   thanks.
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander edited a comment on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732514806


   ~~I guess it is because consumer id is removed in the master branch. We need to update the stored etcd data.
   https://github.com/apache/apisix/pull/2679~~
   Sorry, I got it wrong. It looks more like dashboard's bug.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736635163


   > APISIX fixed this by addon code,not schema
   
   manager-api should keep the same way ^_^


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734756685


   > 
   > 
   > If I use curl script to access JWT authed page following the guide (https://github.com/apache/apisix/blob/master/doc/plugins/jwt-auth.md),
   > Apisix will throw 500 exception.
   > 
   > ```
   > curl http://127.0.0.1:9080/index.html -H 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1c2VyLWtleSIsImV4cCI6MTYwNjU1MzYwMH0.GnuK08zLtaNyNW6NiqhkBlnxe7amZpSltU2dYDRRJM4' -i
   > HTTP/1.1 500 Internal Server Error
   > Date: Fri, 27 Nov 2020 08:54:08 GMT
   > Content-Type: text/html; charset=utf-8
   > Content-Length: 174
   > Connection: close
   > Server: APISIX/2.0
   > 
   > <html>
   > <head><title>500 Internal Server Error</title></head>
   > <body>
   > <center><h1>500 Internal Server Error</h1></center>
   > <hr><center>openresty</center>
   > </body>
   > ```
   > 
   > This is backend output:
   > 
   > ```
   > 2020/11/27 16:54:08 [error] 3280#3280: *36299 lua entry thread aborted: runtime error: ...0-master-version//deps/share/lua/5.1/resty/radixtree.lua:380: invalid IP address: invalid ip address: 
   > stack traceback:
   > coroutine 0:
   >         [C]: in function 'error'
   >         ...0-master-version//deps/share/lua/5.1/resty/radixtree.lua:341: in function 'pre_insert_route'
   >         ...0-master-version//deps/share/lua/5.1/resty/radixtree.lua:380: in function 'new'
   >         .../git-storage/apisix/apisix/http/router/radixtree_uri.lua:77: in function 'create_radixtree_router'
   >         .../git-storage/apisix/apisix/http/router/radixtree_uri.lua:84: in function 'match'
   >         /app/install/git-storage/apisix/apisix/init.lua:382: in function 'fun_org'
   >         /app/install/git-storage/apisix/apisix/debug.lua:132: in function 'http_access_phase'
   >         access_by_lua(nginx.conf:163):2: in main chunk, client: 127.0.0.1, server: , request: "GET /index.html HTTP/1.1", host: "127.0.0.1:9080"
   > ```
   
   Please run `etcdctl --endpoints=$your_server get /apisix/route --prefix` to get your route configuration and paste them here.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735625381


   > @cleverpig you can make a try with the latest `master` branch or `2.1` branch
   > 
   > https://github.com/apache/apisix/tree/v2.1
   > 
   > I think this issue should have been fixed in APISIX
   
   Sorry,it still...I updated apisix and dashboard.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-735600537


   close it according we have test case for it:
   https://github.com/apache/apisix-dashboard/blob/master/api/test/e2e/route_with_auth_plugin_test.go#L38-L125
   
   feel free to reopen this issue 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] idbeta edited a comment on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
idbeta edited a comment on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732639178


   > @idbeta pls confirm this issue, it seems to be a bug
   
   ~My 2.1 version environment also has this problem.~
   
   sorry, 2.1 version environment did not reproduce 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732222624


   Please use the latest master codes, it's 2.1 now. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] idbeta commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732639178


   > @idbeta pls confirm this issue, it seems to be a bug
   
   My 2.1 version environment also has 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736597311


   Thanks for feedback. @cleverpig 
   
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-734726120


   > 
   > 
   > > [apache/apisix@c8823d0](https://github.com/apache/apisix/commit/c8823d0eedcdc6e329afc48d6f41e7c92637ae28)
   > > fixed in APISIX already. @cleverpig you can make a try with this commit or the latest version of APISIX.
   > 
   > @membphis
   > I checked out the master version of APISIX, the problem still stay on after I'd created a consumer from dashboard.
   > 
   > ```
   > 2020/11/27 16:40:20 [error] 3280#3280: *53 [lua] config_etcd.lua:483: failed to fetch data from etcd: failed to check item data of [/apisix/consumers] err:additional properties forbidden, found id,  etcd key: /apisix/consumers, context: ngx.timer
   > 2020/11/27 16:40:20 [error] 3279#3279: *36 [lua] config_etcd.lua:483: failed to fetch data from etcd: failed to check item data of [/apisix/consumers] err:additional properties forbidden, found id,  etcd key: /apisix/consumers, context: ngx.timer
   > 2020/11/27 16:40:20 [error] 3283#3283: *16 [lua] config_etcd.lua:483: failed to fetch data from etcd: failed to check item data of [/apisix/consumers] err:additional properties forbidden, found id,  etcd key: /apisix/consumers, context: ngx.timer
   > ```
   > 
   > It's the output from git log:
   > 
   > ```
   > commit f4161d39a495879edffbc75e2099f6e487bae81d
   > Author: willmafh <wi...@hotmail.com>
   > Date:   Wed Nov 25 19:27:04 2020 +0800
   > 
   >     chore: minor change in bin/apisix (#2847)
   > ....
   > commit c8823d0eedcdc6e329afc48d6f41e7c92637ae28
   > Author: 罗泽轩 <sp...@gmail.com>
   > Date:   Tue Nov 24 11:02:44 2020 +0800
   > 
   >     **fix(consumer): keep the id field for compatibility (#2829)**
   > ```
   
   Can't reproduce at my side with commit f4161d39a495879edffbc75e2099f6e487bae81d.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-733452171


   https://github.com/apache/apisix/commit/c8823d0eedcdc6e329afc48d6f41e7c92637ae28
   
   fixed in APISIX already. @cleverpig you can make a try with this commit or the latest version of APISIX.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen closed issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen closed issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732514806


   It is because consumer id is removed in the master branch. We need to update the stored etcd data.
   https://github.com/apache/apisix/pull/2679


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] cleverpig commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
cleverpig commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736578374


   haha, we found tow little bugs! Thanks @nic-chen
   
   1.Route: remote address is required, it must input.
   ![image](https://user-images.githubusercontent.com/580435/100751508-5a183380-3422-11eb-9de7-711a808d785a.png)
   if not, this exception will be thrown:
   ![image](https://user-images.githubusercontent.com/580435/100751457-4ec50800-3422-11eb-9061-71225f22796b.png)
   
   2.Consumer: JWT secret is required, it must input.
   ![image](https://user-images.githubusercontent.com/580435/100751515-5f757e00-3422-11eb-8351-5d55fd6c19c9.png)
   if not, this exception will be thrown:
   ![image](https://user-images.githubusercontent.com/580435/100751428-48cf2700-3422-11eb-8d9c-a70291bcfa69.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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-736901439


   > > APISIX fixed this by addon code,not schema
   > 
   > manager-api should keep the same way ^_^
   
   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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-737139246


   > 1. when user not fill in remote address , remote_addrs should be [], but not [""]
   has been fixed by #948  and #952 
   
   > 2. the field secret of plugin jwt-auth should be required.
   we will continue the work by #941 
   
   close this issue now.
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732218362


   @idbeta pls confirm this issue, it seems to be a bug


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander edited a comment on issue #856: After create a consumer on dashboard, apisix throw a exception

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #856:
URL: https://github.com/apache/apisix-dashboard/issues/856#issuecomment-732537568


   @cleverpig 
   ~~Could you show your dashboard commit so that we can reproduce the issue? It look like the latest dashboard (1a38fa6cf6540bc966098f6467a160312fb6b0fd) doesn't write the id to etcd.~~
   OK, I can confirm that the latest dashboard (1a38fa6cf6540bc966098f6467a160312fb6b0fd) does write the id to etcd. Please ignore me.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org