X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-node%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fnode%2FNodeMain.java;h=988b05ea868dd501d7e6ae1ef01008ccba112b7c;hb=a60d80ff7bfae8a152c950486d9a1877628e13a4;hp=9eaea283e7d72286c6e064622f88609038a140eb;hpb=0a440fd3ae3b413cd7de57677aec690f14ec7d53;p=dmaap%2Fdatarouter.git diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java index 9eaea283..988b05ea 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java @@ -23,7 +23,6 @@ package org.onap.dmaap.datarouter.node; - import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import java.io.IOException; @@ -47,7 +46,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory; import org.onap.aaf.cadi.PropAccess; /** - * The main starting point for the Data Router node + * The main starting point for the Data Router node. */ public class NodeMain { @@ -59,23 +58,24 @@ public class NodeMain { } /** - * Reset the retry timer for a subscription + * Reset the retry timer for a subscription. */ + static void resetQueue(String subid, String ip) { delivery.resetQueue(nodeConfigManager.getSpoolDir(subid, ip)); } /** * Start the data router. - *

- * The location of the node configuration file can be set using the org.onap.dmaap.datarouter.node.properties system - * property. By default, it is "/opt/app/datartr/etc/node.properties". + * + *

The location of the node configuration file can be set using the org.onap.dmaap.datarouter.node.properties + * system property. By default, it is "/opt/app/datartr/etc/node.properties". */ public static void main(String[] args) throws Exception { - nodeMainLogger.info("NODE0001 Data Router Node Starting"); + nodeMainLogger.debug("NODE0001 Data Router Node Starting"); IsFrom.setDNSCache(); nodeConfigManager = NodeConfigManager.getInstance(); - nodeMainLogger.info("NODE0002 I am " + nodeConfigManager.getMyName()); + nodeMainLogger.debug("NODE0002 I am " + nodeConfigManager.getMyName()); (new WaitForConfig(nodeConfigManager)).waitForConfig(); delivery = new Delivery(nodeConfigManager); new LogManager(nodeConfigManager); @@ -99,7 +99,8 @@ public class NodeMain { sslContextFactory.setKeyStorePassword(nodeConfigManager.getKSPass()); sslContextFactory.setKeyManagerPassword(nodeConfigManager.getKPass()); - //SP-6 : Fixes for SDV scan to exclude/remove DES/3DES ciphers are taken care by upgrading jdk in descriptor.xml + //SP-6: Fixes for SDV scan to exclude/remove DES/3DES + // ciphers are taken care by upgrading jdk in descriptor.xml sslContextFactory.setExcludeCipherSuites( "SSL_RSA_WITH_DES_CBC_SHA", "SSL_DHE_RSA_WITH_DES_CBC_SHA", @@ -112,12 +113,12 @@ public class NodeMain { sslContextFactory.addExcludeProtocols("SSLv3"); sslContextFactory.setIncludeProtocols(nodeConfigManager.getEnabledprotocols()); - nodeMainLogger.info("NODE00004 Unsupported protocols node server:-" + - String.join(",", sslContextFactory.getExcludeProtocols())); - nodeMainLogger.info("NODE00004 Supported protocols node server:-" + - String.join(",", sslContextFactory.getIncludeProtocols())); - nodeMainLogger.info("NODE00004 Unsupported ciphers node server:-" + - String.join(",", sslContextFactory.getExcludeCipherSuites())); + nodeMainLogger.debug("NODE00004 Unsupported protocols node server:-" + + String.join(",", sslContextFactory.getExcludeProtocols())); + nodeMainLogger.debug("NODE00004 Supported protocols node server:-" + + String.join(",", sslContextFactory.getIncludeProtocols())); + nodeMainLogger.debug("NODE00004 Unsupported ciphers node server:-" + + String.join(",", sslContextFactory.getExcludeCipherSuites())); HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration); httpsConfiguration.setRequestHeaderSize(8192); @@ -153,12 +154,13 @@ public class NodeMain { try { server.start(); - nodeMainLogger.info("NODE00006 Node Server started-" + server.getState()); + nodeMainLogger.debug("NODE00006 Node Server started-" + server.getState()); } catch (Exception e) { - nodeMainLogger.info("NODE00006 Jetty failed to start. Reporting will we unavailable", e.getMessage()); + nodeMainLogger.error("NODE00006 Jetty failed to start. Reporting will we unavailable: " + + e.getMessage(), e); } server.join(); - nodeMainLogger.info("NODE00007 Node Server joined - " + server.getState()); + nodeMainLogger.debug("NODE00007 Node Server joined - " + server.getState()); } private static void enableCadi(ServletContextHandler servletContextHandler) throws ServletException { @@ -168,10 +170,11 @@ public class NodeMain { InputStream in = obj.getCadiProps(); cadiProperties.load(in); } catch (IOException e1) { - nodeMainLogger.error("NODE00005 Exception in NodeMain.Main() loading CADI properties " + e1.getMessage()); + nodeMainLogger + .error("NODE00005 Exception in NodeMain.Main() loading CADI properties " + e1.getMessage(), e1); } cadiProperties.setProperty("aaf_locate_url", nodeConfigManager.getAafURL()); - nodeMainLogger.info("NODE00005 aaf_url set to - " + cadiProperties.getProperty("aaf_url")); + nodeMainLogger.debug("NODE00005 aaf_url set to - " + cadiProperties.getProperty("aaf_url")); PropAccess access = new PropAccess(cadiProperties); servletContextHandler.addFilter(new FilterHolder(new DRNodeCadiFilter(true, access)), "/*", EnumSet @@ -193,7 +196,7 @@ public class NodeMain { synchronized void waitForConfig() { localNodeConfigManager.registerConfigTask(this); while (!localNodeConfigManager.isConfigured()) { - nodeMainLogger.info("NODE0003 Waiting for Node Configuration"); + nodeMainLogger.debug("NODE0003 Waiting for Node Configuration"); try { wait(); } catch (Exception exception) { @@ -203,7 +206,7 @@ public class NodeMain { } } localNodeConfigManager.deregisterConfigTask(this); - nodeMainLogger.info("NODE0004 Node Configuration Data Received"); + nodeMainLogger.debug("NODE0004 Node Configuration Data Received"); } }