From fe5185f02fed21a2a7018efcf776f563dd656d4a Mon Sep 17 00:00:00 2001 From: bitflicker64 Date: Sat, 28 Mar 2026 18:32:14 +0530 Subject: [PATCH 1/3] fix(docker): enable docker logs for pd/store/server containers --- .../src/assembly/static/bin/start-hugegraph-pd.sh | 2 +- hugegraph-pd/hg-pd-dist/src/assembly/static/conf/log4j2.xml | 1 + .../src/assembly/static/bin/hugegraph-server.sh | 3 +-- .../src/assembly/static/bin/start-hugegraph.sh | 6 ++---- .../hugegraph-dist/src/assembly/static/conf/log4j2.xml | 1 + .../src/assembly/static/bin/start-hugegraph-store.sh | 2 +- .../hg-store-dist/src/assembly/static/conf/log4j2.xml | 1 + 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh b/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh index b5d5346f34..8bda5d9c55 100755 --- a/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh +++ b/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh @@ -169,7 +169,7 @@ JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml -Djava.util.logging.ma # Turn on security check exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \ - -Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1 & + -Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar & PID="$!" # Write pid to file diff --git a/hugegraph-pd/hg-pd-dist/src/assembly/static/conf/log4j2.xml b/hugegraph-pd/hg-pd-dist/src/assembly/static/conf/log4j2.xml index a804948703..e0b5d9dc98 100644 --- a/hugegraph-pd/hg-pd-dist/src/assembly/static/conf/log4j2.xml +++ b/hugegraph-pd/hg-pd-dist/src/assembly/static/conf/log4j2.xml @@ -115,6 +115,7 @@ + diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh index 857b9b5356..77db8a34ef 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh @@ -184,5 +184,4 @@ fi # Turn on security check exec ${JAVA} -Dname="HugeGraphServer" ${JVM_OPTIONS} ${JAVA_OPTIONS} -cp ${CLASSPATH}: \ - org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF} ${REST_SERVER_CONF} \ - >> ${OUTPUT} 2>&1 + org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF} ${REST_SERVER_CONF} diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh index 30c2764989..ee73a75745 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh @@ -103,13 +103,11 @@ fi if [[ $DAEMON == "true" ]]; then echo "Starting HugeGraphServer in daemon mode..." "${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \ - "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \ - >>"${LOGS}"/hugegraph-server.log 2>&1 & + "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" & else echo "Starting HugeGraphServer in foreground mode..." "${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \ - "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \ - >>"${LOGS}"/hugegraph-server.log 2>&1 + "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" fi PID="$!" diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml index f1dd7e8395..ca44484782 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml @@ -104,6 +104,7 @@ + diff --git a/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh b/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh index d8b965a07d..948b182979 100755 --- a/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh +++ b/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh @@ -223,7 +223,7 @@ echo "Starting HG-StoreServer..." exec ${JAVA} -Dname="HugeGraphStore" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \ -Dspring.config.location=${CONF}/application.yml \ - ${LIB}/hg-store-node-*.jar >> ${OUTPUT} 2>&1 & + ${LIB}/hg-store-node-*.jar & PID="$!" # Write pid to file diff --git a/hugegraph-store/hg-store-dist/src/assembly/static/conf/log4j2.xml b/hugegraph-store/hg-store-dist/src/assembly/static/conf/log4j2.xml index 388d09e2fd..f0cf11fc3d 100644 --- a/hugegraph-store/hg-store-dist/src/assembly/static/conf/log4j2.xml +++ b/hugegraph-store/hg-store-dist/src/assembly/static/conf/log4j2.xml @@ -117,6 +117,7 @@ + From 783399f01208a2a276d99eeeb6c5a53ce34b876e Mon Sep 17 00:00:00 2001 From: bitflicker64 Date: Sat, 28 Mar 2026 18:45:59 +0530 Subject: [PATCH 2/3] fix(docker): wire console appender to AsyncLogger for hugegraph server --- .../hugegraph-dist/src/assembly/static/conf/log4j2.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml index ca44484782..cd2d9da569 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml @@ -130,6 +130,7 @@ + From 34a4cb65a1dd6899be718882e14c54827429abcf Mon Sep 17 00:00:00 2001 From: bitflicker64 Date: Sat, 28 Mar 2026 23:04:19 +0530 Subject: [PATCH 3/3] chore: remove resolved TODO comment in start-hugegraph.sh --- .../hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh index ee73a75745..36666f3f3c 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh @@ -99,7 +99,6 @@ if [[ $PRELOAD == "true" ]]; then sed -i -e '/registerBackends/d; /serverStarted/d' "${SCRIPTS}/${EXAMPLE_SCRIPT}" fi -# TODO: show the output message in hugegraph-server.sh when start the server if [[ $DAEMON == "true" ]]; then echo "Starting HugeGraphServer in daemon mode..." "${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \