Error when I'm launching logstash

I'm trying to launch logstash with my .conf file but it tell me an error that I don't understand :

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
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- to field
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
Thread.exclusive is deprecated, use Thread::Mutex
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/ Using default config which logs errors to the console
[WARN ] 2019-11-05 09:44:43.533 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2019-11-05 09:44:43.568 [LogStash::Runner] runner - Starting Logstash {"logstash.version"=>"7.4.1"}
[ERROR] 2019-11-05 09:44:45.887 [Converge PipelineAction::Create] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, {, } at line 24, column 27 (byte 454) after #Fichier de configuration de Logstash\n#Utilisation du plugin syslog\n\ninput {\n# udp {\n# #Configuration de deux paramètre : chemin et type\n# port => 514\n# type => syslog\n# }\n# tcp {\n# port => 514\n# type => syslog\n# }\n file {\n path=>["/home/logstash/testdata.log"]\n sincedb_path => "/dev/null"\n start_position => "beginning\n }\n}\nfilter {\n#Dans le cas de multiple filtres, ils sont traités par ordre d'apparence\n}\noutput {\n# elasticsearch {hosts=>["", :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/ map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/ initialize'", "org/logstash/execution/ initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:26:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:326:in block in converge_state'"]}
[INFO ] 2019-11-05 09:44:46.465 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}
[INFO ] 2019-11-05 09:44:51.245 [LogStash::Runner] runner - Logstash shut down.

If someone understand



Look at line 24 of your config, my guess would be that there is a { without a friend!

You do not have a closing quote on the value of start_position, so it is consuming everything up to the opening quote of the hosts option on the elasticsearch output, then failing to parse.

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