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: Error when adding user for Solr Basic Authentication
Date Fri, 14 Apr 2017 00:54:08 GMT
i found from StackOverflow that we have to use escaping of single quote and
to use double quote around the JSON string.
http://stackoverflow.com/questions/43387719/error-when-adding-user-for-solr-basic-authentication/43387895#43387895

curl --user user:password http://localhost:8983/solr/admin/authentication -H
    "Content-type:application/json" -d "{
       \"set-user\": {\"tom\" : \"TomIsCool\" ,
       \"harry\":\"HarrysSecret\"}}"

Regards,
Edwin


On 13 April 2017 at 15:03, Zheng Lin Edwin Yeo <edwinyeozl@gmail.com> wrote:

> Hi,
>
> When I try to add the user for the Solr Basic Authentication using the
> following method in curl
>
> curl --user user:password http://localhost:8983/solr/admin/authentication
> -H 'Content-type:application/json' -d '{
>   "set-user": {"tom" : "TomIsCool" ,
>                "harry":"HarrysSecret"}}'
>
> I get the following error:
>
> {
>   "responseHeader":{
>     "status":400,
>     "QTime":0},
>   "error":{
>     "metadata":[
>       "error-class","org.apache.solr.common.SolrException",
>       "root-error-class","org.apache.solr.common.SolrException"],
>     "msg":"No contentStream",
>     "code":400}}
> curl: (3) [globbing] unmatched brace in column 1
> 枩]?V7`-{炘9叡 t肤 ,? E'qyT咐黣]儎;衷 鈛^W褹?curl: (3) [globbing] unmatched
cl
> ose brace/bracket in column 13
>
>
> What does this error means and how should we resolve it?
> I'm using SolrCloud on Solr 6.4.2.
>
>
> Regards,
> Edwin
>
>

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