downtown12 opened a new issue, #9280:
URL: https://github.com/apache/apisix/issues/9280

   ### Description
   
   APISIX Version: 3.2.0
   deployment: from source code. Has run `make install` and succeed returned
   
   config.yaml(snippets):
   ```
    plugins:
        - prometheus
        - file-logger
   ``` 
   
   start command: apisix start
   
   error detail(from error.log):
   ```
   2023/04/10 16:17:58 [error] 1320262#1320262: init_worker_by_lua error: 
/chj/apisix-3.2.0/apisix/plugins/prometheus.lua:39: attempt to index local 
'exporter' (a number value)
   stack traceback:
        /chj/apisix-3.2.0/apisix/plugins/prometheus.lua:39: in main chunk
        [C]: in function 'require'
        /chj/apisix-3.2.0/apisix/plugins/prometheus/exporter.lua:20: in main 
chunk
        [C]: in function 'require'
        /chj/apisix-3.2.0/apisix/plugin.lua:740: in function 'init_worker'
        /chj/apisix-3.2.0/apisix/init.lua:148: in function 'http_init_worker'
        init_worker_by_lua:2: in main chunk
   ```
   
   
   it seems `apisix/plugins/prometheus/exporter.lua:20` want to `require 
('prometheus')` but failed.
   however, the `prometheus` lua module is actually already in my 
lua_package_path, which is 
   ```
   
"/chj/apisix-3.2.0/apisix/plugins/?.lua;/chj/apisix-3.2.0//deps/share/lua/5.1/?.lua;/chj/apisix-3.2.0//deps/share/lua/5.1/?/init.lua;
   ``` 
   
   when I use APISIX 3.1.0(while the other conditions keep unchanged), the 
error diapears.
   I wonder whether some changes in APISIX 3.2.0 makes this error 
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.2.0
   - Operating system (run `uname -a`): 3.10.0-1062.9.1.el7.x86_64
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx 
version: openresty/1.21.4.1
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): NA
   - APISIX Dashboard version, if relevant: NA
   - Plugin runner version, for issues related to plugin runners: NA
   - LuaRocks version, for installation issues (run `luarocks --version`): 3.8.0
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to