Summary
Internal authentication breaks the use of some search related dsetool commands.
Symptoms
"Unknown command" is returned when specifying the username and password when using the "-l" and "-pw" options as per the documentation
For example:
$ dsetool -l <username> -p <password> <keyspace>.<table> reindex=true deleteAll=true
Unknown command: cassandra
Cause
The cause is a known defect :
DSP-8251 dsetool search commands to work with C* password auth
Workaround
Pass the user and password via the -h <hostname> parameter.
For example:
$ dsetool -h <username>:<password>@<hostname> reload_core <keyspace>.<table> reindex=true deleteAll=true
This works for the following search related dsetool commands:
create_core
reload_core [1]
infer_solr_schema
unload_core
[1] reload_core will not work if combined with the schema and solrconfig option like so
dsetool -h <username>:<password>@<hostname> reload_core <keyspace>.<table> schema=schema.xml solrconfig=solrconfig.xml
To overcome this you will need load schema.xml and solrconfig.xml prior to the reload_core using the documented Uploading the schema and configuration method.
The "-h" option DOES NOT work for the following commands:
get_core_schema
get_core_config
Instead, use curl to perform these two functions like so:
get_core_schema:
curl http://<username>:<password>@<hostname>:8983/solr/<keyspace>.<table>/admin/file?file=schema.xml -H 'contentType=text/xml;charset=utf-8' > schema.xml
get_core_config:
curl http://<username>:<password>@<hostname>:8983/solr/<keyspace>.<table>/admin/file?file=solrconfig.xml -H 'contentType=text/xml;charset=utf-8' > solrconfig.xml
Solution
Upgrade to DSE 4.8.5 and use the documented "-l <username> -pw <password>" options.
For example:
$ dsetool -l <username> -p <password> <keyspace>.<table> reindex=true deleteAll=true
Comments
0 comments
Please sign in to leave a comment.