[ 
https://issues.apache.org/jira/browse/FLINK-14186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16938235#comment-16938235
 ] 

Yun Gao commented on FLINK-14186:
---------------------------------

The reason of this issue is that -XX:+UseParNewGC [has been removed from the 
JDK11|[https://bugs.openjdk.java.net/browse/JDK-8151084]] as the garbage 
collector algorithms have evolved. However, Elastic Search 2.3.5  has 
configured this option in its startup script. Therefore, the Elastic Search 
2.3.5 will fail to start on JDK11, which cause the test fail.

To fix this problem, we can set environment variable 
JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions" when starting the Elastic Search 
cluster. This environment variable parameter is provided by Elastic Search 
2.3.5 script and IgnoreUnrecognizedVMOptions let JVM ignores unrecognized 
options instead throw an error.

The Elastic Search 5.x and 6.x have removed -XX:+UseParNewGC from the default 
JVM config and thus they should not met this issue. Besides, in these two 
version JAVA_OPTS is deprecated and ES_JAVA_OPTS is used instead. Since the two 
version currently do not have problem, I think we do not need to also configure 
ES_JAVA_OPTS now. 

 

For reference, the code involved in Flink is:
 # flink-end-to-end-tests/run-nightly-tests.sh have three ElasticSearch related 
tests. They all finally called 
flink-end-to-end-tests/test-scripts/test_streaming_elasticsearch.sh. 
 # test_streaming_elasticsearch.sh further called the function 
setup_elasticsearch included from 
flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
 # setup_elasticsearch downloads the specified ElasticSearch distribution 
package and unzip it. Then it calls "_$elasticsearchDir/bin/elasticsearch &"_ 
to start  the __ ElasticSearch __ cluster. We should then modify the startup 
environment here.

 

 

 

> Nightly e2e-misc-jdk11 fails complaining unrecognized VM option
> ---------------------------------------------------------------
>
>                 Key: FLINK-14186
>                 URL: https://issues.apache.org/jira/browse/FLINK-14186
>             Project: Flink
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Yu Li
>            Assignee: Yun Gao
>            Priority: Critical
>              Labels: test-stability
>
> As titled, this failure reproduces stably in recent nightly runs, such as 
> https://api.travis-ci.org/v3/job/588201921/log.txt . From the log we could 
> see message like below:
> {noformat}
> Unrecognized VM option 'UseParNewGC'
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to