Skip to content

[CI] SSLConfigurationReloaderTests fail on Java 11 #32124

@davidkyle

Description

@davidkyle

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+matrix-java-periodic/ES_BUILD_JAVA=java11,ES_RUNTIME_JAVA=java11,nodes=virtual&&linux/180
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+matrix-java-periodic/ES_BUILD_JAVA=java10,ES_RUNTIME_JAVA=java11,nodes=virtual&&linux/181

The failures are due to the test timing out

java.lang.Exception: Suite timeout exceeded (>= 1200000 msec).
	at __randomizedtesting.SeedInfo.seed([5DB61DD425F081B]:0)

And the logs show some interesting errors

1> java.lang.NullPointerException: null
1> 	at org.elasticsearch.xpack.core.ssl.SSLService$SSLContextHolder.invalidateSessions(SSLService.java:552) ~[main/:?]
1> 	at org.elasticsearch.xpack.core.ssl.SSLService$SSLContextHolder.reload(SSLService.java:558) ~[main/:?]
1> 	at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloader.reloadSSLContext(SSLConfigurationReloader.java:80) ~[main/:?]
1> 	at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests$5.reloadSSLContext(SSLConfigurationReloaderTests.java:447) ~[test/:?]
1> 	at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloader$ChangeListener.onFileChanged(SSLConfigurationReloader.java:120) ~

The test fails with a different error when I run it with Java 11

ERROR   0.06s | SSLConfigurationReloaderTests.testReloadingTrustStore <<< FAILURES!
   > Throwable #1: java.lang.RuntimeException: Error connecting to the mock server
   >    at __randomizedtesting.SeedInfo.seed([5DB61DD425F081B:A93AE0D293F69319]:0)
   >    at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests.lambda$testReloadingTrustStore$13(SSLConfigurationReloaderTests.java:216)
   >    at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests.validateSSLConfigurationIsReloaded(SSLConfigurationReloaderTests.java:455)
   >    at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests.testReloadingTrustStore(SSLConfigurationReloaderTests.java:238)
   >    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   >    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   >    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   >    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   >    at java.base/java.lang.Thread.run(Thread.java:834)
   > Caused by: java.lang.NullPointerException
   >    at java.base/sun.security.ssl.SSLSessionImpl.getLocalPrincipal(SSLSessionImpl.java:661)
   >    at org.apache.http.impl.client.DefaultUserTokenHandler.getUserToken(DefaultUserTokenHandler.java:83)
   >    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:327)
   >    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
   >    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
   >    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
   >    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
   >    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
   >    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
   >    at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests.lambda$testReloadingTrustStore$12(SSLConfigurationReloaderTests.java:214)
   >    at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests.lambda$privilegedConnect$24(SSLConfigurationReloaderTests.java:533)
   >    at java.base/java.security.AccessController.doPrivileged(Native Method)
   >    at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests.privilegedConnect(SSLConfigurationReloaderTests.java:532)
   >    at org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests.lambda$testReloadingTrustStore$13(SSLConfigurationReloaderTests.java:214)
   >    ... 38 more

Reproduce:

./gradlew :x-pack:plugin:core:test \
  -Dtests.seed=5DB61DD425F081B \
  -Dtests.class=org.elasticsearch.xpack.core.ssl.SSLConfigurationReloaderTests \
  -Dtests.security.manager=true \
  -Dtests.locale=en-US \
  -Dtests.timezone=Etc/UTC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions