Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{"desc":"lua runtime error attempt to yield across metamethod\/C-call boundary","code":40201} 错误 #93

Open
chentian610 opened this issue Jul 25, 2018 · 3 comments

Comments

@chentian610
Copy link

2018/07/24 22:18:49 [crit] 1773#1773: *1 connect() to unix:/var/run/redis.sock failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"
2018/07/24 22:18:49 [error] 1773#1773: *1 [lua] log.lua:28: errlog(): ab_div host [ab_admin] code : 40201, desc : lua runtime error attempt to yield across metamethod/C-call boundary, errstack : stack traceback:
../lib/abtesting/error/handler.lua:17: in function <../lib/abtesting/error/handler.lua:7>
[C]: in function 'receive'
../lib/resty/redis.lua:166: in function <../lib/resty/redis.lua:165>
(tail call): ?
(tail call): ?
../lib/abtesting/adapter/policygroup.lua:32: in function 'new'
../admin/policygroup.lua:156: in function <../admin/policygroup.lua:155>
[C]: in function 'xpcall'
../admin/policygroup.lua:160: in function 'checkPolicy'
../admin/policygroup.lua:192: in function 'do_action'
...ABTestingGateway-master/utils/../admin/ab_action.lua:82: in function <...ABTestingGateway-master/utils/../admin/ab_action.lua:1>, client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"
2018/07/25 17:30:57 [error] 1773#1773: *4 [lua] log.lua:28: errlog(): ab_div host [ab_admin] code : 40201, desc : lua runtime error attempt to yield across metamethod/C-call boundary, errstack : stack traceback:
../lib/abtesting/error/handler.lua:17: in function <../lib/abtesting/error/handler.lua:7>
[C]: in function 'receive'
../lib/resty/redis.lua:166: in function <../lib/resty/redis.lua:165>
(tail call): ?
(tail call): ?
../lib/abtesting/adapter/policygroup.lua:32: in function 'new'
../admin/policygroup.lua:156: in function <../admin/policygroup.lua:155>
[C]: in function 'xpcall'
../admin/policygroup.lua:160: in function 'checkPolicy'
../admin/policygroup.lua:192: in function 'do_action'
...ABTestingGateway-master/utils/../admin/ab_action.lua:82: in function <...ABTestingGateway-master/utils/../admin/ab_action.lua:1>, client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"
2018/07/25 17:47:49 [error] 9628#9628: *1 [lua] log.lua:28: errlog(): ab_div host [ab_admin] code : 40201, desc : lua runtime error attempt to yield across metamethod/C-call boundary, errstack : stack traceback:
../lib/abtesting/error/handler.lua:17: in function <../lib/abtesting/error/handler.lua:7>
[C]: in function 'receive'
../lib/resty/redis.lua:166: in function <../lib/resty/redis.lua:165>
(tail call): ?
(tail call): ?
../lib/abtesting/adapter/policygroup.lua:32: in function 'new'
../admin/policygroup.lua:156: in function <../admin/policygroup.lua:155>
[C]: in function 'xpcall'
../admin/policygroup.lua:160: in function 'checkPolicy'
../admin/policygroup.lua:192: in function 'do_action'
...ABTestingGateway-master/utils/../admin/ab_action.lua:82: in function <...ABTestingGateway-master/utils/../admin/ab_action.lua:1>, client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"
2018/07/25 18:13:13 [error] 11002#11002: *1 [lua] log.lua:28: errlog(): ab_div host [ab_admin] code : 40201, desc : lua runtime error attempt to yield across metamethod/C-call boundary, errstack : stack traceback:
../lib/abtesting/error/handler.lua:17: in function <../lib/abtesting/error/handler.lua:7>
[C]: in function 'receive'
../lib/resty/redis.lua:166: in function <../lib/resty/redis.lua:165>
(tail call): ?
(tail call): ?
../lib/abtesting/adapter/policygroup.lua:32: in function 'new'
../admin/policygroup.lua:156: in function <../admin/policygroup.lua:155>
[C]: in function 'xpcall'
../admin/policygroup.lua:160: in function 'checkPolicy'
../admin/policygroup.lua:192: in function 'do_action'
...ABTestingGateway-master/utils/../admin/ab_action.lua:82: in function <...ABTestingGateway-master/utils/../admin/ab_action.lua:1>, client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"

@chentian610
Copy link
Author

按照步骤部署完成后,运行
curl 127.0.0.1:8080/ab_admin?action=policygroup_set -d '{"1":{"divtype":"uidsuffix","divdata":[{"suffix":"1","upstream":"beta1"},{"suffix":"3","upstream":"beta2"},{"suffix":"5","upstream":"beta1"},{"suffix":"0","upstream":"beta3"}]},"2":{"divtype":"arg_city","divdata":[{"city":"BJ","upstream":"beta1"},{"city":"SH","upstream":"beta2"},{"city":"XA","upstream":"beta1"},{"city":"HZ","upstream":"beta3"}]},"3":{"divtype":"iprange","divdata":[{"range":{"start":1111,"end":2222},"upstream":"beta1"},{"range":{"start":3333,"end":4444},"upstream":"beta2"},{"range":{"start":7777,"end":2130706433},"upstream":"beta2"}]}}'
报上面的错{"desc":"lua runtime error attempt to yield across metamethod/C-call boundary","code":40201}

请问这个是什么原因呢?

@ysjgxm
Copy link

ysjgxm commented Nov 6, 2019

这个错解决了吗

@jie123108
Copy link

jie123108 commented Nov 6, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants