We are trying to use Elastic Search for search capabilities for our site. All data in in MySQL and we need this data copied to elastic search via LogStash.copied here is the conf file and log file . But when I run the logstash command I get a error saying : SSLConnectionSocketFactory not found in packages
We have a hit a roadblock here and need pointers to overcome this error.
Thanks
Suman
config file:
file: simple-out.conf
input {
jdbc {
# MySQL jdbc connection string to our database, mydb
jdbc_connection_string => "jdbc:mysql://myip/mydatabase?useSSL=false"
# The user we wish to execute our statement as
jdbc_user => "my user"
jdbc_password => "my pwd"
# The path to our downloaded jdbc driver
jdbc_driver_library => "C:\JavaDevelopment\TomcatServer\apache-tomcat-8.5.20\lib\mysql-connector-java-5.1.45-bin.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => "com.mysql.jdbc.Driver"
# our query
statement => "SELECT * from testtable"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
}
}
output {
stdout { codec => json_lines }
elasticsearch {
hosts => "http://localhost:9200"
index => "test-migrate"
document_type => "data"
ssl => "false"
}
}
Log file:
[2017-12-20T08:52:50,719][ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<NameError: SSLConnectionSocketFactory not found in packages org.apache.http.client.methods, org.apache.http.client.entity, org.apache.http.client.config, org.apache.http.config, org.apache.http.conn.socket, org.apache.http.impl, org.apache.http.impl.client, org.apache.http.impl.conn, org.apache.http.impl.auth, org.apache.http.entity, org.apache.http.message, org.apache.http.params, org.apache.http.protocol, org.apache.http.auth, java.util.concurrent, org.apache.http.client.protocol, org.apache.http.conn.ssl, java.security.cert, java.security.spec, java.security, org.apache.http.client.utils; last error: cannot load Java class org.apache.http.client.utils.SSLConnectionSocketFactory>, :backtrace=>["uri:classloader:/jruby/java/core_ext/module.rb:45:in const_missing'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.1-java/lib/manticore/client.rb:603:in
ssl_socket_factory_from_options'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.1-java/lib/manticore/client.rb:394:in pool_builder'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.1-java/lib/manticore/client.rb:402:in
pool'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.1-java/lib/manticore/client.rb:208:in initialize'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http_client/manticore_adapter.rb:26:in
initialize'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http_client.rb:273:in build_adapter'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http_client.rb:277:in
build_pool'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http_client.rb:60:in initialize'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:101:in
create_http_client'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:97:in build'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch.rb:230:in
build_client'", "C:/JavaDevelopment/logstash-6.1.0/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:24:in register'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:9:in
register'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/output_delegator.rb:43:in register'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/pipeline.rb:343:in
register_plugin'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/pipeline.rb:354:in block in register_plugins'", "org/jruby/RubyArray.java:1734:in
each'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/pipeline.rb:354:in register_plugins'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/pipeline.rb:743:in
maybe_setup_out_plugins'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/pipeline.rb:364:in start_workers'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/pipeline.rb:288:in
run'", "C:/JavaDevelopment/logstash-6.1.0/logstash-core/lib/logstash/pipeline.rb:248:in `block in start'"], :thread=>"#<Thread:0x1b103fad run>"}
[2017-12-20T08:52:50,777][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: LogStash::PipelineAction::Create/pipeline_id:main, action_result: false", :backtrace=>nil}