From 121e8d29f06bf5aebba77d0adf6ba7d095c7f082 Mon Sep 17 00:00:00 2001 From: Superskyyy Date: Sun, 17 Mar 2024 08:59:24 -0400 Subject: [PATCH 1/2] Bump up changed-files GHA (#12032) --- .github/workflows/skywalking.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/skywalking.yaml b/.github/workflows/skywalking.yaml index 967b418f2c4f..f773a07b6a7c 100644 --- a/.github/workflows/skywalking.yaml +++ b/.github/workflows/skywalking.yaml @@ -117,8 +117,8 @@ jobs: submodules: true - name: Filter OAP id: filter-oap - # The GHA version is pinned by infra - uses: tj-actions/changed-files@v35.9.2 + # The GHA version is pinned by infra (2024-03-17) + uses: tj-actions/changed-files@v43.0.0 with: files_ignore: | **/*.{md,txt} @@ -139,13 +139,13 @@ jobs: component-libraries.yml - name: Filter POM id: filter-pom - uses: tj-actions/changed-files@v35.9.2 + uses: tj-actions/changed-files@v43.0.0 with: files: | **/pom.xml - name: Filter UI id: filter-ui - uses: tj-actions/changed-files@v35.9.2 + uses: tj-actions/changed-files@v43.0.0 with: files: | skywalking-ui From 935ab0b17d42b476706fd4a50e156aeaa5735a5f Mon Sep 17 00:00:00 2001 From: SheltonZSL Date: Sun, 17 Mar 2024 09:58:40 -0400 Subject: [PATCH 2/2] Display the port services listen to from OAP and UI (#12030) --- apm-webapp/src/main/assembly/log4j2.xml | 10 ++++++++++ .../oap/server/webapp/ApplicationStartUp.java | 9 +++++++++ dist-material/bin/oapService.sh | 2 +- dist-material/bin/startup.sh | 4 ++-- dist-material/bin/webappService.sh | 2 +- dist-material/log4j2.xml | 10 ++++++++++ docs/en/changes/changes.md | 1 + .../oap/server/library/server/grpc/GRPCServer.java | 5 ++++- 8 files changed, 38 insertions(+), 5 deletions(-) diff --git a/apm-webapp/src/main/assembly/log4j2.xml b/apm-webapp/src/main/assembly/log4j2.xml index 40fdfb9f965b..f9967b1b9ff3 100644 --- a/apm-webapp/src/main/assembly/log4j2.xml +++ b/apm-webapp/src/main/assembly/log4j2.xml @@ -32,12 +32,22 @@ + + + %m%n + + + + + + + diff --git a/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java b/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java index 248fff790fbd..af754a0a8c48 100644 --- a/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java +++ b/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java @@ -21,6 +21,9 @@ import static org.yaml.snakeyaml.env.EnvScalarConstructor.ENV_FORMAT; import static org.yaml.snakeyaml.env.EnvScalarConstructor.ENV_TAG; import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.TypeDescription; import org.yaml.snakeyaml.Yaml; @@ -32,8 +35,10 @@ import com.linecorp.armeria.server.file.HttpFile; import com.linecorp.armeria.server.healthcheck.HealthCheckService; +@Slf4j public class ApplicationStartUp { public static void main(String[] args) throws Exception { + final Marker startedMarker = MarkerFactory.getMarker("Console"); final Yaml yaml = new Yaml( new EnvScalarConstructor( new TypeDescription(Configuration.class), @@ -79,5 +84,9 @@ public static void main(String[] args) throws Exception { .build() .start() .join(); + + log.info(startedMarker, "SkyWalking Booster UI is now running. " + + "OAP service at {} and Booster UI at http://localhost:{}", + String.join(", ", oapServices), port); } } diff --git a/dist-material/bin/oapService.sh b/dist-material/bin/oapService.sh index f4bdcf8ff9d3..9b8d22078de4 100644 --- a/dist-material/bin/oapService.sh +++ b/dist-material/bin/oapService.sh @@ -43,4 +43,4 @@ done OAP_OPTIONS=" -Doap.logDir=${OAP_LOG_DIR}" eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} ${OAP_OPTIONS} -classpath $CLASSPATH org.apache.skywalking.oap.server.starter.OAPServerStartUp \ - 2>${OAP_LOG_DIR}/oap.log 1> /dev/null" + 2>${OAP_LOG_DIR}/oap.log" diff --git a/dist-material/bin/startup.sh b/dist-material/bin/startup.sh index 9156dd3f48fc..6c3e035b82b8 100644 --- a/dist-material/bin/startup.sh +++ b/dist-material/bin/startup.sh @@ -21,6 +21,6 @@ PRGDIR=`dirname "$PRG"` OAP_EXE=oapService.sh WEBAPP_EXE=webappService.sh -"$PRGDIR"/"$OAP_EXE" & +"$PRGDIR"/"$OAP_EXE" 1> /dev/null & -"$PRGDIR"/"$WEBAPP_EXE" & +"$PRGDIR"/"$WEBAPP_EXE" 1> /dev/null & diff --git a/dist-material/bin/webappService.sh b/dist-material/bin/webappService.sh index a07a7b72a9d9..1ad68ee16777 100644 --- a/dist-material/bin/webappService.sh +++ b/dist-material/bin/webappService.sh @@ -34,5 +34,5 @@ _RUNJAVA=${JAVA_HOME}/bin/java eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} -cp ${JAR_PATH}/skywalking-webapp.jar:$JAR_PATH \ org.apache.skywalking.oap.server.webapp.ApplicationStartUp \ - 2>${WEBAPP_LOG_DIR}/webapp-console.log 1> /dev/null" + 2>${WEBAPP_LOG_DIR}/webapp-console.log" diff --git a/dist-material/log4j2.xml b/dist-material/log4j2.xml index 773099b7985c..54228988bdb5 100644 --- a/dist-material/log4j2.xml +++ b/dist-material/log4j2.xml @@ -32,12 +32,22 @@ + + + %m%n + + + + + + + diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index b376b3c9b38a..b6db84afe06a 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -77,6 +77,7 @@ - PULSAR -> K8S_SERVICE - VIRTUAL_MQ -> PULSAR * Add Golang as a supported language for Kafka. +* Support displaying the port services listen to from OAP and UI during server start. #### UI diff --git a/oap-server/server-library/library-server/src/main/java/org/apache/skywalking/oap/server/library/server/grpc/GRPCServer.java b/oap-server/server-library/library-server/src/main/java/org/apache/skywalking/oap/server/library/server/grpc/GRPCServer.java index c726e3b12416..67d642000801 100644 --- a/oap-server/server-library/library-server/src/main/java/org/apache/skywalking/oap/server/library/server/grpc/GRPCServer.java +++ b/oap-server/server-library/library-server/src/main/java/org/apache/skywalking/oap/server/library/server/grpc/GRPCServer.java @@ -32,6 +32,8 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import lombok.extern.slf4j.Slf4j; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; import org.apache.skywalking.oap.server.library.server.Server; import org.apache.skywalking.oap.server.library.server.ServerException; import org.apache.skywalking.oap.server.library.server.grpc.ssl.DynamicSslContext; @@ -51,6 +53,7 @@ public class GRPCServer implements Server { private String trustedCAsFile; private DynamicSslContext sslContext; private int threadPoolSize; + private static final Marker SERVER_START_MARKER = MarkerFactory.getMarker("Console"); public GRPCServer(String host, int port) { this.host = host; @@ -105,7 +108,7 @@ public void initialize() { sslContext = DynamicSslContext.forServer(privateKeyFile, certChainFile, trustedCAsFile); nettyServerBuilder.sslContext(sslContext); } - log.info("Server started, host {} listening on {}", host, port); + log.info(SERVER_START_MARKER, "Server started, host {} listening on {}", host, port); } static class CustomRejectedExecutionHandler implements RejectedExecutionHandler {