changed log level for ovsdb client startup messages to info, provided more flexible SSL config for OpensyncMqttClient

This commit is contained in:
Dmitry Toptygin
2020-06-12 21:10:10 -04:00
parent 9b1f79440c
commit 52387b6079
3 changed files with 27 additions and 3 deletions

View File

@@ -64,9 +64,33 @@ public class OpensyncMqttClient implements ApplicationListener<ContextClosedEven
@Value("${connectus.mqttBroker.user:admin}") @Value("${connectus.mqttBroker.user:admin}")
String username, String username,
@Value("${connectus.mqttBroker.password:admin}") @Value("${connectus.mqttBroker.password:admin}")
String password String password,
@Value("${mqtt.javax.net.ssl.keyStore:/opt/tip-wlan/certs/client_keystore.jks}")
String jdkKeyStoreLocation,
@Value("${mqtt.javax.net.ssl.keyStorePassword:mypassword}")
String jdkKeyStorePassword,
@Value("${mqtt.javax.net.ssl.trustStore:/opt/tip-wlan/certs/truststore.jks}")
String jdkTrustStoreLocation,
@Value("${mqtt.javax.net.ssl.trustStorePassword:mypassword}")
String jdkTrustStorePassword
){ ){
if(System.getProperty("javax.net.ssl.keyStore") == null) {
System.setProperty("javax.net.ssl.keyStore", jdkKeyStoreLocation);
}
if(System.getProperty("javax.net.ssl.keyStorePassword") == null) {
System.setProperty("javax.net.ssl.keyStorePassword", jdkKeyStorePassword);
}
if(System.getProperty("javax.net.ssl.trustStore") == null) {
System.setProperty("javax.net.ssl.trustStore", jdkTrustStoreLocation);
}
if(System.getProperty("javax.net.ssl.trustStorePassword") == null) {
System.setProperty("javax.net.ssl.trustStorePassword", jdkTrustStorePassword);
}
Runnable mqttClientRunnable = () -> { Runnable mqttClientRunnable = () -> {
while(keepReconnecting) { while(keepReconnecting) {
BlockingConnection connection = null; BlockingConnection connection = null;

View File

@@ -174,7 +174,7 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
listener.startListeningWithSsl(ovsdbListenPort, sslContext, connectionCallback).join(); listener.startListeningWithSsl(ovsdbListenPort, sslContext, connectionCallback).join();
LOG.debug("manager waiting for connection on port {}...", ovsdbListenPort); LOG.info("manager waiting for connection on port {}...", ovsdbListenPort);
} }
private ConnectNodeInfo processConnectRequest(OvsdbClient ovsdbClient, String clientCn, private ConnectNodeInfo processConnectRequest(OvsdbClient ovsdbClient, String clientCn,

View File

@@ -79,7 +79,7 @@ public class ConnectusOvsdbRedirector {
listener.startListeningWithSsl(ovsdbRedirectorListenPort, sslContext, connectionCallback).join(); listener.startListeningWithSsl(ovsdbRedirectorListenPort, sslContext, connectionCallback).join();
LOG.debug("redirector waiting for connection on port {} ...", ovsdbRedirectorListenPort); LOG.info("redirector waiting for connection on port {} ...", ovsdbRedirectorListenPort);
} }