Generic "Something is wrong with your configuration"

I would think that if you could detect an issue with plugin configuration, you would be able to supply a useful error message, but alas...Any thoughts?

Elastic 6.2

jdbc plugin conf

input {
jdbc {
id => "new_user"
jdbc_connection_string => "jdbc:postgresql://host.docker.internal:32769/kunveen"
jdbc_user => "user_service"
jdbc_password => "user_service_password"
jdbc_validate_connection => true
jdbc_driver_library => "/usr/share/logstash/lib/postgresql-42.2.2.jar"
jdbc_driver_class => "org.postgresql.Driver"
use_column_value => true
tracking_column => "updated_at"
schedule => "* * * * *"
statement => "SELECT id,email,first_name,last_name,deleted_at FROM users WHERE updated_at > :sql_last_value"
}
}
output {
elasticsearch {
protocol => http
index => "users"
document_type => "user"
document_id => "%{id}"
hosts => ["host.docker.internal:9200"]
}
}

Logstash logs

2018/06/03 22:51:58 Setting 'xpack.monitoring.elasticsearch.url' from environment.
Sending Logstash's logs to /usr/share/logstash/logs which is now configured via log4j2.properties
[2018-06-03T22:52:14,239][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
[2018-06-03T22:52:14,253][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
[2018-06-03T22:52:15,055][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"arcsight", :directory=>"/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/x-pack-6.2.4-java/modules/arcsight/configuration"}
[2018-06-03T22:52:15,209][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.queue", :path=>"/usr/share/logstash/data/queue"}
[2018-06-03T22:52:15,215][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.dead_letter_queue", :path=>"/usr/share/logstash/data/dead_letter_queue"}
[2018-06-03T22:52:15,658][INFO ][logstash.agent ] No persistent UUID file found. Generating new UUID {:uuid=>"e06a8fab-c0bd-48ac-927a-38681e0d6ed1", :path=>"/usr/share/logstash/data/uuid"}
[2018-06-03T22:52:16,415][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.2.4"}
[2018-06-03T22:52:16,880][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-06-03T22:52:18,677][WARN ][logstash.outputs.elasticsearch] You are using a deprecated config setting "document_type" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Document types are being deprecated in Elasticsearch 6.0, and removed entirely in 7.0. You should avoid this feature If you have any questions about this, please visit the #logstash channel on freenode irc. {:name=>"document_type", :plugin=><LogStash::Outputs::ElasticSearch hosts=>[http://host.docker.internal:9200], bulk_path=>"/_xpack/monitoring/_bulk?system_id=logstash&system_api_version=2&interval=1s", manage_template=>false, document_type=>"%{[@metadata][document_type]}", sniffing=>false, user=>"logstash_system", password=>, id=>"57a890619fcf9eaa48343645e54e275791b8a49a0c5c7a3b09c0444efb012629", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_6af54180-105b-4490-a4eb-ea1e42f144ac", enable_metric=>true, charset=>"UTF-8">, workers=>1, template_name=>"logstash", template_overwrite=>false, doc_as_upsert=>false, script_type=>"inline", script_lang=>"painless", script_var_name=>"event", scripted_upsert=>false, retry_initial_interval=>2, retry_max_interval=>64, retry_on_conflict=>1, action=>"index", ssl_certificate_verification=>true, sniffing_delay=>5, timeout=>60, pool_max=>1000, pool_max_per_route=>100, resurrect_delay=>5, validate_after_inactivity=>10000, http_compression=>false>}
[2018-06-03T22:52:18,764][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>".monitoring-logstash", "pipeline.workers"=>1, "pipeline.batch.size"=>2, "pipeline.batch.delay"=>50}
[2018-06-03T22:52:19,260][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://logstash_system:xxxxxx@host.docker.internal:9200/]}}
[2018-06-03T22:52:19,280][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://logstash_system:xxxxxx@host.docker.internal:9200/, :path=>"/"}
[2018-06-03T22:52:19,523][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://logstash_system:xxxxxx@host.docker.internal:9200/"}
[2018-06-03T22:52:19,577][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2018-06-03T22:52:19,581][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the type event field won't be used to determine the document _type {:es_version=>6}
[2018-06-03T22:52:19,602][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://host.docker.internal:9200"]}
[2018-06-03T22:52:19,704][INFO ][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://logstash_system:xxxxxx@host.docker.internal:9200/]}}
[2018-06-03T22:52:19,705][INFO ][logstash.licensechecker.licensereader] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://logstash_system:xxxxxx@host.docker.internal:9200/, :path=>"/"}
[2018-06-03T22:52:19,719][WARN ][logstash.licensechecker.licensereader] Restored connection to ES instance {:url=>"http://logstash_system:xxxxxx@host.docker.internal:9200/"}
[2018-06-03T22:52:19,726][INFO ][logstash.licensechecker.licensereader] ES Output version determined {:es_version=>6}
[2018-06-03T22:52:19,727][WARN ][logstash.licensechecker.licensereader] Detected a 6.x and above cluster: the type event field won't be used to determine the document _type {:es_version=>6}
[2018-06-03T22:52:19,846][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>".monitoring-logstash", :thread=>"#<Thread:0x364a262c run>"}
[2018-06-03T22:52:20,223][ERROR][logstash.outputs.elasticsearch] Unknown setting 'protocol' for elasticsearch
[2018-06-03T22:52:20,244][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Something is wrong with your configuration."...

Well I've narrowed it down to something wrong w/ the output. When I change the output from elasticsearch to stdout json codes, the pipeline builds fine.

Staring me right in the face. I should read logs better!

Unknown setting 'protocol' for elasticsearch

in your logstash config output..

Remove the protocol config. Theres no such protocol config in logstash elasticsearch output. https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html

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