We are trying to register a spring-cloud-consul application with consul on GCP compute engine, where it is able to register the application with the consul, but there are two problems we are facing with the application. Below is bootstrap.yaml
and server.yaml for the application,
application.yaml
server:
port: 10003
spring:
application:
name: hello-service
cloud:
consul:
enabled: true
inetutils:
useOnlySiteLocalInterfaces: true
endpoints:
actuator:
sensitive: false
bootstrap.yaml
spring:
cloud:
consul:
enabled: true
host: 10.160.0.18
port: 8500
discovery:
prefer-ip-address: true
- Consul is not able to call health-check on compute engine, possibly because it's registered on the internal domain name of the instance.
service with consul: NewService{id='hello-service-10003', name='hello-service', tags=[secure=false], address='consul-app-test.c.name-of-project.internal', meta=null, port=10003, enableTagOverride=null, check=Check{script='null', interval='10s', ttl='null', http='http://consul-app-test.c.name-of-project.internal:10003/actuator/health', method='null', header={}, tcp='null', timeout='null', deregisterCriticalServiceAfter='null', tlsSkipVerify=null, status='null'}, checks=null}
- Application, not de-registering from the consul. We have stopped the application still it shows on consul UI.