Skip to content

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

@MarcCain-Scott

Description

@MarcCain-Scott

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. apisix#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):

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions