Closed psbalaji closed 8 years ago
We should send the username and password for authentication before posting any data. The following code worked.
Authenticator.setDefault (new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication ("username", "password".toCharArray()); } });
I am getting the following error while connecting to elasticsearch.
Reporting returned code 401 Unauthorized: {}
I am using shield plugin with elasticsearch and how do I pass the username and password?