wodby/docker4drupal

You are using an incompatible Solr schema

2dareis2do opened this issue · 1 comments

I am running drupal4docker and attempting to setup solr

I have followed the instructions here https://wodby.com/docs/1.0/stacks/drupal/local/#solr-search-api

So I have

The Solr server could be reached.

The Solr collection could be accessed (latency: 3.0980573425293 ms).

However, from admin/config/search/search-api/server/dev where dev is the name of my index I get

You are using an incompatible Solr schema. Please follow the instructions described in the README.md file for setting up Solr.

However from Drupal when I try to upload the configset I get

Error message
Configset upload failed with error code 400: Solr HTTP error: OK (400) { "responseHeader":{ "status":400, "QTime":4}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"Trying to make an unstrusted ConfigSet update on a trusted configSet", "code":400}}|

'unstrusted' looks like it is coming form solr?

Pretty sure this has worked once but not since then even on a different collection

Not sure if this is an issue with zookeeper, but not really sure where to start with debugging this?

Also from solr UI I see the following warning. Not sure if this is related?

WARNING: Security is not enabled for this server!

Use the bin/solr auth command-line tool to enable security and then reload this panel. For more information, see: Using security.json with Solr

Example usage of bin/solr auth to enable basic authentication:

    bin/solr auth enable -type basicAuth -prompt true -z zookeeper:2181 -blockUnknown true

I have tried to access solr container with make shell solr command but do not how I can enable basic authentication if that is the issue here?

Just looking https://github.com/mkalkbrenner/ddev-solr and apparently you should be able to create the container from the Drupal side. When I try this I get

Creating collection techproducts failed with error code 400: Solr HTTP error: OK (400) { "responseHeader":{ "status":400, "QTime":845}, "failure":{ "172.31.0.8:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://172.31.0.8:8983/solr: Error CREATEing SolrCore 'techproducts_shard1_replica_n1': Unable to create core [techproducts_shard1_replica_n1] Caused by: The configset for this collection was uploaded without any authentication in place, and use of is not available for collections with untrusted configsets. To use this component, re-upload the configset after enabling authentication and authorization."}, "Operation create caused exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Underlying core creation failed while creating collection: techproducts", "exception":{ "msg":"Underlying core creation failed while creating collection: techproducts", "rspCode":400}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"Underlying core creation failed while creating collection: techproducts", "code":400}}

ok had to create container manually using ddev but does seem to work. Only difference I can see is that it has a security.json schema.

e.g.

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