0

I have a Spring Cloud Config Server and Client set up with Spring Cloud Bus. I am using a webhook trigger via the /monitor endpoint on the Config Server to notify the Config Client of any changes. However, when the webhook is triggered, I am seeing the following error in the Config Server logs:

o.s.cloud.bus.event.RefreshListener : Received remote refresh request.
o.s.cloud.bus.event.RefreshListener : Refresh not performed, the event was targeting svctest-tgg:**
o.s.c.c.monitor.PropertyPathEndpoint : Refresh for: svctest
o.s.cloud.bus.event.RefreshListener : Received remote refresh request.
o.s.cloud.bus.event.RefreshListener : Refresh not performed, the event was targeting svctest:**

What could be causing this issue? How can I get the Config Client to refresh when the webhook is triggered? Here's my configuration:

  • Config Server application.yml
    server:
      port : 8888
    management:
      endpoints:
        web:
          exposure:
            include: "*"
    spring:
      application:
        name: configServer
      jackson:
        serialization:
          INDENT_OUTPUT: true
      cloud:
        bus:
          enabled: true
        config:
          server:
            git:
              uri : git_uri
              timeout: 30
              username: abc
              password: xyz
              default-label: ${custom.git.branch}
              searchPaths: config
              refreshRate: 10000
              skip-ssl-validation: false
        stream:
          kafka:
            binder:
              brokers: localhost:29092
    
    custom:
      thamsoa:
        thamsoa1:
          giatri: true
      git:
        branch: luna-drive

  • Config Server build.gradle:

    plugins {
        id 'org.springframework.boot' version '2.3.7.RELEASE'
        id 'io.spring.dependency-management' version '1.0.15.RELEASE'
        id 'java'
    }
    
    group = 'com.test'
    version = '0.0.1'
    sourceCompatibility = '11'
    
    repositories {
        mavenCentral()
    }
    
    ext {
        set('springCloudVersion', "Hoxton.SR10")
    }
    
    dependencies {
        implementation 'org.springframework.cloud:spring-cloud-config-server'
        implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.14.0'
        implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.14.0'
        implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.0'
        implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.13.4'
        implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-properties', version: '2.13.4'
        implementation group: 'org.springframework.cloud', name: 'spring-cloud-config-monitor', version: '3.1.5'
        implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-stream-kafka', version: '3.2.6'
        testImplementation 'org.springframework.boot:spring-boot-starter-test'
    }
    
    dependencyManagement {
        imports {
            mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
        }
    }
    
    tasks.named('test') {
        useJUnitPlatform()
    }

  • ConfigClient application.yml:

    server:
      port: 8082
    spring:
      profiles:
        active: svctest,dev
      cloud:
        bus:
          enabled: true
          refresh:
            enabled: true
          destination: svctest-tgg
        config:
          name: svctest
          profile: tgg
          fail-fast: false
          retry:
            max-attempts: 10
            max-interval: 10000
            initial-interval: 2000
        stream:
          kafka:
            binder:
              brokers: localhost:29092

  • ConfigClient bootstrap.yml:

    spring:
      application:
        name: svctest
      cloud:
        config:
          uri: http://localhost:8888

Any help would be appreciated. Thanks!

An Duy
  • 35
  • 1
  • 7

0 Answers0