You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Consul discovery is enabled, an error occurs during service synchronization from Consul (attempt to concatenate local 'svc_port' (a nil value)) if not all services in Consul contain the port field.
This leads to the issue where APISIX Consul discovery does not add any services at all.
In Consul, the only mandatory field when registering a service is name. Therefore, services that cannot be added to the APISIX discovery should be skipped.
Error Logs
2025/02/10 03:57:40 [error] 32#32: *54 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/discovery/consul/init.lua:525: attempt to concatenate local 'svc_port' (a nil value)
Steps to Reproduce
run consul, register service only with name provided
enable consul discovery in apisix
run apisix via docker image
Environment
APISIX version (run apisix version): 3.11.0
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):
The text was updated successfully, but these errors were encountered:
Current Behavior
When Consul discovery is enabled, an error occurs during service synchronization from Consul (
attempt to concatenate local 'svc_port' (a nil value)
) if not all services in Consul contain the port field.This leads to the issue where APISIX Consul discovery does not add any services at all.
The error happens here
Expected Behavior
In Consul, the only mandatory field when registering a service is
name
. Therefore, services that cannot be added to the APISIX discovery should be skipped.Error Logs
Steps to Reproduce
consul
discovery in apisixEnvironment
apisix version
): 3.11.0uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):The text was updated successfully, but these errors were encountered: