# Bug: Invalid role definition \[null\]

**URL:** <https://discuss.elastic.co/t/bug-invalid-role-definition-null/95837>\
**Category:** Elasticsearch\
**Created:** [August 4, 2017, 8:15am UTC](https://discuss.elastic.co/t/bug-invalid-role-definition-null/95837 "2017-08-04T08:15:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![suckowbiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suckowbiz/32/20790_2.png) [@suckowbiz](https://discuss.elastic.co/u/suckowbiz)\
**Post date:** [August 4, 2017, 8:15am UTC](https://discuss.elastic.co/t/bug-invalid-role-definition-null/95837/1 "2017-08-04T08:15:21Z")

</div>

I was asked to move a bug report here ([https://github.com/elastic/elasticsearch/issues/26053](https://github.com/elastic/elasticsearch/issues/26053)):

**Elasticsearch version** (`bin/elasticsearch --version`): 5.5.1

**Plugins installed** : [x-pack]

**JVM version** (`java -version`): Java SE Runtime 1.7.0\_151-b15

**OS version** (`uname -a` if on a Unix-like system): Red Hat Enterprise Linux Server release 7.4 (Maipo)

**Description of the problem including expected versus actual behavior** :

**Steps to reproduce** :

1. Add `---` in first line of /x-pack/roles.yml to apply to convention of valid yaml file (see: [http://yaml.org/](http://yaml.org/))
2. Restart elasticsearch

Expected behavior:  
Elasticsearch will start without errors.

Actual behavior.  
Elasticsarch fails with error. "invalid role"

**Provide logs (if relevant)**:  
[2017-08-04T09:20:14,940][ERROR][o.e.x.s.a.s.FileRolesStore] [POC\_loghost\_node\_1] invalid role definition [null] in roles file [/usr/share/elasticsearch/config/x-pack/roles.yml]. skipping role...

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [August 8, 2017, 6:52pm UTC](https://discuss.elastic.co/t/bug-invalid-role-definition-null/95837/2 "2017-08-08T18:52:06Z")

</div>

I think all of the Elastic products only support one single document inside yml files., so it does fail when using the document separator in YAML.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 5, 2017, 6:52pm UTC](https://discuss.elastic.co/t/bug-invalid-role-definition-null/95837/3 "2017-09-05T18:52:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
