RESOLVED Logstash fails when output set to elasticsearch "SSLConnectionSocketFactory not found in packages"

Someone else is probably going to experience the same problem so thought I'd explain how I solve it : simply unset CLASSPATH. AS I am running from a shell which runs HDFS commands and this already sets up a CLASSPATH. logstash setup must be assuming that the existing CLASSPATH was correct and so doesnt modify it. So it couldnt find some of the http classes.
Consumed a few hours of trial and error but got the answer in the end :slight_smile:

I've been trying out logstash and whilst it works for config where my output is a file or stdout, when I try to enable elasticsearch I get an error when I run like this:

~/logstash-2.2.0> bin/logstash --configtest -f /home/actian/logstash_pipeline.conf
The error reported is:
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

Am running out of ideas and was hoping logstash was self-contained. For reference here is my java -version

~/logstash-2.2.0> java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Any ideas how I can get logstash working with elasticsearch ?

This problem continues....more insight.
With logstash --debug I get the following diagnostics....
Any body get any ideas for a way to debug this ?

config LogStash::Outputs::ElasticSearch/@path = "/" {:level=>:debug, :file=>"logstash/config/mixin.rb", :line=>"122", :method=>"config_init"}
config LogStash::Outputs::ElasticSearch/@ssl = false {:level=>:debug, :file=>"logstash/config/mixin.rb", :line=>"122", :method=>"config_init"}
config LogStash::Outputs::ElasticSearch/@ssl_certificate_verification = true {:level=>:debug, :file=>"logstash/config/mixin.rb", :line=>"122", :method=>"config_init"}
config LogStash::Outputs::ElasticSearch/@sniffing = false {:level=>:debug, :file=>"logstash/config/mixin.rb", :line=>"122", :method=>"config_init"}
config LogStash::Outputs::ElasticSearch/@sniffing_delay = 5 {:level=>:debug, :file=>"logstash/config/mixin.rb", :line=>"122", :method=>"config_init"}
Normalizing http path {:path=>"/", :normalized=>"/", :level=>:debug, :file=>"logstash/outputs/elasticsearch/http_client_builder.rb", :line=>"14", :method=>"build"}
Elasticsearch HTTP client options {:hosts=>["http://gbrdcr00015n02:9200/"], :ssl=>nil, :transport_options=>{:socket_timeout=>0, :request_timeout=>0, :proxy=>nil}, :transport_class=>Elasticsearch::Transport::Transport::HTTP::Manticore, :level=>:debug, :file=>"logstash/outputs/elasticsearch/http_client.rb", :line=>"134", :method=>"build_client"}
The error reported is:
  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
file:/home/user1/logstash-2.2.0/vendor/jruby/lib/jruby.jar!/jruby/java/core_ext/module.rb:45:in `const_missing'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/manticore-0.5.2-java/lib/manticore/client.rb:557:in `ssl_socket_factory_from_options'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/manticore-0.5.2-java/lib/manticore/client.rb:364:in `pool_builder'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/manticore-0.5.2-java/lib/manticore/client.rb:372:in `pool'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/manticore-0.5.2-java/lib/manticore/client.rb:192:in `initialize'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/http/manticore.rb:100:in `__build_connections'
org/jruby/RubyArray.java:2414:in `map'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/http/manticore.rb:90:in `__build_connections'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/transport/base.rb:34:in `initialize'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport/client.rb:115:in `initialize'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/elasticsearch-transport-1.0.15/lib/elasticsearch/transport.rb:26:in `new'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.4.1-java/lib/logstash/outputs/elasticsearch/http_client.rb:136:in `build_client'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.4.1-java/lib/logstash/outputs/elasticsearch/http_client.rb:20:in `initialize'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.4.1-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:40:in `build'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.4.1-java/lib/logstash/outputs/elasticsearch.rb:130:in `build_client'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.4.1-java/lib/logstash/outputs/elasticsearch/common.rb:14:in `register'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.0-java/lib/logstash/output_delegator.rb:29:in `initialize'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.0-java/lib/logstash/pipeline.rb:388:in `plugin'
(eval):86:in `initialize'
org/jruby/RubyKernel.java:1079:in `eval'
/home/user1/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.0-java/lib/logstash/pipeline.rb:57:in `initialize'

Hi Dave,

This issue happens in my win7 laptop. I have unset the classpath there. However, it still not work. Could you please help?

Thanks!
BR//James