chenqing24 edited a comment on issue #1297: bug: jwt plugin make the request 
http StatusCode= 500
URL: 
https://github.com/apache/incubator-apisix/issues/1297#issuecomment-601115515
 
 
   发生类似情况:
   背景:基于apisix做了一个权限网关,用户登入时,会请求生成jwt token。
   问题:一开始用都正常,在用测试账号反复登入时,出现异常,反馈码500
   模拟请求:`curl --location --request GET 
'http://gateway.itcjf.com/apisix/plugin/jwt/sign?key=cq39882`
   error log:
   ```
   2020/03/18 17:37:32 [error] 2265479#2265479: *288045272 lua entry thread 
aborted: runtime error: /usr/share/lua/5.1/apisix/lua/apisix/consumer.lua:38: 
attempt to index local 'consumer' (a boolean value)
   stack traceback:
   coroutine 0:
   /usr/share/lua/5.1/apisix/lua/apisix/consumer.lua: in function 
'create_obj_fun'
   /usr/share/lua/5.1/apisix/lua/apisix/core/lrucache.lua:64: in function 
'global'
   /usr/share/lua/5.1/apisix/lua/apisix/consumer.lua:64: in function 'plugin'
   /usr/share/lua/5.1/apisix/lua/apisix/plugins/jwt-auth.lua:174: in function 
'handler'
   /usr/share/lua/5.1/apisix/lua/apisix/plugin.lua:213: in function 'handler'
   /usr/share/lua/5.1/resty/radixtree.lua:627: in function 'dispatch'
   .../lua/5.1/apisix/lua/apisix/http/router/radixtree_uri.lua:110: in function 
'match'
   /usr/share/lua/5.1/apisix/lua/apisix.lua:264: in function 'http_access_phase'
   access_by_lua(nginx.conf:146):2: in main chunk, client: 10.10.150.6, server: 
, request: "GET /apisix/plugin/jwt/sign?key=cq39882 HTTP/1.1", host: 
"gateway.itcjf.com"
   ```
   重启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:
[email protected]


With regards,
Apache Git Services

Reply via email to