# Logstash startup error when GREP\_OPTIONS set?

**URL:** <https://discuss.elastic.co/t/logstash-startup-error-when-grep-options-set/206743>\
**Category:** Logstash\
**Created:** [November 6, 2019, 7:58am UTC](https://discuss.elastic.co/t/logstash-startup-error-when-grep-options-set/206743 "2019-11-06T07:58:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankh](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@ankh](https://discuss.elastic.co/u/ankh)\
**Post date:** [November 6, 2019, 7:58am UTC](https://discuss.elastic.co/t/logstash-startup-error-when-grep-options-set/206743/1 "2019-11-06T07:58:06Z")

</div>

Noticed some strange behaviour today on our Redhat boxes that we run Logstash on.

I was trying to start Logstash jobs that previously ran fine, and got the error:

`Error: Could not find or load main class -Xms5g`

After trial and error, I determined it was because I have set GREP\_OPTIONS in my profile today:

`$ echo $GREP_OPTIONS`  
`--color=always`

Unsetting this environment variable returned Logstash's normal behaviour. Why would Logstash be affected by this environment variable? Is it using grep in some way and is the colour setting interfering with Logstash somehow?

---

<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:** [December 4, 2019, 7:58am UTC](https://discuss.elastic.co/t/logstash-startup-error-when-grep-options-set/206743/2 "2019-12-04T07:58:06Z")

</div>

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