Invalid entry in users roles file line skipping – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-6.8

Briefly, this error occurs when there is a malformed entry in the usersroles file of Elasticsearch. This file is used to assign roles to users for access control. The error indicates that Elasticsearch is unable to parse a line in this file, hence it’s skipping it. To resolve this issue, you should check the syntax of the usersroles file. Ensure that each line follows the correct format: “username:role1,role2”. Remove any extra spaces, special characters or incorrect delimiters. Also, ensure that the roles assigned to the users are correctly defined in the roles.yml file.

This guide will help you check for common problems that cause the log ” Invalid entry in users_roles file [{}]; line [{}]. skipping… ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: discovery-file and plugin.

Log Context

Log “Invalid entry in users_roles file [{}]; line [{}]. skipping…” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

if (line.startsWith("#")) {  //comment
            int i = line.indexOf(":");
            if (i 


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?