Skip to content

bug: the version 3.14.1 or 3.14.0 get init_worker_by_lua error: /usr/local/apisix//deps/share/lua/5.1/resty/http.lua:74: API disabled in the context of init_worker_by_lua #12713

@shijunLee

Description

@shijunLee

Current Behavior

get init_worker_by_lua error: /usr/local/apisix//deps/share/lua/5.1/resty/http.lua:74: API disabled in the context of init_worker_by_lua* error

Expected Behavior

fix this bug

Error Logs

2025/10/29 09:45:27 [warn] 25958#25958: 17772 [lua] config_etcd.lua:1208: init_worker(): master process has been running for a long time, reloading the full configuration from etcd for this new worker, context: init_worker_by_lua
2025/10/29 09:45:27 [error] 25958#25958: init_worker_by_lua error: /usr/local/apisix//deps/share/lua/5.1/resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
[C]: in function 'co_create'
/usr/local/apisix//deps/share/lua/5.1/resty/http.lua:74: in function '_body_reader'
/usr/local/apisix//deps/share/lua/5.1/resty/http.lua:821: in function 'request'
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:120: in function 'request_uri_via_unix_socket'
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:160: in function 'http_request_uri'
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:251: in function '_request_uri'
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:535: in function 'refresh_jwt_token'
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:205: in function '_request_uri'
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:670: in function 'readdir'
/usr/local/apisix/apisix/core/config_etcd.lua:404: in function 'readdir'
/usr/local/apisix/apisix/core/config_etcd.lua:1167: in function 'init_loaded_configuration'
/usr/local/apisix/apisix/core/config_etcd.lua:1210: in function 'init_worker'
/usr/local/apisix/apisix/init.lua:137: in function 'http_init_worker'
init_worker_by_lua:2: in main chunk

Steps to Reproduce

  1. run apisix with docker ,the docker image is pull form docker hub
  2. wait time and exec this job

Environment

  • APISIX version (run apisix version): 3.14.1
  • Operating system (run uname -a): Debian GNU/Linux 11 (bullseye)
  • OpenResty / Nginx version (run openresty -V or nginx -V): nginx version: openresty/1.27.1.2
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions