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

Yaswanth edited comment on SOLR-14575 at 10/15/20, 3:22 AM:
------------------------------------------------------------

here is my jetty-ssl.xml

<?xml version="1.0"?>
 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" 
"http://www.eclipse.org/jetty/configure_9_0.dtd";>

<!-- ============================================================= -->
 <!-- Configure a TLS (SSL) Context Factory -->
 <!-- This configuration must be used in conjunction with jetty.xml -->
 <!-- and either jetty-https.xml or jetty-spdy.xml (but not both) -->
 <!-- ============================================================= -->
 <Configure id="sslContextFactory" 
class="org.eclipse.jetty.util.ssl.SslContextFactory">
 <Call class="org.apache.solr.util.configuration.SSLConfigurationsFactory" 
name="current">
 <Get name="keyStorePassword" id="solrssl"/>
 <Get name="trustStorePassword" id="solrssl"/>
 </Call>
 <Set name="KeyStorePath"><Property name="solr.jetty.keystore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="KeyStorePassword"><Ref refid="keyStorePassword"/></Set>
 <Set name="TrustStorePath"><Property name="solr.jetty.truststore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="TrustStorePassword"><Ref refid="trustStorePassword"/></Set>
 <Set name="NeedClientAuth"><Property name="solr.jetty.ssl.needClientAuth" 
default="false"/></Set>
 <Set name="WantClientAuth"><Property name="solr.jetty.ssl.wantClientAuth" 
default="false"/></Set>
 <Set name="KeyStoreType"><Property name="solr.jetty.keystore.type" 
default="JKS"/></Set>
 <Set name="TrustStoreType"><Property name="solr.jetty.truststore.type" 
default="JKS"/></Set>

<!-- =========================================================== -->
 <!-- Create a TLS specific HttpConfiguration based on the -->
 <!-- common HttpConfiguration defined in jetty.xml -->
 <!-- Add a SecureRequestCustomizer to extract certificate and -->
 <!-- session information -->
 <!-- =========================================================== -->
 <New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
 <Arg><Ref refid="httpConfig"/></Arg>
 <Call name="addCustomizer">
 <Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg>
 </Call>
 </New>

</Configure>

 

And with this I am not even able to start the solr and here is the error that i 
am getting

java.lang.reflect.InvocationTargetException
 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 org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
 at org.eclipse.jetty.start.Main.start(Main.java:490)
 at org.eclipse.jetty.start.Main.main(Main.java:77)
 Caused by: java.lang.NullPointerException
 at 
org.eclipse.jetty.util.ssl.SslContextFactory.getKeyManagers(SslContextFactory.java:1240)
 at 
org.eclipse.jetty.util.ssl.SslContextFactory.load(SslContextFactory.java:381)
 at 
org.eclipse.jetty.util.ssl.SslContextFactory.doStart(SslContextFactory.java:256)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
 at 
org.eclipse.jetty.server.SslConnectionFactory.doStart(SslConnectionFactory.java:94)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
 at 
org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:282)
 at 
org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81)
 at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at org.eclipse.jetty.server.Server.doStart(Server.java:396)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at 
org.eclipse.jetty.xml.XmlConfiguration.lambda$main$0(XmlConfiguration.java:1797)
 at 
org.eclipse.jetty.xml.XmlConfiguration$$Lambda$101/00000000CD09DC80.run(Unknown 
Source)
 at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:734)

 

 

And for workaround I used this in jetty-ssl.xml and it worked

 

<Configure id="sslContextFactory" 
class="org.eclipse.jetty.util.ssl.SslContextFactory">
 <Set name="EndpointIdentificationAlgorithm"></Set>
 <Set name="KeyStorePath"><Property name="solr.jetty.keystore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="KeyStorePassword"><Property name="solr.jetty.keystore.password" 
default="solrssl"/></Set>
 <Set name="TrustStorePath"><Property name="solr.jetty.truststore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="TrustStorePassword"><Property name="solr.jetty.truststore.password" 
default="solrssl"/></Set>
 <Set name="NeedClientAuth"><Property name="solr.jetty.ssl.needClientAuth" 
default="false"/></Set>
 <Set name="WantClientAuth"><Property name="solr.jetty.ssl.wantClientAuth" 
default="false"/></Set>

