varcher-me opened a new issue #4143: URL: https://github.com/apache/apisix/issues/4143
### Issue description ### Environment * apisix version (cmd: `apisix version`):2.4 * OS (cmd: `uname -a`):Linux 3.10.0-1160.15.2.el7.x86_64 (Redhat 7.9) * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):openresty/1.19.3.1 * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):3.4.15 * apisix-dashboard version, if have:2.5 * luarocks version, if the issue is about installation (cmd: `luarocks --version`): ### Minimal test code / Steps to reproduce the issue 1.use etcdctl add user apisix and grant all privilege on /apisix/* 2.edit apisix/conf/config.yaml, add the user to apisix 3.run curl -i https://domainname:9443/apisix/prometheus/metrics ### What's the actual result? (including assertion message & call stack if applicable) `HTTP/1.1 500 Internal Server Error Date: Wed, 28 Apr 2021 03:07:52 GMT Content-Type: text/html; charset=utf-8 Content-Length: 174 Connection: close Server: APISIX <html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>openresty</center> </body> </html>` ### What's the expected result? when I change the etcd user in apisix/conf/config.yaml to root, this plugin works well, like this: `HTTP/1.1 200 OK Date: Wed, 28 Apr 2021 03:05:20 GMT Content-Type: text/plain; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Server: APISIX # HELP apisix_etcd_modify_indexes Etcd modify index for APISIX keys # TYPE apisix_etcd_modify_indexes gauge apisix_etcd_modify_indexes{key="consumers"} 61099 apisix_etcd_modify_indexes{key="global_rules"} 60709 apisix_etcd_modify_indexes{key="max_modify_index"} 62639 apisix_etcd_modify_indexes{key="prev_index"} 62789 apisix_etcd_modify_indexes{key="protos"} 0 apisix_etcd_modify_indexes{key="routes"} 62639 apisix_etcd_modify_indexes{key="services"} 0 apisix_etcd_modify_indexes{key="ssls"} 2281 apisix_etcd_modify_indexes{key="stream_routes"} 0 apisix_etcd_modify_indexes{key="upstreams"} 61110 apisix_etcd_modify_indexes{key="x_etcd_index"} 62792 # HELP apisix_etcd_reachable Config server etcd reachable from APISIX, 0 is unreachable # TYPE apisix_etcd_reachable gauge apisix_etcd_reachable 1 # HELP apisix_nginx_http_current_connections Number of HTTP connections # TYPE apisix_nginx_http_current_connections gauge apisix_nginx_http_current_connections{state="accepted"} 1 apisix_nginx_http_current_connections{state="active"} 1 apisix_nginx_http_current_connections{state="handled"} 1 apisix_nginx_http_current_connections{state="reading"} 0 apisix_nginx_http_current_connections{state="total"} 1 apisix_nginx_http_current_connections{state="waiting"} 0 apisix_nginx_http_current_connections{state="writing"} 1 # HELP apisix_nginx_metric_errors_total Number of nginx-lua-prometheus errors # TYPE apisix_nginx_metric_errors_total counter apisix_nginx_metric_errors_total 0 # HELP apisix_node_info Info of APISIX node # TYPE apisix_node_info gauge apisix_node_info{hostname="servername"} 1` BUT it is not correct to give apisix the root privilege. All function and other plugins works well with the apisix user of etcd. I think it is a bug for the plugin. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
