“…is not valid datasource for master or user does not have permissions to access”

I got this error while looking at a customer’s system, and weirdly, all renderings that used datasources had stopped working.

Sadly, I don’t still have the full stack trace, but it turns out the problem was a mis-configured URL for the SOLR service. Sitecore uses content search to find the datasource for a component.

This fact was a new one for me!

I think our URL lacked a /, or /#/. We corrected it, and the error went away – and our datasourced renderings started working again.

I found a reference on StackExchange after the fact.

Advertisements
“…is not valid datasource for master or user does not have permissions to access”

Turn off Auth on Solr

Okay, so you probably shouldn’t be doing this – but should you install Solr using the Bitnami stack – like I usually would – it will ask you to set up a usename and password to connect with.

This is a good thing (much better than MongoDB’s “Insecure by default” configuration) – but what if you don’t want it (e.g. for your shared dev Solr instance)?

  • Edit \solr-xxxx\apache-solr\conf\solr.conf
  • Set AuthType to “None”
  • Remove “Require User ” line
  • Restart service.

That should do it.

Turn off Auth on Solr