Error Reloading pipelines.yml While Logstash Is Running

  • Version: 6.5.4
  • Operating System: Running with Docker
  • Config File:

pipelines.yml

- pipeline.id: test-app
   path.config: "pipeline/test-app-pipeline.conf"
- pipeline.id: test-app1
   path.config: "pipeline/test-app1-pipeline.conf"
  • Error Message:
    [2019-02-01T03:36:48,658][ERROR][logstash.config.sourceloader] Could not fetch all the sources {:exception=>LogStash::ConfigurationError, :message=>"Failed to read pipelines yaml file. Location: /usr/share/logstash/config/pipelines.yml, Exception: java.lang.RuntimeException: Unhandled IOException: java.io.IOException: unhandled errno: Input/output error", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/config/source/multi_local.rb:80:inread_pipelines_from_yaml'", "/usr/share/logstash/logstash-core/lib/logstash/config/source/multi_local.rb:65:in retrieve_yaml_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/config/source/multi_local.rb:16:inpipeline_configs'", "/usr/share/logstash/logstash-core/lib/logstash/config/source_loader.rb:61:in block in fetch'", "org/jruby/RubyArray.java:2481:incollect'", "/usr/share/logstash/logstash-core/lib/logstash/config/source_loader.rb:60:in fetch'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:150:inconverge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:118:in block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/interval.rb:18:ininterval'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:107:in execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:362:inblock in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in block in initialize'"]}
  • Steps to Reproduce:
    I run Logstash docker image with config.reload.automatic set to true to leverage pipelines.yml file. Everything works fine up to this point. The log files get parsed and indexed to Elasticsearch database, blah blah. While Logstash is still up, I try to remove a pipeline from the pipelines.yml file. Logstash notices the changes but unable to reload. It produces the message above. The same thing happens when I try to add a pipeline to the pipelines.yml file (of course, I have added the pipeline conf file before doing this).

Also note that when I make changes to each individual pipeline's config files (test-app-pipeline.conf & test-app1-pipeline.conf), Logstash notices the changes and automatically reloads, and everything works perfectly fine. Only when I make changes to the pipelines.yml, I got this error.

I currently use docker compose to manage the containers (ES, Logstash, and Kibana). One of my goals is to be able to dynamically add and remove pipelines while the whole stack is running.
Could anyone please give me some insight to this issue? I appreciate a lot.

I have found the solution.

Apparently when I edit pipelines.yml with pycharm, the bind-mounted file is corrupted and unable to read by the container. I realize this when I go into the container and try to cat the file. It gives me Input/Output Error. By following this thread I am now able to get it working.

Thanks

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