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/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new f1db255605 Fix wrong classpath that might cause OOM in startup (#11247)
f1db255605 is described below
commit f1db25560521534a1599350e9101c4fd3ab52c7e
Author: kezhenxu94 <[email protected]>
AuthorDate: Mon Aug 21 21:30:12 2023 +0800
Fix wrong classpath that might cause OOM in startup (#11247)
---
dist-material/bin/oapService.sh | 7 ++++++-
dist-material/bin/oapServiceInit.sh | 7 ++++++-
dist-material/bin/oapServiceNoInit.sh | 7 ++++++-
docs/en/changes/changes.md | 1 +
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/dist-material/bin/oapService.sh b/dist-material/bin/oapService.sh
index 8eb33a21bd..f4bdcf8ff9 100644
--- a/dist-material/bin/oapService.sh
+++ b/dist-material/bin/oapService.sh
@@ -29,7 +29,12 @@ fi
_RUNJAVA=${JAVA_HOME}/bin/java
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
-CLASSPATH="$OAP_HOME/config:$CLASSPATH"
+if [ -z "$CLASSPATH" ]; then
+ CLASSPATH="$OAP_HOME/config"
+else
+ CLASSPATH="$OAP_HOME/config:$CLASSPATH"
+fi
+
for i in "$OAP_HOME"/oap-libs/*.jar
do
CLASSPATH="$i:$CLASSPATH"
diff --git a/dist-material/bin/oapServiceInit.sh
b/dist-material/bin/oapServiceInit.sh
index 38ca0bb738..6dfaa15007 100644
--- a/dist-material/bin/oapServiceInit.sh
+++ b/dist-material/bin/oapServiceInit.sh
@@ -29,7 +29,12 @@ fi
_RUNJAVA=${JAVA_HOME}/bin/java
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
-CLASSPATH="$OAP_HOME/config:$CLASSPATH"
+if [ -z "$CLASSPATH" ]; then
+ CLASSPATH="$OAP_HOME/config"
+else
+ CLASSPATH="$OAP_HOME/config:$CLASSPATH"
+fi
+
for i in "$OAP_HOME"/oap-libs/*.jar
do
CLASSPATH="$i:$CLASSPATH"
diff --git a/dist-material/bin/oapServiceNoInit.sh
b/dist-material/bin/oapServiceNoInit.sh
index 58134ec990..f207a15bb1 100644
--- a/dist-material/bin/oapServiceNoInit.sh
+++ b/dist-material/bin/oapServiceNoInit.sh
@@ -29,7 +29,12 @@ fi
_RUNJAVA=${JAVA_HOME}/bin/java
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
-CLASSPATH="$OAP_HOME/config:$CLASSPATH"
+if [ -z "$CLASSPATH" ]; then
+ CLASSPATH="$OAP_HOME/config"
+else
+ CLASSPATH="$OAP_HOME/config:$CLASSPATH"
+fi
+
for i in "$OAP_HOME"/oap-libs/*.jar
do
CLASSPATH="$i:$CLASSPATH"
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index df77a664aa..ed578dfa7a 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -72,6 +72,7 @@
* Add component ID for Nacos (ID=150).
* Support `Compare Operation` in MQE.
* Fix the Kubernetes resource cache not refreshed.
+* Fix wrong classpath that might cause OOM in startup.
#### UI