# Logstash fails to start with init script (RHEL/CentOS)

**URL:** <https://discuss.elastic.co/t/logstash-fails-to-start-with-init-script-rhel-centos/55516>\
**Category:** Logstash\
**Created:** [July 14, 2016, 12:44pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-with-init-script-rhel-centos/55516 "2016-07-14T12:44:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pysysops](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pysysops/32/8106_2.png) [@pysysops](https://discuss.elastic.co/u/pysysops)\
**Post date:** [July 14, 2016, 12:44pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-with-init-script-rhel-centos/55516/1 "2016-07-14T12:44:59Z")

</div>

Hey!

When run as a user that belongs to a group with spaces in the name (a la Windows / Samba), Logstash fails to start. I have fixed this locally by amending line: 61

Before (not working due to names):  
SGROUPS=$(id -Gn "$LS\_USER" | tr " " "," | sed 's/,$//'; echo '')

After (Use GIDs):  
SGROUPS=$(id -G "$LS\_USER" | tr " " "," | sed 's/,$//'; echo '')

I was unable to find this in your repos otherwise I would've opened a PR...

Thanks,

Tim.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 14, 2016, 9:49pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-with-init-script-rhel-centos/55516/2 "2016-07-14T21:49:39Z")

</div>

Can you raise a GH issue against the core repo please? Then we can either point to the script or arrange a fit 🙂

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [July 15, 2016, 4:15am UTC](https://discuss.elastic.co/t/logstash-fails-to-start-with-init-script-rhel-centos/55516/3 "2016-07-15T04:15:12Z")

</div>

The script is gone because in 5.0 the scripts are automatically generated by `pleaserun`, which ships with Logstash.

If you look in the 2.x branch, rather than master, you should find the script there.

---

<div class="post-metadata">

**Author:** ![pysysops](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pysysops/32/8106_2.png) [@pysysops](https://discuss.elastic.co/u/pysysops)\
**Post date:** [July 15, 2016, 9:22am UTC](https://discuss.elastic.co/t/logstash-fails-to-start-with-init-script-rhel-centos/55516/4 "2016-07-15T09:22:34Z")

</div>

Thanks Aaron. I'll take a look at the 2.x branch 😃

---

<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:** [July 6, 2017, 4:47am UTC](https://discuss.elastic.co/t/logstash-fails-to-start-with-init-script-rhel-centos/55516/5 "2017-07-06T04:47:51Z")

</div>


