# Logstash unable to start pipeline:main (jvm.options issue?)

**URL:** <https://discuss.elastic.co/t/logstash-unable-to-start-pipeline-main-jvm-options-issue/153601>\
**Category:** Logstash\
**Created:** [October 23, 2018, 12:58pm UTC](https://discuss.elastic.co/t/logstash-unable-to-start-pipeline-main-jvm-options-issue/153601 "2018-10-23T12:58:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phoenix66](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@phoenix66](https://discuss.elastic.co/u/phoenix66)\
**Post date:** [October 23, 2018, 12:58pm UTC](https://discuss.elastic.co/t/logstash-unable-to-start-pipeline-main-jvm-options-issue/153601/1 "2018-10-23T12:58:33Z")

</div>

Hi all,

First post, so apologies if I miss any etiquette.

I have recently installed Elastic Stack (6.4) and am having problems after configuring for Elastiflow. I get the following error in LS log:

```
[2018-10-23T13:31:13,860][ERROR][logstash.agent] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, input, filter, output at line 6, column 1 (byte 132) after ## JVM configuration\n\n# Xms represents the initial size of total heap space\n# Xmx represents the maximum size of total heap space\n\n", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:49:in `compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2486:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:149:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:22:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:90:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:38:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:309:in `block in converge_state'"]}

```

Error says it's expecting # etc in line 6 of what looks like jvm.options, but all I have done in there is to change heap sizes:

```
## JVM configuration

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

-Xms4g
-Xmx4g

```

I don't think there's anything wrong with pipelines.yml:

```
# This file is where you define your pipelines. You can define multiple.
# For more information on multiple pipelines, see the documentation:
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html

- pipeline.id: main
  path.config: "/etc/logstash/conf.d/*.conf"
- pipeline.id: elastiflow
  path.config: "/etc/logstash/elastiflow/conf.d/*.conf"

```

And logstash.yml is more or less default:

```
# ------------ Pipeline Configuration Settings --------------
#
# Where to fetch the pipeline configuration for the main pipeline
#
path.config: /etc/logstash/
#
# Pipeline configuration string for the main pipeline
#
# config.string:
#
# At startup, test if the configuration is valid and exit (dry run)
#
# config.test_and_exit: false
#
# Periodically check if the configuration has changed and reload the pipeline
# This can also be triggered manually through the SIGHUP signal
#
# config.reload.automatic: false
#
# How often to check if the pipeline configuration has changed (in seconds)
#
# config.reload.interval: 3s
#
# Show fully compiled configuration as debug log message
# NOTE: --log.level must be 'debug'
#
config.debug: false
#
# When enabled, process escaped characters such as \n and \" in strings in the
# pipeline configuration files.
#
# config.support_escapes: false

```

Any ideas? I am running against a brick wall.

Thanks.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 23, 2018, 5:02pm UTC](https://discuss.elastic.co/t/logstash-unable-to-start-pipeline-main-jvm-options-issue/153601/2 "2018-10-23T17:02:11Z")

</div>

The setting

```
path.config: /etc/logstash/

```

makes Logstash read all files in that directory, including jvm.options which isn't a pipeline configuration file.

---

<div class="post-metadata">

**Author:** ![phoenix66](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@phoenix66](https://discuss.elastic.co/u/phoenix66)\
**Post date:** [October 23, 2018, 9:09pm UTC](https://discuss.elastic.co/t/logstash-unable-to-start-pipeline-main-jvm-options-issue/153601/3 "2018-10-23T21:09:43Z")

</div>

Thank you Magnus, I'm embarrassed that that slipped through the net.

---

<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:** [November 20, 2018, 9:09pm UTC](https://discuss.elastic.co/t/logstash-unable-to-start-pipeline-main-jvm-options-issue/153601/4 "2018-11-20T21:09:50Z")

</div>

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