I've installed elasticsearch, logstash and metricbeat in my local Windows machine (all 7.7 version). The first thing I did was run .\bin\elasticsearch-certutil cert --pem --pass secret to get ca.crt - instance.crt - instance.key to copy on logstash and metricbeat respectively.
But the problem is that my configuration of logstash pass the test config but fails when I start running it.
[2020-05-26T10:53:42,252][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-05-26T10:53:42,366][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.7.0"}
[2020-05-26T10:53:43,217][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"Use either "cacert" or "truststore" when configuring the CA certificate"}
[2020-05-26T10:53:43,299][ERROR][logstash.monitoring.internalpipelinesource] Failed to fetch X-Pack information from Elasticsearch. This is likely due to failure to reach a live Elasticsearch cluster.
Do you need more details? What is going on with this error?
Logstash do not recognize it, see the error when I test the configuration:
[2020-05-29T20:42:45,610][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-05-29T20:42:46,720][INFO ][org.reflections.Reflections] Reflections took 35 ms to scan 1 urls, producing 21 keys and 41 values
[2020-05-29T20:42:47,012][ERROR][logstash.inputs.beats ] Unknown setting 'cacert' for beats
[2020-05-29T20:42:47,024][FATAL][logstash.runner ] The given configuration is invalid. Reason: Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.
[2020-05-29T20:42:47,028][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
[2020-05-31T10:27:44,227][ERROR][logstash.inputs.beats ] Unknown setting 'cacert' for beats
[2020-05-31T10:27:44,238][FATAL][logstash.runner ] The given configuration is invalid. Reason: Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.
[2020-05-31T10:27:44,242][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
don’t use cacert directives for beats input. it’s used in elasticsearch output section. i misread your configuration, i thought you’re sending output to elasticsearch, but your config is sending to stdout, so remove the cacert from beats input
do you need logstash monitoring? this config is logstash monitoring where monitoring data is sent do elasticsearch.
I did this and get a good response from config.test_and_exit
[2020-06-02T07:58:58,686][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-06-02T07:58:59,744][INFO ][org.reflections.Reflections] Reflections took 46 ms to scan 1 urls, producing 21 keys and 41 values
Configuration OK
[2020-06-02T07:59:01,125][INFO ][logstash.runner ] Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
But when I start logstash I get another error, like this:
[2020-06-02T08:00:35,906][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-06-02T08:00:35,999][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.7.0"}
[2020-06-02T08:00:37,432][INFO ][org.reflections.Reflections] Reflections took 31 ms to scan 1 urls, producing 21 keys and 41 values
[2020-06-02T08:00:38,784][WARN ][org.logstash.instrument.metrics.gauge.LazyDelegatingGauge][main] A gauge metric of an unknown type (org.jruby.RubyArray) has been created for key: cluster_uuids. This may result in invalid serialization. It is recommended to log an issue to the responsible developer/development team.
[2020-06-02T08:00:38,800][INFO ][logstash.javapipeline ][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>1000, "pipeline.sources"=>["C:/..location../filtro0.conf"], :thread=>"#<Thread:0x211d53d run>"}
[2020-06-02T08:00:39,557][ERROR][logstash.javapipeline ][main] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Using `verify_mode` set to PEER or FORCE_PEER, requires the configuration of `certificate_authorities`>, :backtrace=>["C:/..location../vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.9-java/lib/logstash/inputs/beats.rb:143:in `register'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:216:in `block in register_plugins'", "org/jruby/RubyArray.java:1809:in `each'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:215:in `register_plugins'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:327:in `start_inputs'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:287:in `start_workers'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:170:in `run'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:125:in `block in start'"], "pipeline.sources"=>["C:/..location../filtro0.conf"], :thread=>"#<Thread:0x211d53d run>"}
[2020-06-02T08:00:39,589][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[2020-06-02T08:00:39,876][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2020-06-02T08:00:43,157][INFO ][logstash.javapipeline ][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>1000, "pipeline.sources"=>["C:/..location../filtro0.conf"], :thread=>"#<Thread:0x3f3cea69 run>"}
[2020-06-02T08:00:43,328][ERROR][logstash.javapipeline ][main] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Using `verify_mode` set to PEER or FORCE_PEER, requires the configuration of `certificate_authorities`>, :backtrace=>["C:/..location../vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.9-java/lib/logstash/inputs/beats.rb:143:in `register'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:216:in `block in register_plugins'", "org/jruby/RubyArray.java:1809:in `each'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:215:in `register_plugins'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:327:in `start_inputs'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:287:in `start_workers'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:170:in `run'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:125:in `block in start'"], "pipeline.sources"=>["C:/..location../filtro0.conf"], :thread=>"#<Thread:0x3f3cea69 run>"}
[2020-06-02T08:00:43,360][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[2020-06-02T08:00:46,005][INFO ][logstash.javapipeline ][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>1000, "pipeline.sources"=>["C:/..location../filtro0.conf"], :thread=>"#<Thread:0x785d6789 run>"}
[2020-06-02T08:00:46,161][ERROR][logstash.javapipeline ][main] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Using `verify_mode` set to PEER or FORCE_PEER, requires the configuration of `certificate_authorities`>, :backtrace=>["C:/..location../vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.9-java/lib/logstash/inputs/beats.rb:143:in `register'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:216:in `block in register_plugins'", "org/jruby/RubyArray.java:1809:in `each'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:215:in `register_plugins'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:327:in `start_inputs'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:287:in `start_workers'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:170:in `run'", "C:/..location../logstash-core/lib/logstash/java_pipeline.rb:125:in `block in start'"], "pipeline.sources"=>["C:/..location../filtro0.conf"], :thread=>"#<Thread:0x785d6789 run>"}
But I can't still get it running, now I have the error SSLV3_ALERT_BAD_CERTIFICATE, but I think this belong to another post, after I read all the previous about this error.
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.