# Logstash with puppet module and OpenJDK gives install error

**URL:** <https://discuss.elastic.co/t/logstash-with-puppet-module-and-openjdk-gives-install-error/216794>\
**Category:** Logstash\
**Created:** [January 28, 2020, 9:30am UTC](https://discuss.elastic.co/t/logstash-with-puppet-module-and-openjdk-gives-install-error/216794 "2020-01-28T09:30:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pw64](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pw64/32/49332_2.png) [@pw64](https://discuss.elastic.co/u/pw64)\
**Post date:** [January 28, 2020, 9:30am UTC](https://discuss.elastic.co/t/logstash-with-puppet-module-and-openjdk-gives-install-error/216794/1 "2020-01-28T09:30:39Z")

</div>

We just switched from Oracle Java to OpenJDK for licensing issues.  
The same Puppet code now results in an installation error:

`Notice: /Stage[main]/Logstash::Service/Exec[logstash-system-install]/returns: Unrecognized VM option 'UseParNewGC' Notice: /Stage[main]/Logstash::Service/Exec[logstash-system-install]/returns: Error: Could not create the Java Virtual Machine. Notice: /Stage[main]/Logstash::Service/Exec[logstash-system-install]/returns: Error: A fatal exception has occurred. Program will exit. Notice: /Stage[main]/Logstash::Service/Exec[logstash-system-install]/returns: Unable to install system startup script for Logstash.`

I know that for Java one should remove the lines with  
`-XX:+UseConcMarkSweepGC -XX:+UseParNewGC `  
but the Puppet-module keeps inserting them... It's default. ☹

Any ideas how to remove these?

---

<div class="post-metadata">

**Author:** ![pw64](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pw64/32/49332_2.png) [@pw64](https://discuss.elastic.co/u/pw64)\
**Post date:** [January 28, 2020, 9:33am UTC](https://discuss.elastic.co/t/logstash-with-puppet-module-and-openjdk-gives-install-error/216794/2 "2020-01-28T09:33:00Z")

</div>

The default is for the /etc/logstash/jvm.options-file  
When I remove the lines from the generated file, logstash will start.

---

<div class="post-metadata">

**Author:** ![pw64](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pw64/32/49332_2.png) [@pw64](https://discuss.elastic.co/u/pw64)\
**Post date:** [January 29, 2020, 9:58am UTC](https://discuss.elastic.co/t/logstash-with-puppet-module-and-openjdk-gives-install-error/216794/3 "2020-01-29T09:58:07Z")

</div>

I switched back for logstash to Oracle JDK where the Puppet:Logstash module works fine.

But I'm anxious to know how to work around this problem where two GC params still pop up in the /etc/logstash/jvm.options-file

---

<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:** [February 26, 2020, 9:58am UTC](https://discuss.elastic.co/t/logstash-with-puppet-module-and-openjdk-gives-install-error/216794/4 "2020-02-26T09:58:09Z")

</div>

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