# Logstash nssm service error

**URL:** <https://discuss.elastic.co/t/logstash-nssm-service-error/190857>\
**Category:** Logstash\
**Created:** [July 17, 2019, 3:05am UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857 "2019-07-17T03:05:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmovva61](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@bmovva61](https://discuss.elastic.co/u/bmovva61)\
**Post date:** [July 17, 2019, 3:05am UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/1 "2019-07-17T03:05:12Z")

</div>

hi guys need some help new to elk . my logstash works fine when i run in cmd but when i start it from windows service i get errors .

Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2019-07-16T23:02:03,249][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.2.0"}  
[2019-07-16T23:02:03,857][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 17, column 1 (byte 407) after #!/bin/bash\n# Run logstash from source\n#\n# This is most useful when done from a git checkout.\n#\n# Usage:\n# bin/logstash [arguments]\n#\n# See 'bin/logstash --help' for a list of commands.\n#\n# Supported environment variables:\n# LS\_JAVA\_OPTS="xxx" to append extra options to the JVM options provided by logstash\n#\n# Development environment variables:\n# DEBUG=1 to output debugging information\n\n", :backtrace=\>["E:/ELK/logstash/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "E:/ELK/logstash/logstash-core/lib/logstash/compiler.rb:49:in`compile\_graph'", "E:/ELK/logstash/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2577:in`map'", "E:/ELK/logstash/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:in`initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'", "E:/ELK/logstash/logstash-core/lib/logstash/java_pipeline.rb:24:in`initialize'", "E:/ELK/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:36:in `execute'", "E:/ELK/logstash/logstash-core/lib/logstash/agent.rb:325:in`block in converge\_state'"]}  
[2019-07-16T23:02:04,102][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2019-07-16T23:02:09,065][INFO][logstash.runner] Logstash shut down.

my pipeline.yml file

- pipeline.id: pipeline-http  
pipeline.workers: 1  
path.config: "/ELK/logstash/config/logstash\_http\_elasticsearch.conf"
- pipeline.id: pipeline-filebeat  
pipeline.workers: 1  
path.config: "/ELK/logstash/config/logstash\_filebeat\_elasticsearch.conf"

Thankyou

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 17, 2019, 1:58pm UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/2 "2019-07-17T13:58:06Z")

</div>

> [@bmovva61](#):
>
> "Expected one of #, input, filter, output at line 17, column 1 (byte 407) after #!/bin/bash\n# Run logstash

This suggests that you have put the script used to run logstash in path.config and that path.config points to a directory, so it is reading every file in the directory.

Note also that it is pipelines.yml (plural) but logstash will ignore that until you remove the -f from the command line when you start it.

---

<div class="post-metadata">

**Author:** ![bmovva61](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@bmovva61](https://discuss.elastic.co/u/bmovva61)\
**Post date:** [July 17, 2019, 2:47pm UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/3 "2019-07-17T14:47:46Z")

</div>

Thanks Badger but i didnt totally get you . this is my nssm setting .Can you please tell me how can i fix this thing

![nssm](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8fbe8fc325c1e072846c200591795c43914b8b76.png)

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 17, 2019, 2:55pm UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/4 "2019-07-17T14:55:37Z")

</div>

Remove -f and the filename from the Application Arguments

---

<div class="post-metadata">

**Author:** ![bmovva61](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@bmovva61](https://discuss.elastic.co/u/bmovva61)\
**Post date:** [July 17, 2019, 3:13pm UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/5 "2019-07-17T15:13:32Z")

</div>

ok thanks  
Please correct me if i'm wrong .I thought arguments are certain set of commands we want to pass .

So should i just put logstash in the arguments ?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 17, 2019, 3:32pm UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/6 "2019-07-17T15:32:52Z")

</div>

In NSSM, Path is the command that is run. Arguments are passed to the command that is run. You do not want -f and a filename in your arguments.

---

<div class="post-metadata">

**Author:** ![bmovva61](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@bmovva61](https://discuss.elastic.co/u/bmovva61)\
**Post date:** [July 17, 2019, 3:40pm UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/7 "2019-07-17T15:40:21Z")

</div>

oh thanks

---

<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:** [August 14, 2019, 3:48pm UTC](https://discuss.elastic.co/t/logstash-nssm-service-error/190857/8 "2019-08-14T15:48:50Z")

</div>

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