You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/03/12 14:55:20 UTC
[incubator-skywalking] branch master updated: Shutdown the OAP
server when catch any exception. (#2352)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 70e6c20 Shutdown the OAP server when catch any exception. (#2352)
70e6c20 is described below
commit 70e6c203abb98a3f92fdf685eb084c895aabcc39
Author: 彭勇升 pengys <80...@qq.com>
AuthorDate: Tue Mar 12 22:52:38 2019 +0800
Shutdown the OAP server when catch any exception. (#2352)
---
.../apache/skywalking/oap/server/starter/OAPServerStartUp.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
index 8c16043..4f2f316 100644
--- a/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
+++ b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
@@ -20,7 +20,7 @@ package org.apache.skywalking.oap.server.starter;
import org.apache.skywalking.oap.server.core.RunningMode;
import org.apache.skywalking.oap.server.library.module.*;
-import org.apache.skywalking.oap.server.starter.config.*;
+import org.apache.skywalking.oap.server.starter.config.ApplicationConfigLoader;
import org.apache.skywalking.oap.server.telemetry.TelemetryModule;
import org.apache.skywalking.oap.server.telemetry.api.*;
import org.slf4j.*;
@@ -45,14 +45,14 @@ public class OAPServerStartUp {
manager.find(TelemetryModule.NAME).provider().getService(MetricCreator.class).createGauge("uptime",
"oap server start up time", MetricTag.EMPTY_KEY, MetricTag.EMPTY_VALUE)
// Set uptime to second
- .setValue(System.currentTimeMillis() / 1000);
+ .setValue(System.currentTimeMillis() / 1000d);
if (RunningMode.isInitMode()) {
logger.info("OAP starts up in init mode successfully, exit now...");
System.exit(0);
}
- } catch (ConfigFileNotFoundException | ModuleNotFoundException | ProviderNotFoundException | ServiceNotProvidedException | ModuleConfigException | ModuleStartException e) {
- logger.error(e.getMessage(), e);
+ } catch (Throwable t) {
+ logger.error(t.getMessage(), t);
System.exit(1);
}
}