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

bug: jsonschema.lua:46: attempt to call field 'find' (a nil value) #11913

Open
MarcCain-Scott opened this issue Jan 14, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@MarcCain-Scott
Copy link

Current Behavior

Using the Kubernetes Ingress Controller version 1.8.0

After the service has been running for a while (not exactly sure how long it needs to be). Any change or new ApisixRoute resource causes a 500 error and the change is not applied.

Restarting the apisix deployment kubectl rollout restart deployment apisix fixes it for a while. The change is applied successfully and everything works for a while until it stops working.

Expected Behavior

When an ApisixRoute resource is change, the change should be reflected in the Apisix server without any errors.

Error Logs

2025/01/14 15:47:14 [error] 49#49: *25365444 lua entry thread aborted: runtime error: /usr/local/apisix//deps/share/lua/5.1/jsonschema.lua:46: attempt to call field 'find' (a nil value)
stack traceback:
coroutine 0:
/usr/local/apisix//deps/share/lua/5.1/jsonschema.lua: in function 'custom_match_pattern'
[string "jsonschema:anonymous"]:244: in function 'var_0_15'
[string "jsonschema:anonymous"]:262: in function 'var_0_14'
[string "jsonschema:anonymous"]:2832: in function 'check'
/usr/local/apisix/apisix/admin/routes.lua:36: in function 'checker'
/usr/local/apisix/apisix/admin/resource.lua:128: in function 'check_conf'
/usr/local/apisix/apisix/admin/resource.lua:243: in function </usr/local/apisix/apisix/admin/resource.lua:230>
/usr/local/apisix/apisix/admin/init.lua:233: in function 'handler'
/usr/local/apisix//deps/share/lua/5.1/resty/radixtree.lua:1013: in function 'dispatch'
/usr/local/apisix/apisix/init.lua:945: in function 'http_admin'

Steps to Reproduce

  1. Install the kubernetes apisix/apisix helm chart from repo https://charts.apiseven.com as in the instruction
  2. Create a ApisixRoute maybe also a ApisixPluginConfig with it, I'm not sure exactly
  3. I don't know if it is wait a while or do a number of changes but eventually a change to the ApisixRoute will cause the above error.

Environment

  • apisix helm chart version: apisix-2.10.0
  • APISIX version (run apisix version): 3.11.0
  • Operating system (run uname -a): Linux apisix-7c877b459c-vglhx 6.1.0-28-amd64 change: added doc of how to load plugin. #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux
  • OpenResty / Nginx version (run openresty -V or nginx -V): openresty/1.25.3.2
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant: NA
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
@dosubot dosubot bot added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant