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: node-status plugin doesn't work with https #11223

Open
madhawa-gunasekara opened this issue May 3, 2024 · 2 comments
Open

bug: node-status plugin doesn't work with https #11223

madhawa-gunasekara opened this issue May 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@madhawa-gunasekara
Copy link
Member

Current Behavior

node-status plugin works fine with http calls but It fails with https.

current response for https :

`

<title>500 Internal Server Error</title>

500 Internal Server Error


openresty

Powered by APISIX.

`

Expected Behavior

{"status":{"handled":"160","total":"231","writing":"6","waiting":"2","active":"8","reading":"0","accepted":"160"},"id":"3642510e-605a-484a-aede-654be7674499"}

Error Logs

2024/05/03 09:12:39 [error] 35#35: *17249 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/plugins/node-status.lua:48: http2 requests not supported yet
stack traceback:
coroutine 0:
[C]: in function 'ngx_capture'
/usr/local/apisix/apisix/plugins/node-status.lua:48: in function 'handler'
/usr/local/apisix/apisix/api_router.lua:72: in function 'handler'
/usr/local/apisix//deps/share/lua/5.1/resty/radixtree.lua:1013: in function 'dispatch'
/usr/local/apisix/apisix/api_router.lua:111: in function 'match'
/usr/local/apisix/apisix/plugins/public-api.lua:47: in function 'phase_func'
/usr/local/apisix/apisix/plugin.lua:1155: in function 'run_plugin'
/usr/local/apisix/apisix/init.lua:729: in function 'http_access_phase'

Steps to Reproduce

  1. enable https protocol in apisix
  2. enable node-status plugin with route apisix/status
  3. invoke the request with https protocol GET/apisix/status

Environment

  • APISIX version (run apisix version):
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • 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):
@hanqingwu
Copy link
Contributor

Yes, I can reproduce in apisix 3.9.0 .
If you use curl --http1.1 will works .
Fix it need time .

@kayx23 kayx23 added the bug Something isn't working label May 7, 2024
@hanqingwu
Copy link
Contributor

By check nginx source code, I think it still not fix .
https://github.com/openresty/lua-nginx-module/blob/master/src/ngx_http_lua_headers.c#L142

#if (NGX_HTTP_V2)
    if (mr->stream) {
        return luaL_error(L, "http2 requests not supported yet");
    }
#endif

Some one try use httpc:request_uri instead of ngx.location.capture

openresty/lua-nginx-module#1195

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

3 participants