Briefly, this error occurs when Elasticsearch is unable to add a new user due to issues like insufficient permissions, incorrect syntax, or a non-existent role. To resolve this, ensure that the user executing the command has the necessary permissions. Check the syntax of the command, ensuring that the username and password are correctly formatted. Also, verify that the role assigned to the new user exists in the system. If not, create the role before adding the user.
This guide will help you check for common problems that cause the log ” failed to put user [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “failed to put user [{}]” classname is TransportPutUserAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
listener.onResponse(new PutUserResponse(created)); } @Override public void onFailure(Exception e) { logger.error((Supplier>) () -> new ParameterizedMessage("failed to put user [{}]"; request.username()); e); listener.onFailure(e); } }); } }