503 error on Logstash plugin install in Docker build


#1

I am trying to get the logstash-output-elasticsearch plugin working with Logstash. I am running into an issue with the install:

Current Dockerfile:

FROM logstash/logstash:5.6.0
ENV HTTPS_PROXY="http://corporate-proxy.com"
ENV ES_JAVA_OPTS="-Xms2g -Xmx2g"
RUN logstash-plugin install logstash-output-elasticsearch
CMD ["-f", "/config-dir/canary.conf"]

Upon running the build:

Step 4 : RUN logstash-plugin install logstash-output-elasticsearch
 ---> Running in 6f3a986adab7
Validating logstash-output-elasticsearch
Net::HTTPFatalError: 503 "Service Unavailable"
                 error! at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:2641
                  value at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:2650
                connect at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:796
               do_start at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:756
                  start at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:751
       setup_connection at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/http_pool.rb:42
       setup_connection at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/https_pool.rb:6
        make_connection at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/http_pool.rb:38
               checkout at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/http_pool.rb:19
         connection_for at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request.rb:85
        perform_request at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request.rb:140
                  fetch at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request.rb:109
                request at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:352
             fetch_http at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:237
             fetch_path at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:273
      cache_update_path at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:308
             load_specs at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/source.rb:189
             tuples_for at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:261
        available_specs at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:226
                   each at org/jruby/RubyArray.java:1613
            each_source at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/source_list.rb:97
        available_specs at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:222
  search_for_dependency at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:102
    spec_for_dependency at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:166
       logstash_plugin? at /usr/share/logstash/lib/pluginmanager/util.rb:28
        validate_plugin at /usr/share/logstash/lib/pluginmanager/install.rb:89
         verify_remote! at /usr/share/logstash/lib/pluginmanager/install.rb:83
                   each at org/jruby/RubyArray.java:1613
         verify_remote! at /usr/share/logstash/lib/pluginmanager/install.rb:81
                execute at /usr/share/logstash/lib/pluginmanager/install.rb:58
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
                execute at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
                 (root) at /usr/share/logstash/lib/pluginmanager/main.rb:48
The command '/bin/sh -c logstash-plugin install logstash-output-elasticsearch' returned a non-zero code: 1

Any ideas would be much appreciated.


#2

After doing way more work than necessary to create my own plugin, I built the plugin locally and tried the same install:

Dockerfile:

FROM logstash/logstash:5.6.0
ENV HTTPS_PROXY="http://corporate-proxy.com"
ENV ES_JAVA_OPTS="-Xms2g -Xmx2g"
RUN logstash-plugin install /vagrant/logstash-output-elasticsearch-8.1.1-java.gem
CMD ["-f", "/config-dir/canary.conf"]
Step 4 : RUN logstash-plugin install /vagrant/logstash-output-elasticsearch-8.1.1-java.gem
 ---> Running in 91b42b7c1c02
Validating /vagrant/logstash-output-elasticsearch-8.1.1-java.gem
Net::HTTPFatalError: 503 "Service Unavailable"
                      error! at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:2641
                       value at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:2650
                     connect at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:796
                    do_start at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:756
                       start at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:751
            setup_connection at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/http_pool.rb:42
            setup_connection at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/https_pool.rb:6
             make_connection at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/http_pool.rb:38
                    checkout at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request/http_pool.rb:19
              connection_for at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request.rb:85
             perform_request at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request.rb:140
                       fetch at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/request.rb:109
                     request at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:352
                  fetch_http at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:237
                  fetch_path at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:273
           cache_update_path at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:308
                  load_specs at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/source.rb:189
                  tuples_for at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:261
             available_specs at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:226
                        each at org/jruby/RubyArray.java:1613
                 each_source at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/source_list.rb:97
             available_specs at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:222
       search_for_dependency at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:102
         spec_for_dependency at /usr/share/logstash/vendor/jruby/lib/ruby/shared/rubygems/spec_fetcher.rb:166
            logstash_plugin? at /usr/share/logstash/lib/pluginmanager/util.rb:28
  extract_local_gems_plugins at /usr/share/logstash/lib/pluginmanager/install.rb:166
                     collect at org/jruby/RubyArray.java:2409
  extract_local_gems_plugins at /usr/share/logstash/lib/pluginmanager/install.rb:162
                     execute at /usr/share/logstash/lib/pluginmanager/install.rb:53
                         run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
                     execute at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11
                         run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
                         run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
                      (root) at /usr/share/logstash/lib/pluginmanager/main.rb:48
The command '/bin/sh -c logstash-plugin install /vagrant/logstash-output-elasticsearch-8.1.1-java.gem' returned a non-zero code: 1

Looks like the same issue....


(system) #3

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