[
https://issues.apache.org/jira/browse/KARAF-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16920881#comment-16920881
]
Jean-Baptiste Onofré commented on KARAF-6377:
---------------------------------------------
Ok, it's the problem with the extra opts. [~riconeubauer] yeah, agree, I think
it's the same issue. I already prepare changed on scripts on a local branch. I
have to test it before merging.
> GCLog corrupted when executing stop
> -----------------------------------
>
> Key: KARAF-6377
> URL: https://issues.apache.org/jira/browse/KARAF-6377
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.1.6, 4.2.4
> Reporter: Julien Greffe
> Assignee: Jean-Baptiste Onofré
> Priority: Major
>
> Hello,
> on a Karaf instance with GCLogs activated, executing the {{stop}} command
> leads to a corrupted GCLog.
> To reproduce :
> * add these lines in {{<KARAF_HOME>/bin/setenv.bat}} :
> {code:java}
> SET JAVA_MIN_MEM=1024M
> SET JAVA_MAX_MEM=2560M
> SET KARAF_OPTS=-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails
> -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=20
> -XX:GCLogFileSize=10m{code}
> * start the container with {{<KARAF_HOME>/bin/karaf.bat}}
> * check the content of {{<KARAF_HOME/gc.log}}
> * stop the container with {{<KARAF_HOME/bin/stop.bat}}
> * check the content of {{<KARAF_HOME/gc.log}} >> corrupted with non
> printable characters
> Quick analysis :
> seems the issue is linked to the way {{stop}} condition is handled in
> {{karaf.bat}} and {{karaf}} the final command executed :
> {code}
> :EXECUTE
> "%JAVA%" %JAVA_OPTS% %OPTS% ...
> {code}
> Instead of using {{stop.bat}}, if we execute this command, the GCLog isn't
> corrupted anymore :
> {code}
> java -classpath "<KARAF_HOME>\lib\boot\org.apache.karaf.main-4.2.4.jar"
> -Dkaraf.home="<KARAF_HOME>" org.apache.karaf.main.Stop
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)