[
https://issues.apache.org/jira/browse/SOLR-15026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris M. Hostetter updated SOLR-15026:
--------------------------------------
Description:
MiniSolrCloudCluster makes multiple assumptions related to "SSL" that can be
confusing/missleading when attempting to write a test that uses
MiniSolrCloudCluster. This can lead to some aspects of MiniSolrCloudCluster
assuming that SSL should be used -- inspite of what JettyConfig is specified --
based on system properties; or conversly: to not correctly using SSL realted
options in all code paths even when the JettyConfig indicates SSL is needed.
Current workarounds:
* Directly instantiating a MiniSolrCloudCluster in a subclass of
{{SolrTestCaseJ4}} should be avoided unless you explicitly use the
{{SuppressSSL}} anotation.
* If you wish to use a MiniSolrCloudCluster w/SSL use {{SolrCloudTestCase}} (or
{{SolrTestCaseJ4}} directly) along with the {{RandomizeSSL}} annotation instead
of attempting to directly instantiate a MiniSolrCloudCluster.
** There is currently no _easy_ way to directly instantiate a
MiniSolrCloudCluster _and_ use SSL with setting a few system properties and
calling some static methods from your test case ({{SolrTestCaseJ4}} /
{{SolrCloudTestCase}} handles this for you when the {{RandomizeSSL}} annotation
is used)
{panel:title=original issue report}
A new test added in SOLR-14934 caused the following reproducible failure to pop
up on jenkins...
{noformat}
hossman@slate:~/lucene/dev [j11] [master] $ ./gradlew -p solr/test-framework/
test --tests MiniSolrCloudClusterTest.testSolrHomeAndResourceLoaders
-Dtests.seed=806A85748BD81F48 -Dtests.multiplier=2 -Dtests.slow=true
-Dtests.locale=ln-CG -Dtests.timezone=Asia/Thimbu -Dtests.asserts=true
-Dtests.file.encoding=UTF-8
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :randomizationInfo
Running tests with randomization seed: tests.seed=806A85748BD81F48
> Task :solr:test-framework:test
org.apache.solr.cloud.MiniSolrCloudClusterTest > testSolrHomeAndResourceLoaders
FAILED
org.apache.solr.client.solrj.SolrServerException: IOException occurred when
talking to server at: https://127.0.0.1:38681/solr
at
__randomizedtesting.SeedInfo.seed([806A85748BD81F48:37548FA7602CB5FD]:0)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:712)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:269)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:251)
at
org.apache.solr.client.solrj.impl.LBSolrClient.doRequest(LBSolrClient.java:390)
at
org.apache.solr.client.solrj.impl.LBSolrClient.request(LBSolrClient.java:360)
at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:1168)
at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.requestWithRetryOnStaleState(BaseCloudSolrClient.java:931)
at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.request(BaseCloudSolrClient.java:865)
at
org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:229)
at
org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:246)
at
org.apache.solr.cloud.MiniSolrCloudClusterTest.testSolrHomeAndResourceLoaders(MiniSolrCloudClusterTest.java:125)
...
Caused by:
javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
at
java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:439)
{noformat}
The problem sems to be that even though the MiniSolrCloudCluster being
instantiated isn't _intentionally_ using any SSL randomization (it just uses
{{JettyConfig.builder().build()}} the CloudSolrClient returned by
{{cluster.getSolrClient()}} is evidnetly picking up the ranodmized SSL and
trying to use it to talk to the cluster.
{panel}
was:
A new test added in SOLR-14934 caused the following reproducible failure to pop
up on jenkins...
{noformat}
hossman@slate:~/lucene/dev [j11] [master] $ ./gradlew -p solr/test-framework/
test --tests MiniSolrCloudClusterTest.testSolrHomeAndResourceLoaders
-Dtests.seed=806A85748BD81F48 -Dtests.multiplier=2 -Dtests.slow=true
-Dtests.locale=ln-CG -Dtests.timezone=Asia/Thimbu -Dtests.asserts=true
-Dtests.file.encoding=UTF-8
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :randomizationInfo
Running tests with randomization seed: tests.seed=806A85748BD81F48
> Task :solr:test-framework:test
org.apache.solr.cloud.MiniSolrCloudClusterTest > testSolrHomeAndResourceLoaders
FAILED
org.apache.solr.client.solrj.SolrServerException: IOException occurred when
talking to server at: https://127.0.0.1:38681/solr
at
__randomizedtesting.SeedInfo.seed([806A85748BD81F48:37548FA7602CB5FD]:0)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:712)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:269)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:251)
at
org.apache.solr.client.solrj.impl.LBSolrClient.doRequest(LBSolrClient.java:390)
at
org.apache.solr.client.solrj.impl.LBSolrClient.request(LBSolrClient.java:360)
at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:1168)
at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.requestWithRetryOnStaleState(BaseCloudSolrClient.java:931)
at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.request(BaseCloudSolrClient.java:865)
at
org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:229)
at
org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:246)
at
org.apache.solr.cloud.MiniSolrCloudClusterTest.testSolrHomeAndResourceLoaders(MiniSolrCloudClusterTest.java:125)
...
Caused by:
javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
at
java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:439)
{noformat}
The problem sems to be that even though the MiniSolrCloudCluster being
instantiated isn't _intentionally_ using any SSL randomization (it just uses
{{JettyConfig.builder().build()}} the CloudSolrClient returned by
{{cluster.getSolrClient()}} is evidnetly picking up the ranodmized SSL and
trying to use it to talk to the cluster.
> MiniSolrCloudCluster can inconsistently get confused about when it's using SSL
> ------------------------------------------------------------------------------
>
> Key: SOLR-15026
> URL: https://issues.apache.org/jira/browse/SOLR-15026
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Priority: Major
>
> MiniSolrCloudCluster makes multiple assumptions related to "SSL" that can be
> confusing/missleading when attempting to write a test that uses
> MiniSolrCloudCluster. This can lead to some aspects of MiniSolrCloudCluster
> assuming that SSL should be used -- inspite of what JettyConfig is specified
> -- based on system properties; or conversly: to not correctly using SSL
> realted options in all code paths even when the JettyConfig indicates SSL is
> needed.
> Current workarounds:
> * Directly instantiating a MiniSolrCloudCluster in a subclass of
> {{SolrTestCaseJ4}} should be avoided unless you explicitly use the
> {{SuppressSSL}} anotation.
> * If you wish to use a MiniSolrCloudCluster w/SSL use {{SolrCloudTestCase}}
> (or {{SolrTestCaseJ4}} directly) along with the {{RandomizeSSL}} annotation
> instead of attempting to directly instantiate a MiniSolrCloudCluster.
> ** There is currently no _easy_ way to directly instantiate a
> MiniSolrCloudCluster _and_ use SSL with setting a few system properties and
> calling some static methods from your test case ({{SolrTestCaseJ4}} /
> {{SolrCloudTestCase}} handles this for you when the {{RandomizeSSL}}
> annotation is used)
> {panel:title=original issue report}
> A new test added in SOLR-14934 caused the following reproducible failure to
> pop up on jenkins...
> {noformat}
> hossman@slate:~/lucene/dev [j11] [master] $ ./gradlew -p solr/test-framework/
> test --tests MiniSolrCloudClusterTest.testSolrHomeAndResourceLoaders
> -Dtests.seed=806A85748BD81F48 -Dtests.multiplier=2 -Dtests.slow=true
> -Dtests.locale=ln-CG -Dtests.timezone=Asia/Thimbu -Dtests.asserts=true
> -Dtests.file.encoding=UTF-8
> Starting a Gradle Daemon (subsequent builds will be faster)
> > Task :randomizationInfo
> Running tests with randomization seed: tests.seed=806A85748BD81F48
> > Task :solr:test-framework:test
> org.apache.solr.cloud.MiniSolrCloudClusterTest >
> testSolrHomeAndResourceLoaders FAILED
> org.apache.solr.client.solrj.SolrServerException: IOException occurred
> when talking to server at: https://127.0.0.1:38681/solr
> at
> __randomizedtesting.SeedInfo.seed([806A85748BD81F48:37548FA7602CB5FD]:0)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:712)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:269)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:251)
> at
> org.apache.solr.client.solrj.impl.LBSolrClient.doRequest(LBSolrClient.java:390)
> at
> org.apache.solr.client.solrj.impl.LBSolrClient.request(LBSolrClient.java:360)
> at
> org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:1168)
> at
> org.apache.solr.client.solrj.impl.BaseCloudSolrClient.requestWithRetryOnStaleState(BaseCloudSolrClient.java:931)
> at
> org.apache.solr.client.solrj.impl.BaseCloudSolrClient.request(BaseCloudSolrClient.java:865)
> at
> org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:229)
> at
> org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:246)
> at
> org.apache.solr.cloud.MiniSolrCloudClusterTest.testSolrHomeAndResourceLoaders(MiniSolrCloudClusterTest.java:125)
> ...
> Caused by:
> javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
> at
> java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:439)
> {noformat}
> The problem sems to be that even though the MiniSolrCloudCluster being
> instantiated isn't _intentionally_ using any SSL randomization (it just uses
> {{JettyConfig.builder().build()}} the CloudSolrClient returned by
> {{cluster.getSolrClient()}} is evidnetly picking up the ranodmized SSL and
> trying to use it to talk to the cluster.
> {panel}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]