<!-- =========================================================== -->
 <!-- Create a TLS specific HttpConfiguration based on the -->
 <!-- common HttpConfiguration defined in jetty.xml -->
 <!-- Add a SecureRequestCustomizer to extract certificate and -->
 <!-- session information -->
 <!-- =========================================================== -->
 <New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
 <Arg><Ref refid="httpConfig"/></Arg>
 <Call name="addCustomizer">
 <Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg>
 </Call>
 </New>

</Configure>

 

Not really sure if my main exception that I am seeing while addReplica is due 
to this configuration glitch?? Please help me

 

Remaining files like jetty.xml and jetty-https.xml are same as shipped with 
solr 8.2 package

 

Thanks,


was (Author: ykonathala):
here is my jetty-ssl.xml

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" 
"http://www.eclipse.org/jetty/configure_9_0.dtd";>

<!-- ============================================================= -->
<!-- Configure a TLS (SSL) Context Factory -->
<!-- This configuration must be used in conjunction with jetty.xml -->
<!-- and either jetty-https.xml or jetty-spdy.xml (but not both) -->
<!-- ============================================================= -->
<Configure id="sslContextFactory" 
class="org.eclipse.jetty.util.ssl.SslContextFactory">
 <Call class="org.apache.solr.util.configuration.SSLConfigurationsFactory" 
name="current">
 <Get name="keyStorePassword" id="solrssl"/>
 <Get name="trustStorePassword" id="solrssl"/>
 </Call>
 <Set name="KeyStorePath"><Property name="solr.jetty.keystore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="KeyStorePassword"><Ref refid="keyStorePassword"/></Set>
 <Set name="TrustStorePath"><Property name="solr.jetty.truststore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="TrustStorePassword"><Ref refid="trustStorePassword"/></Set>
 <Set name="NeedClientAuth"><Property name="solr.jetty.ssl.needClientAuth" 
default="false"/></Set>
 <Set name="WantClientAuth"><Property name="solr.jetty.ssl.wantClientAuth" 
default="false"/></Set>
 <Set name="KeyStoreType"><Property name="solr.jetty.keystore.type" 
default="JKS"/></Set>
 <Set name="TrustStoreType"><Property name="solr.jetty.truststore.type" 
default="JKS"/></Set>

<!-- =========================================================== -->
 <!-- Create a TLS specific HttpConfiguration based on the -->
 <!-- common HttpConfiguration defined in jetty.xml -->
 <!-- Add a SecureRequestCustomizer to extract certificate and -->
 <!-- session information -->
 <!-- =========================================================== -->
 <New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
 <Arg><Ref refid="httpConfig"/></Arg>
 <Call name="addCustomizer">
 <Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg>
 </Call>
 </New>

</Configure>

 

And with this I am not even able to start the solr and here is the error that i 
am getting

java.lang.reflect.InvocationTargetException
 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 org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
 at org.eclipse.jetty.start.Main.start(Main.java:490)
 at org.eclipse.jetty.start.Main.main(Main.java:77)
Caused by: java.lang.NullPointerException
 at 
org.eclipse.jetty.util.ssl.SslContextFactory.getKeyManagers(SslContextFactory.java:1240)
 at 
org.eclipse.jetty.util.ssl.SslContextFactory.load(SslContextFactory.java:381)
 at 
org.eclipse.jetty.util.ssl.SslContextFactory.doStart(SslContextFactory.java:256)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
 at 
org.eclipse.jetty.server.SslConnectionFactory.doStart(SslConnectionFactory.java:94)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
 at 
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
 at 
org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:282)
 at 
org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81)
 at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at org.eclipse.jetty.server.Server.doStart(Server.java:396)
 at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
 at 
org.eclipse.jetty.xml.XmlConfiguration.lambda$main$0(XmlConfiguration.java:1797)
 at 
org.eclipse.jetty.xml.XmlConfiguration$$Lambda$101/00000000CD09DC80.run(Unknown 
Source)
 at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:734)

 

 

And for workaround I used this in jetty-ssl.xml and it worked

 

<Configure id="sslContextFactory" 
class="org.eclipse.jetty.util.ssl.SslContextFactory">
<Set name="EndpointIdentificationAlgorithm"></Set>
 <Set name="KeyStorePath"><Property name="solr.jetty.keystore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="KeyStorePassword"><Property name="solr.jetty.keystore.password" 
