From f4b57bd0c69fa4f2f44f5399b1d651d1fb485cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Garc=C3=ADa?= Date: Tue, 3 Oct 2023 14:52:08 +0200 Subject: [PATCH] Jetty bundle / Add JAVA_OPTS configuration for the /monitor/metrics endpoint to work correctly (#7385) --- release/bin/startup.bat | 2 +- release/bin/startup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/bin/startup.bat b/release/bin/startup.bat index 59b527ba446..78b6180a17a 100644 --- a/release/bin/startup.bat +++ b/release/bin/startup.bat @@ -7,7 +7,7 @@ del logs\*request.log* del logs\output.log move logs\geonetwork.log.* logs\archive -java -Xms512m -Xmx1g -Djetty.httpConfig.requestHeaderSize=32768 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=4000 -Dmime-mappings=..\web\geonetwork\WEB-INF\mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork -jar start.jar +java -Xms512m -Xmx1g --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Djetty.httpConfig.requestHeaderSize=32768 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=4000 -Dmime-mappings=..\web\geonetwork\WEB-INF\mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork -jar start.jar rem Try changing the Xmx parameter if having memory errors rem If you want to hide the dos window when GeoNetwork is started, comment the previous line and comment out the last line diff --git a/release/bin/startup.sh b/release/bin/startup.sh index c3c7786d86c..fa6fa5ffa74 100755 --- a/release/bin/startup.sh +++ b/release/bin/startup.sh @@ -32,7 +32,7 @@ find logs -maxdepth 1 -name 'geonetwork.log.*' -type f -exec mv -t logs/archive/ export JAVA_MEM_OPTS="-Xms512m -Xmx1g" -export JAVA_OPTS="$JAVA_MEM_OPTS -Djetty.httpConfig.requestHeaderSize=32768 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=4000 -Xss2M -Djeeves.filecharsetdetectandconvert=enabled -Dmime-mappings=../web/geonetwork/WEB-INF/mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork" +export JAVA_OPTS="$JAVA_MEM_OPTS --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Djetty.httpConfig.requestHeaderSize=32768 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=4000 -Xss2M -Djeeves.filecharsetdetectandconvert=enabled -Dmime-mappings=../web/geonetwork/WEB-INF/mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork" # Set custom data directory location using Java property # export JAVA_OPTS="$JAVA_OPTS -Dgeonetwork.dir=/app/geonetwork_data_dir"