tjzheng1002 opened a new issue, #10414:
URL: https://github.com/apache/skywalking/issues/10414

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   OAP server (apache/skywalking)
   
   ### What happened
   
   When i use consul as the configuration center,skywalking Sync config center 
error!
   ```
   2023-02-20 17:35:10,661 
org.apache.skywalking.oap.server.configuration.api.ConfigWatcherRegister 85 
[pool-5-thread-1] ERROR [] - [9.4.0-SNAPSHOT-71a3282] Sync config center error.
   java.lang.IllegalArgumentException: Cache watchInterval=10sec >= 
networkClientReadTimeout=10000ms. It can cause issues
        at com.orbitz.consul.cache.ConsulCache.checkWatch(ConsulCache.java:413) 
~[consul-client-1.5.3.jar:?]
        at com.orbitz.consul.cache.KVCache.lambda$new$0(KVCache.java:24) 
~[consul-client-1.5.3.jar:?]
        at 
com.orbitz.consul.cache.ConsulCache.runCallback(ConsulCache.java:236) 
~[consul-client-1.5.3.jar:?]
        at com.orbitz.consul.cache.ConsulCache.start(ConsulCache.java:209) 
~[consul-client-1.5.3.jar:?]
        at 
org.apache.skywalking.oap.server.configuration.consul.ConsulConfigurationWatcherRegister.lambda$registerKeyListeners$7(ConsulConfigurationWatcherRegister.java:130)
 ~[classes/:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_181]
        at 
org.apache.skywalking.oap.server.configuration.consul.ConsulConfigurationWatcherRegister.registerKeyListeners(ConsulConfigurationWatcherRegister.java:120)
 ~[classes/:?]
        at 
org.apache.skywalking.oap.server.configuration.consul.ConsulConfigurationWatcherRegister.readConfig(ConsulConfigurationWatcherRegister.java:81)
 ~[classes/:?]
        at 
org.apache.skywalking.oap.server.configuration.api.ConfigWatcherRegister.singleConfigsSync(ConfigWatcherRegister.java:95)
 ~[classes/:?]
        at 
org.apache.skywalking.oap.server.configuration.api.ConfigWatcherRegister.configSync(ConfigWatcherRegister.java:90)
 ~[classes/:?]
        at 
org.apache.skywalking.oap.server.library.util.RunnableWithExceptionProtection.run(RunnableWithExceptionProtection.java:33)
 [classes/:?]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_181]
        at 
java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308) 
[?:1.8.0_181]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java) 
[?:1.8.0_181]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [?:1.8.0_181]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [?:1.8.0_181]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_181]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_181]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
   ```
   **application.yml** is  as follows: 
   ```
   configuration:
     selector: ${SW_CONFIGURATION:consul}
     consul:
       # Consul host and ports, separated by comma, e.g. 
1.2.3.4:8500,2.3.4.5:8500
       hostAndPorts: ${SW_CONFIG_CONSUL_HOST_AND_PORTS:192.168.126.143:8500}
       # Sync period in seconds. Defaults to 60 seconds.
       period: ${SW_CONFIG_CONSUL_PERIOD:60}
       # Consul aclToken
       aclToken: ${SW_CONFIG_CONSUL_ACL_TOKEN:""}
   ```
   My consul server do not need Consul aclToken.
   
   ### What you expected to happen
   
   I expecte Skywalking sync config from consul successfully.
   
   ### How to reproduce
   
   Just modify the application.yml to specify consul as the configuration center
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
notifications-unsubscr...@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to