default="solrssl"/></Set>
 <Set name="TrustStorePath"><Property name="solr.jetty.truststore" 
default="./etc/solr-keystore.jks"/></Set>
 <Set name="TrustStorePassword"><Property name="solr.jetty.truststore.password" 
default="solrssl"/></Set>
 <Set name="NeedClientAuth"><Property name="solr.jetty.ssl.needClientAuth" 
default="false"/></Set>
 <Set name="WantClientAuth"><Property name="solr.jetty.ssl.wantClientAuth" 
default="false"/></Set>

<!-- =========================================================== -->
 <!-- Create a TLS specific HttpConfiguration based on the -->
 <!-- common HttpConfiguration defined in jetty.xml -->
 <!-- Add a SecureRequestCustomizer to extract certificate and -->
 <!-- session information -->
 <!-- =========================================================== -->
 <New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
 <Arg><Ref refid="httpConfig"/></Arg>
 <Call name="addCustomizer">
 <Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg>
 </Call>
 </New>

</Configure>

 

Not really sure if my main exception that I am seeing while addReplica is due 
to this configuration glitch?? Please help me

 

Thanks,

> Solr restore is failing when basic authentication is enabled
> ------------------------------------------------------------
>
>                 Key: SOLR-14575
>                 URL: https://issues.apache.org/jira/browse/SOLR-14575
>             Project: Solr
>          Issue Type: Bug
>          Components: Backup/Restore
>    Affects Versions: 8.2
>            Reporter: Yaswanth
>            Priority: Major
>
> Hi Team,
> I was testing backup / restore for solrcloud and its failing exactly when I 
> am trying to restore a successfully backed up collection.
> I am using solr 8.2 with basic authentication enabled and then creating a 2 
> replica collection. When I run the backup like
> curl -u xxx:xxx -k 
> '[https://x.x.x.x:8080/solr/admin/collections?action=BACKUP&name=test&collection=test&location=/solrdatabkup'|https://x.x.x.x:8080/solr/admin/collections?action=BACKUP&name=test&collection=test&location=/solrdatabkup%27]
>  it worked fine and I do see a folder was created with the collection name 
> under /solrdatabackup
> But now when I deleted the existing collection and then try running restore 
> api like
> curl -u xxx:xxx -k 
> '[https://x.x.x.x:8080/solr/admin/collections?action=RESTORE&name=test&collection=test&location=/solrdatabkup'|https://x.x.x.x:8080/solr/admin/collections?action=BACKUP&name=test&collection=test&location=/solrdatabkup%27]
>  its throwing an error like 
> {
>  "responseHeader":{
>  "status":500,
>  "QTime":457},
>  "Operation restore caused 
> *exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
>  ADDREPLICA failed to create replica",*
>  "exception":{
>  "msg":"ADDREPLICA failed to create replica",
>  "rspCode":500},
>  "error":{
>  "metadata":[
>  "error-class","org.apache.solr.common.SolrException",
>  "root-error-class","org.apache.solr.common.SolrException"],
>  "msg":"ADDREPLICA failed to create replica",
>  "trace":"org.apache.solr.common.SolrException: ADDREPLICA failed to create 
> replica\n\tat 
> org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:53)\n\tat
>  
> org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:280)\n\tat
>  
> org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:252)\n\tat
>  
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)\n\tat
>  
> org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:820)\n\tat 
> org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:786)\n\tat
>  org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:546)\n\tat 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:423)\n\tat
>  
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:350)\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)\n\tat
>  
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1678)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:152)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat
>  
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat
>  org.eclipse.jetty.server.Server.handle(Server.java:505)\n\tat 
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)\n\tat 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)\n\tat
>  
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)\n\tat
>  org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat 
> org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:427)\n\tat
>  
> org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:321)\n\tat
>  
> org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:159)\n\tat
>  org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat 
> org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)\n\tat 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\n\tat
>  
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\n\tat
>  
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\n\tat
>  
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)\n\tat
>  
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:781)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917)\n\tat
>  java.base/java.lang.Thread.run(Thread.java:834)\n",
>  "code":500}}
> I believe this might be a bug, can someone please confirm the same?
> Note: I already posted the same to solr-user and haven't got any response.
> Thanks,



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to