lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Lin Edwin Yeo <edwinye...@gmail.com>
Subject Re: Security.json file caused Solr to stop working
Date Wed, 19 Apr 2017 02:46:33 GMT
This was due to a missing comma in the JSON file.

{
"authentication":{
   "blockUnknown": false,
   "class":"solr.BasicAuthPlugin",
   "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
},
"authorization":{
   "class":"solr.RuleBasedAuthorizationPlugin",
   "permissions":[{"name":"security-edit",
      "role":"admin"}],
   "user-role":{"solr":"admin"}
}}


Regards,
Edwin

On 10 April 2017 at 16:34, Zheng Lin Edwin Yeo <edwinyeozl@gmail.com> wrote:

> This is the error message that I get.
>
> 2017-04-10 08:30:05.766 ERROR (main) [   ] o.a.s.s.SolrDispatchFilter
> Could not start Solr. Check solr/home property and the logs
> 2017-04-10 08:30:05.779 ERROR (main) [   ] o.a.s.c.SolrCore null:java.lang.ClassCastException:
> java.lang.String cannot be cast to java.util.Map
> at org.apache.solr.common.cloud.ZkStateReader.getSecurityProps(
> ZkStateReader.java:908)
> at org.apache.solr.common.cloud.ZkStateReader.
> createClusterStateWatchersAndUpdate(ZkStateReader.java:433)
> at org.apache.solr.cloud.ZkController.init(ZkController.java:672)
> at org.apache.solr.cloud.ZkController.<init>(ZkController.java:419)
> at org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:112)
> at org.apache.solr.core.CoreContainer.load(CoreContainer.java:465)
> at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(
> SolrDispatchFilter.java:235)
> at org.apache.solr.servlet.SolrDispatchFilter.init(
> SolrDispatchFilter.java:167)
> at org.eclipse.jetty.servlet.FilterHolder.initialize(
> FilterHolder.java:137)
> at org.eclipse.jetty.servlet.ServletHandler.initialize(
> ServletHandler.java:873)
> at org.eclipse.jetty.servlet.ServletContextHandler.startContext(
> ServletContextHandler.java:349)
> at org.eclipse.jetty.webapp.WebAppContext.startWebapp(
> WebAppContext.java:1404)
> at org.eclipse.jetty.webapp.WebAppContext.startContext(
> WebAppContext.java:1366)
> at org.eclipse.jetty.server.handler.ContextHandler.
> doStart(ContextHandler.java:778)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStart(
> ServletContextHandler.java:262)
> at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.
> start(AbstractLifeCycle.java:68)
> at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(
> StandardStarter.java:41)
> at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(
> AppLifeCycle.java:188)
> at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(
> DeploymentManager.java:499)
> at org.eclipse.jetty.deploy.DeploymentManager.addApp(
> DeploymentManager.java:147)
> at org.eclipse.jetty.deploy.providers.ScanningAppProvider.
> fileAdded(ScanningAppProvider.java:180)
> at org.eclipse.jetty.deploy.providers.WebAppProvider.
> fileAdded(WebAppProvider.java:458)
> at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(
> ScanningAppProvider.java:64)
> at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
> at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
> at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
> at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.
> start(AbstractLifeCycle.java:68)
> at org.eclipse.jetty.deploy.providers.ScanningAppProvider.
> doStart(ScanningAppProvider.java:150)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.
> start(AbstractLifeCycle.java:68)
> at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(
> DeploymentManager.java:561)
> at org.eclipse.jetty.deploy.DeploymentManager.doStart(
> DeploymentManager.java:236)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.
> start(AbstractLifeCycle.java:68)
> at org.eclipse.jetty.util.component.ContainerLifeCycle.
> start(ContainerLifeCycle.java:131)
> at org.eclipse.jetty.server.Server.start(Server.java:422)
> at org.eclipse.jetty.util.component.ContainerLifeCycle.
> doStart(ContainerLifeCycle.java:113)
> at org.eclipse.jetty.server.handler.AbstractHandler.
> doStart(AbstractHandler.java:61)
> at org.eclipse.jetty.server.Server.doStart(Server.java:389)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.
> start(AbstractLifeCycle.java:68)
> at org.eclipse.jetty.xml.XmlConfiguration$1.run(
> XmlConfiguration.java:1516)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1441)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.eclipse.jetty.start.Main.invokeMain(Main.java:214)
> at org.eclipse.jetty.start.Main.start(Main.java:457)
> at org.eclipse.jetty.start.Main.main(Main.java:75)
>
>
> Regards,
> Edwin
>
> On 10 April 2017 at 11:42, Zheng Lin Edwin Yeo <edwinyeozl@gmail.com>
> wrote:
>
>> Hi,
>>
>> I tried to implement the security.json using SolrCloud in Solr 6.4.2.
>>
>> However, after I upload the security.json to ZooKeeper, the Solr cannot
>> access any function at all. It also does not prompt to enter a User Name
>> and Password to login, as per what is expected.
>>
>> Why could this be the reason?
>>
>> Below is my security.json file, taken from the example in Solr. It does
>> not work even when the blockUnknown is set to false.
>>
>>
>> {
>> "authentication":{
>>    "blockUnknown": false,
>>    "class":"solr.BasicAuthPlugin",
>>    "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
>> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
>> },
>> "authorization":{
>>    "class":"solr.RuleBasedAuthorizationPlugin",
>>    "permissions":[{"name":"security-edit",
>>       "role":"admin"}]
>>    "user-role":{"solr":"admin"}
>> }}
>>
>>
>> Regards,
>> Edwin
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message