Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

iamgroot avatar image
iamgroot asked ·

DSE Search throws IOException when using basic HTTP auth with Solr UI

Hello,

I am trying to configure a super user for the data centres.

nodetool status -:

Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens       Owns    Host ID                               Rack
UN  45.77.132.94   6.3 GiB    1            ?       e4c87c7c-64af-464b-bde5-2d68994f061e  rack1
UN  45.63.124.195  6.3 GiB    1            ?       80b67f04-96aa-4738-8aae-de6a3fc736e8  rack1
Datacenter: dc2
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens       Owns    Host ID                               Rack
UN  198.13.32.77   7.26 GiB   1            ?       c8241814-beb3-49c7-badb-cbe3eae7d092  rack1
root@guest:~# dsetool status
DC: dc1             Workload: Cassandra       Graph: yes    
=======================================================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--   Address          Load             Owns                 VNodes                                       Rack         Health [0,1] 
UN   45.77.132.94     6.3 GiB          ?                    1373838195836017537                          rack1        1.00         
UN   45.63.124.195    6.3 GiB          ?                    3927092362494960728                          rack1        1.00         

DC: dc2             Workload: Search          Graph: no     
======================================================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--   Address          Load             Owns                 VNodes                                       Rack         Health [0,1] 
UN   198.13.32.77     7.26 GiB         ?                    1464414249938006771                          rack1        0.80         

desc system_auth and dse_secutiry -:

updated from SimpleStrategy to NetworkTopologyStategy with dc1 - 2, dc2 - 1.
Before update, I was getting NoHostAvailable error in cqlsh in Solr server. After updating the strategy, I can see the user that I created in dc1, along with cassandra.

I can also login with the user in the solr dc.

Connected to sample at 198.13.32.77:9042.
[cqlsh 5.0.1 | DSE 6.7.4 | CQL spec 3.4.5 | DSE protocol v2]
Use HELP for help.
myUser@cqlsh> list roles;

 role      | super | login | options
-----------+-------+-------+---------
 cassandra |  True |  True |        {}
    myUser |  True |  True |        {}

(2 rows)

In Code, creating solr index by -:

val solrClient = new SolrClient("http://" + "myUser" + ":" + "password" + "@" + "solr" + "/sample.table")

When I pass the created user from the code to create solr client it throws an error -:

{"code":500,"body":{"api":"MapFeeder","message":" There is an issue, internal server error occured","getMessage":"IOException occurred when talking to server at: http://myUser:password@198.13.32.77:8983/solr/sample.table"}}

I can see the user and even perform cqlsh login with that user in Solr node, but it throws error when I pass it through http.
Also when I pass the default cassandra user instead of the user I created, everything works out.

Is there anything that I am missing? Please let me know more details are required.

dsesearchauthentication
2 comments
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

@iamgroot can you please edit your post and paste the outputs instead of screenshots? It's very hard to read them on a mobile device. Cheers!

1 Like 1 · ·
iamgroot avatar image iamgroot Erick Ramirez ♦♦ ·

removed screenshots and replaced with text.


0 Likes 0 · ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

There are a couple of reasons this isn't working.

The first one is that a complex password could be interpreted incorrectly and it may not be possible to use them for basic HTTP authentication. You can easily test this by temporarily changing the password to a simple text such as "SimplePassword".

The second reason depends on the configuration of your cluster. It may be necessary to grant permissions on Solr resources in order to access them. See the following documents for details:

It is challenging to troubleshoot your issue in the Q&A format of this forum since we will need a lot more additional information so if you have any follow up questions, please log a ticket with DataStax Support so one of our engineers can assist you directly. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi Erick,


After changing the password to a simple one, I am able to log with the user using http authentication.

Thank you for the suggestion.

0 Likes 0 · ·

I'm glad the simple answer was the solution. Cheers!

0 Likes 0 · ·