I started my ELK setup with docker-compose a few days ago. It looked fine as all 3 containers where running without any data. Today i wanted to import some xml files with logstash and xpath, but it already errors when he wants an absolute path. My path "C:/Users/username/Desktop/DockerComposeFile/data/data_1.xml" is absolute indeed (i replaced my username with username ). I first tried with *.xml at the end, and the same error occured. Then i tried this version, but also the same error. I also tried with normal slashes, but didn't work eather. I am working on a Windows machine, just for notice. The full Error is:
Pipeline error {:pipeline_id=>"main", :exception=>#<ArgumentError: File paths must be absolute, relative path specified: C:/Users/username/Desktop/DockerComposeFile/data/data_1.xml>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.2/lib/logstash/inputs/file.rb:283:in `block in register'", "org/jruby/RubyArray.java:1809:in each'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.2/lib/logstash/inputs/file.rb:281:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:228:in `block in register_plugins'", "org/jruby/RubyArray.java:1809:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:227:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:386:in `start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:311:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:185:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:137:in `block in start'"], "pipeline.sources"=>["/usr/share/logstash/pipeline/logstash.conf"], :thread=>"#<Thread:0x55796994@/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:54 run>"}
[2021-01-03T17:02:45,689][ERROR][logstash.javapipeline ][main] Pipeline error {:pipeline_id=>"main", :exception=>#<ArgumentError: File paths must be absolute, relative path specified: C:/Users/username/Desktop/DockerComposeFile/data/data_1.xml>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.2/lib/logstash/inputs/file.rb:283:in `block in register'", "org/jruby/RubyArray.java:1809:in `each'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.2.2/lib/logstash/inputs/file.rb:281:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:228:in `block in register_plugins'", "org/jruby/RubyArray.java:1809:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:227:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:386:in `start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:311:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:185:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:137:in `block in start'"], "pipeline.sources"=>["/usr/share/logstash/pipeline/logstash.conf"], :thread=>"#<Thread:0x172ee530@/usr/share/logstash/logstash-core/lib/logstash/pipelines_registry.rb:140 run>"}
The Error message is pretty much the same, only the last part is a little bit different.
I also tried to use double slashes after C: but it won't worked eather. I also tried sincedb_path => "null" or sincedb_path => "NULL", both doesn't worked.
It appears you are running logstash inside a docker container (I missed that), did you make your windows filesystem available to the docker container?
The docker images are Unix Based, it will work but you will need to mount the files system and then the sincedb_path => "/dev/null" again because it is inside the container. This can be a bit confusing.
Okay i think this may do the trick. but i have not really an idea how i mount the Windows File system to the Linux based. I found a lot that i could change the allowed Files in the settings, but as i am using WSL 2 there is no option for me in the settings. I think about that i have to configure this in the docker-compose.yml under volumes, but not sure about that.
That is my File:
I assume that my volumes are wrong configurated. Inside logstash part but inside Elasticsearch as well. I think that the error doesn't occured cause i wasn't searching anything. but not sure about it.
But thank u for ur help anyways. i think there is more i have to investigate about the docker system :).
Nevermind, i switched - .\logstash:/usr/share/logstash/pipeline/ to C:/Users/username/Desktop/DockerComposeFile/data/, and at least the Error message is not showing anymore, and the container is running. I think there is still a problem because the index isn't showing up in kibana, but i think i can handle that. At least thanks for your help and the tipps. If u see any shit in my configurations feel free to tell me :D. I have a lot to learn
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.