How to stop useless Consul KV request to local consul agent 8500 port

0

My application/microservices use spring config, spring-cloud-consul, and uses vault to store KV.
Everything works fine but weird thing is that local 8500 port of consul agent in each server host receives the huge volume of KV calls from local where the KV or URL does not exist at all, hence huge failure created, and 8500 ports be flooded. The call to local 8500 looks like this: http://localhost:8500/v1/kv/config/XXXXX

We tried to “change spring-cloud-starter-consul-all to spring-cloud-starter-consul-discovery” follow guide in https://github.com/spring-cloud/spring-cloud-consul/issues/448. This does not work We tried to change cloud: config: enabled: true to false that will disable configuration request at all and hence does not apply to the case. Please advise how can I suppress the useless KV calls or share your successful story.
Here is bootstrap.yml:

spring: profiles: sit datasource: username: ${usename} password: ${password} cloud: config: enabled: true format: ${config.server.format} fail-fast: true uri: http://CONFGSERVERIP

configure/dependency are as

org.springframework.boot spring-boot-starter-parent 1.5.6.RELEASE

1.4.2.RELEASE 1.5.4 1.3.0.RELEASE 1.3.0.RELEASE

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
    </dependency>
<!-- Spring config server - external properties -->
<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-config-client</artifactId>
        <version>${config.version}</version>
    </dependency>

<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-consul-all</artifactId>
        <version>${consul-starter.version}</version>
    </dependency>

Harvey Zhang

Posted 2019-04-08T21:49:24.037

Reputation: 1

No answers