fix: port conflict in worker process for prometheus port (#12667)
diff --git a/apisix/cli/ngx_tpl.lua b/apisix/cli/ngx_tpl.lua
index 18b77fd..bfca1cc 100644
--- a/apisix/cli/ngx_tpl.lua
+++ b/apisix/cli/ngx_tpl.lua
@@ -105,7 +105,7 @@
}
server {
- listen {* prometheus_server_addr *};
+ listen {* prometheus_server_addr *} reuseport;
access_log off;
@@ -578,7 +578,7 @@
{% if enabled_plugins["prometheus"] and prometheus_server_addr then %}
server {
- listen {* prometheus_server_addr *};
+ listen {* prometheus_server_addr *} reuseport;
access_log off;