I’m running this setup from Hashi
This setup runs a 3 node consul agent server cluster and one node consul agent client.
consul members o/p
Node Address Status Type Build Protocol DC Partition Segment
consul-server1 172.25.0.3:8301 alive server 1.10.0 2 dc1 default <all>
consul-server2 172.25.0.5:8301 alive server 1.10.0 2 dc1 default <all>
consul-server3 172.25.0.4:8301 alive server 1.10.0 2 dc1 default <all>
consul-server-client 172.25.0.2:8301 alive client 1.10.0 2 dc1 default <default>
Running a springboot application and using following setup to auto register my service with consul agent client node and I’m getting connection refused errors.
My app configuration as follows
spring:
cloud:
consul:
host: consul-server-client
port: 8500
Switching configuration to use consul agent server node works fine.
spring:
config:
activate:
on-profile: docker
cloud:
consul:
host: consul-server1
port: 8500
What’s the purpose of Consul Agent running in a client mode? Am I using Consul Agent Client incorrectly to self register my springboot service ?