# Logstash Configuration Error in K8

**URL:** https://discuss.elastic.co/t/logstash-configuration-error-in-k8/243422
**Category:** Logstash
**Tags:** docker
**Created:** [August 1, 2020, 12:29pm UTC](https://discuss.elastic.co/t/logstash-configuration-error-in-k8/243422 "2020-08-01T12:29:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tamilarasanbravo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamilarasanbravo/32/62962_2.png) [@tamilarasanbravo](https://discuss.elastic.co/u/tamilarasanbravo)
#### Post date: [August 1, 2020, 12:29pm UTC](https://discuss.elastic.co/t/logstash-configuration-error-in-k8/243422/1 "2020-08-01T12:29:35Z")

</div>

Hi Team,

Created a Pod for logstash and I am trying to solve the below error. Requesting your help for the same.

```auto
[ERROR] 2020-07-31 04:48:57.595 [Converge PipelineAction::Create<main>] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [\\t\\r\\n], \"#\", \"input\", \"filter\", \"output\" at line 1, column 1 (byte 1)", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:58:in `compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:66:in `compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:28:in `block in compile_sources'", "org/jruby/RubyArray.java:2577:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:27:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:181:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:67:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:43:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:52:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:342:in `block in converge_state'"]}
[INFO] 2020-07-31 04:48:57.683 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}
[INFO] 2020-07-31 04:49:02.704 [LogStash::Runner] runner - Logstash shut down.

```

Contents of the pipeline folder

```auto
bash-4.2$ ls -al /usr/share/logstash/pipeline
total 12
drwxrwxrwx 3 root root 4096 Jul 31 05:08 .
drwxrwsr-x 1 logstash root 4096 Jun 14 21:40 ..
drwxr-xr-x 2 root root 4096 Jul 31 05:08 ..2020_07_31_05_08_32.041534970
lrwxrwxrwx 1 root root 31 Jul 31 05:08 ..data -> ..2020_07_31_05_08_32.041534970
lrwxrwxrwx 1 root root 29 Jul 31 05:08 http-input-plugin.conf -> ..data/http-input-plugin.conf
lrwxrwxrwx 1 root root 20 Jul 31 05:08 removeKeys.rb -> ..data/removeKeys.rb
bash-4.2$ ls -al

```

logstash is configured with http plugin.

---

<div class="post-metadata">

### Author: ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)
#### Post date: [August 1, 2020, 12:39pm UTC](https://discuss.elastic.co/t/logstash-configuration-error-in-k8/243422/2 "2020-08-01T12:39:06Z")

</div>

It claims that there is a syntax error in your configuration. If you are sure that there is none, check this list of potential causes:

> <https://stackoverflow.com/questions/54327808/logstash-exception-expected-one-of-input-filter-output-at-line-1-column-1/54366158#54366158>

---

<div class="post-metadata">

### Author: ![tamilarasanbravo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamilarasanbravo/32/62962_2.png) [@tamilarasanbravo](https://discuss.elastic.co/u/tamilarasanbravo)
#### Post date: [August 3, 2020, 3:44pm UTC](https://discuss.elastic.co/t/logstash-configuration-error-in-k8/243422/3 "2020-08-03T15:44:10Z")

</div>

I have resolved that error and the logstash pod, fails to run because of GemSpecError. Hoping for some more guidance.

```auto
root@master-node:~# kubectl logs logstash-deployment-5fb6d78576-j6lnw
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/logstash/logstash-core/lib/jars/jruby-complete-9.2.11.1.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
/usr/share/logstash/logstash-core-plugin-api/lib/logstash-core-plugin-api/version.rb:22: warning: The Psych YAML extension failed to load.
Check your env for conflicting versions of SnakeYAML
See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment
[ERROR] 2020-08-03 15:40:44.363 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (GemspecError)
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.

 # from /usr/share/logstash/logstash-core-plugin-api/logstash-core-plugin-api.gemspec:23
 # -------------------------------------------
 #
 > require "logstash-core-plugin-api/version"
 #
 # -------------------------------------------

```

---

<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 31, 2020, 3:44pm UTC](https://discuss.elastic.co/t/logstash-configuration-error-in-k8/243422/4 "2020-08-31T15:44:11Z")

</div>

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