You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Tomas Eduardo Fernandez Lobbe (Jira)" <ji...@apache.org> on 2023/01/24 23:43:00 UTC

[jira] [Created] (SOLR-16635) Bad PublicKeyHandler configuration when using MiniSolrCloudCluster

Tomas Eduardo Fernandez Lobbe created SOLR-16635:
----------------------------------------------------

             Summary: Bad PublicKeyHandler configuration when using MiniSolrCloudCluster
                 Key: SOLR-16635
                 URL: https://issues.apache.org/jira/browse/SOLR-16635
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: test-framework
    Affects Versions: 9.1, 9.0, main (10.0)
            Reporter: Tomas Eduardo Fernandez Lobbe
            Assignee: Tomas Eduardo Fernandez Lobbe


I changed some external test code to use Solr 9.1 and I started getting this exception when using MiniSolrCloudCluster:

{noformat}
14:55:25.477 [jetty-launcher-7-thread-1] ERROR org.apache.solr.servlet.CoreContainerProvider - Could not start Solr. Check solr/home property and the logs
14:55:25.498 [jetty-launcher-7-thread-1] ERROR org.apache.solr.core.SolrCore - null
java.lang.RuntimeException: Bad PublicKeyHandler configuration.
	at org.apache.solr.core.CoreContainer.<init>(CoreContainer.java:386)
	at org.apache.solr.core.CoreContainer.<init>(CoreContainer.java:363)
	at org.apache.solr.servlet.CoreContainerProvider.createCoreContainer(CoreContainerProvider.java:376)
	at org.apache.solr.servlet.CoreContainerProvider.init(CoreContainerProvider.java:226)
	at org.apache.solr.client.solrj.embedded.JettySolrRunner$1.lifeCycleStarted(JettySolrRunner.java:402)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarted(AbstractLifeCycle.java:194)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:74)
	at org.apache.solr.client.solrj.embedded.JettySolrRunner.retryOnPortBindFailure(JettySolrRunner.java:614)
	at org.apache.solr.client.solrj.embedded.JettySolrRunner.start(JettySolrRunner.java:552)
	at org.apache.solr.client.solrj.embedded.JettySolrRunner.start(JettySolrRunner.java:523)
	at org.apache.solr.cloud.MiniSolrCloudCluster.startJettySolrRunner(MiniSolrCloudCluster.java:550)
	at org.apache.solr.cloud.MiniSolrCloudCluster.lambda$new$0(MiniSolrCloudCluster.java:355)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:271)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.net.MalformedURLException: no protocol: cryptokeys/priv_key512_pkcs8.pem
	at java.base/java.net.URL.<init>(URL.java:645)
	at java.base/java.net.URL.<init>(URL.java:541)
	at java.base/java.net.URL.<init>(URL.java:488)
	at org.apache.solr.security.PublicKeyHandler.createKeyPair(PublicKeyHandler.java:59)
	at org.apache.solr.security.PublicKeyHandler.<init>(PublicKeyHandler.java:42)
	at org.apache.solr.core.CoreContainer.<init>(CoreContainer.java:384)
	... 16 common frames omitted
{noformat}
I believe the issue may have been introduced by SOLR-14223, in particular, [this code|https://github.com/apache/lucene-solr/pull/1217/files#diff-c3ed2e54e8d8f256575f36532ab4eec6d9e7424e0a6fd237cdbfcefa5fcbaeb0R116-R117]. I believe we don't hit this in Solr because of [this code|https://github.com/apache/lucene-solr/pull/1217/files#diff-7cb8f3a46dbdb99ccfdcc1d07c4457167188e7366534a7e7e4a0b5aff93c1cc4R304-R305], so I'm forced to do something like this in my external code, or at least do something like:

{code:java}
System.setProperty("pkiHandlerPublicKeyPath", "");
System.setProperty("pkiHandlerPrivateKeyPath", "");
{code}
which I doubt it's the intention. We can have {{MiniSolrCloudCluster}} resolve the location of the crypto keys and use that in the default solr.xml string that it includes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org