standalone.sh script do not detect custom GC logs in JBoss EAP 6.3.x/6.4.x/7.0.x
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6.3.x+
Issue
- We run JBoss in standalone mode and we configure GC logs without the -verbose:gc flag. It looks like the standalone scripts add GC log options that collide with ours.
- Unable to disable the automatic GC log setting defined inside the standalone.sh in JBoss EAP 6.3.x/6.4.x/7.0.x.
Resolution
-
Update to EAP 7.1 or EAP 7.0 CP5 onwards, then you can set the
GC_LOGoption to false (likeGC_LOG="false") instandalone.conf. -
As a workaround in the versions before EAP 7.0 CP5, modify
standalone.shfrom:# Enable rotating GC logs if the JVM supports it and GC logs are not already enabled NO_GC_LOG_ROTATE=`echo $JAVA_OPTS | $GREP "\-verbose:gc"`to:
# Enable rotating GC logs if the JVM supports it and GC logs are not already enabled NO_GC_LOG_ROTATE=$NO_GC_LOG_ROTATE`echo $JAVA_OPTS | $GREP "\-verbose:gc"`then you can freely use
NO_GC_LOG_ROTATEinstandalone.conf(likePRESERVE_JAVA_OPTS) to disable the automatic gc logs specifically.
This article shows how to preserve/update your standalone.conf/standalone.conf.bat as this bug fix will need to modify the standalone.conf/standalone.conf.bat which many users also modify: Conflicts detected: bin/standalone.bat, bin/standalone.conf.bat when apply JBoss EAP 7.0 CP5 / EAP 6.4 CP14
Root Cause
- Unable to disable the automatic GC log flags specifically in the standalone.sh/.bat
- The standalone start up scripts only detect custom GC log options including the
-verbose:gcflag
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.