summaryrefslogtreecommitdiffstats
path: root/config-proxy
diff options
context:
space:
mode:
authorHarald Musum <musum@oath.com>2017-09-21 21:45:01 +0200
committerHarald Musum <musum@oath.com>2017-09-21 21:45:01 +0200
commit409ad631e905737e8fc3c19a0f5054360e48ac2c (patch)
treeb898bdf667b900fbf65b07f62f1b81ed2f5ebc0c /config-proxy
parentc9cd96317a0efdc30b384c1686e428212581622c (diff)
Longer timeout and lower log levels when connection fails
Diffstat (limited to 'config-proxy')
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
index b07d1ec681e..d0095121c8e 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
@@ -73,29 +73,27 @@ class RpcConfigSourceClient implements ConfigSourceClient {
/**
* Checks if config sources are available
*/
- private boolean checkConfigSources() {
+ private void checkConfigSources() {
if (configSourceSet == null || configSourceSet.getSources() == null || configSourceSet.getSources().size() == 0) {
log.log(LogLevel.WARNING, "No config sources defined, could not check connection");
- return false;
} else {
Request req = new Request("ping");
for (String configSource : configSourceSet.getSources()) {
Spec spec = new Spec(configSource);
Target target = supervisor.connect(spec);
- target.invokeSync(req, 10.0);
+ target.invokeSync(req, 30.0);
if (target.isValid()) {
log.log(LogLevel.DEBUG, "Created connection to config source at " + spec.toString());
- return true;
+ return;
} else {
- log.log(LogLevel.WARNING, "Could not connect to config source at " + spec.toString());
+ log.log(LogLevel.INFO, "Could not connect to config source at " + spec.toString());
}
target.close();
}
String extra = "";
- log.log(LogLevel.WARNING, "Could not connect to any config source in set " + configSourceSet.toString() +
+ log.log(LogLevel.INFO, "Could not connect to any config source in set " + configSourceSet.toString() +
", please make sure config server(s) are running. " + extra);
}
- return false;
}
/**