Skip to content
New issue

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

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

Already on GitHub? # to your account

bug: /apisix/prometheus/metrics cannot access #3330

Closed
to2false opened this issue Jan 19, 2021 · 0 comments · Fixed by #3332
Closed

bug: /apisix/prometheus/metrics cannot access #3330

to2false opened this issue Jan 19, 2021 · 0 comments · Fixed by #3332

Comments

@to2false
Copy link

to2false commented Jan 19, 2021

Issue description

Environment

  • apisix version (cmd: apisix version): apache/apisix-2.2 docker
  • OS: (cmd: uname -a) Linux gateway 3.10.0-957.el7.x86_64 change: added doc of how to load plugin. #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • OpenResty / Nginx version: (cmd: nginx -V or openresty -V)

Minimal test code / Steps to reproduce the issue

  1. request GET /apisix/prometheus/metrics
  2. it's not accessible

What's the actual result? (including assertion message & call stack if applicable)

broken

2021/01/19 02:10:44 [error] 43#43: *10729051 failed to run header_filter_by_lua*: /usr/local/apisix/apisix/core/lrucache.lua:159: invalid value (nil) at index 1 in table for 'concat'
stack traceback:
	[C]: in function 'concat'
	/usr/local/apisix/apisix/core/lrucache.lua:159: in function 'plugin_ctx'
	/usr/local/apisix/apisix/plugins/cors.lua:168: in function 'phase_func'
	/usr/local/apisix/apisix/init.lua:164: in function 'run_plugin'
	/usr/local/apisix/apisix/init.lua:625: in function 'common_phase'
	/usr/local/apisix/apisix/init.lua:662: in function 'http_header_filter_phase'
	header_filter_by_lua:2: in main chunk, client: 10.9.6.206, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "10.9.6.225"

What's the expected result?

access ok

spacewander added a commit to spacewander/incubator-apisix that referenced this issue Jan 19, 2021
Fix apache#3330

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
spacewander added a commit that referenced this issue Jan 20, 2021
Fix #3330

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant