Reputation: 225
I'm using basic authentication in my solr project. I want to create new core but it gives me this error.
ERROR: Solr requires authentication for http://localhost:8983/solr/admin/info/system. Please supply valid credentials. HTTP code=401
I'm creating the core like this
solr create -c StorageCore -credentials solr:SolrRocks
How can I fix this problem?
UPDATE
Upvotes: 1
Views: 795
Reputation: 52822
That command argument is only supported when enabling authentication through the command line tool.
For using the control script with basic auth:
Using the Solr Control Script with Basic Auth
Add the following line to the solr.in.sh or solr.in.cmd file. This example tells the bin/solr command line to to use "basic" as the type of authentication, and to pass credentials with the user-name "solr" and password "SolrRocks":
SOLR_AUTH_TYPE="basic" SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
Upvotes: 1