Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./plugin install --local --no-verify still connects to the internet during offline install #4521

Closed
robgil opened this issue Jan 19, 2016 · 10 comments

Comments

@robgil
Copy link

robgil commented Jan 19, 2016

logstash 2.1.1-1
centos 6

I created a pack on another host that had the plugins installed via the typical ./plugin install method to the internet. On the second host, I did a ./plugin unpack .tar.gz

bin # ./plugin install --local --no-verify logstash-output-s3
Installing logstash-output-s3
Error Bundler::HTTPError, retrying 1/10
Could not fetch specs from https://rubygems.org/
Error Bundler::HTTPError, retrying 2/10
Could not fetch specs from https://rubygems.org/
Error Bundler::HTTPError, retrying 3/10
Could not fetch specs from https://rubygems.org/
........

Plugin does install, but the retries and final error will cause issues when packaging.

bin # ./plugin list|grep logstash-output-s3
logstash-output-s3
@purbon
Copy link
Contributor

purbon commented Jan 20, 2016

Thanks a lot for your report, I tried to reproduce your error, would be nice to get more details as I was not able to:

skywalker% ./bin/plugin install --local --no-verify logstash-output-s3
Installing logstash-output-s3
Plugin not found, aborting
ERROR: Installation Aborted, message: Could not find gem 'logstash-output-s3 (>= 0) java' in any of the gem sources listed in your Gemfile or installed on this machine.

from a machine without internet, could you please share a bit more about your system? java version? package used?

@purbon
Copy link
Contributor

purbon commented Jan 21, 2016

related bug reported as comment at #4189 (comment)

@robgil
Copy link
Author

robgil commented Jan 25, 2016

Thanks @purbon.

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Try again with the full path to the gem file.

Ex.

/opt/logstash/bin/plugin install --local --no-verify /<my plugin path>/plugins/logstash-output-s3-2.0.4.gem

@purbon
Copy link
Contributor

purbon commented Jan 25, 2016

@robgil using the full path will make the system think you have the gem build and try to install it from this file. Off line installation does not fetch gems directly like this, the behaviour is intended to work as like

skywalker% ./bin/plugin install --local logstash-output-s3

@michalterbert
Copy link

I have the same issue:
/opt/logstash/bin/plugin install --local logstash-output-webhdfs-2.0.2.gem Validating logstash-output-webhdfs-2.0.2.gem Unable to download data from https://rubygems.org/ - SocketError: initialize: name or service not known (https://rubygems.org/latest_specs.4.8.gz) ERROR: Installation aborted, verification failed for logstash-output-webhdfs-2.0.2.gem
Test with --no-verify:
/opt/logstash/bin/plugin install --local --no-verify /opt/logstash/vendor/cache/logstash-output-webhdfs-2.0.2.gem Installing logstash-output-webhdfs Error Bundler::HTTPError, retrying 1/10 Could not fetch specs from https://rubygems.org/

Logstash version:
logstash 2.2.0

@robgil
Copy link
Author

robgil commented Feb 12, 2016

@purbon So if I do --local, how do I specify the gem location if I refer to it with "logstash-output-s3"?

@padusumilli
Copy link

Have the same problem here when trying to install offline

[root@ts logstash]# ./bin/plugin unpack /data/logstash/logstash-plugins.tar.gz
Unpacking /data/logstash/logstash-plugins.tar.gz
Unpacked at /opt/logstash/vendor/cache
The unpacked plugins can now be installed in local-only mode using bin/plugin install --local [plugin name]

and then

[root@ts logstash]# ./bin/plugin install --local logstash-input-courier
Installing logstash-input-courier
Error Bundler::HTTPError, retrying 1/10
Could not fetch specs from https://rubygems.org/

Any workarounds or ETA?

@foragerr
Copy link

foragerr commented May 23, 2016

Same issue.

Java version: java version "1.8.0_40"
logstash version: 2.3.1
Windows server 2008 R2

.\logstash-plugin.bat install --local logstash-filter-elapsed
io/console not supported; tty will not be manipulated
Installing logstash-filter-elapsed
Error Bundler::HTTPError, retrying 1/10
Could not fetch specs from https://rubygems.org/
Error Bundler::HTTPError, retrying 2/10
Could not fetch specs from https://rubygems.org/    

@gpaggi
Copy link

gpaggi commented Sep 7, 2016

Same issue with 2.4.0

root@vagrant-ubuntu-trusty-64:/# dpkg-query --showformat='${Version}\n' --show logstash
1:2.4.0-1
root@vagrant-ubuntu-trusty-64:/# java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
root@vagrant-ubuntu-trusty-64:/#
root@logstash001:/opt/logstash/plugins# date ; DEBUG=1 /opt/logstash/bin/logstash-plugin install --local --version 5.1.0 logstash-output-elasticsearch
Wed Sep 7 08:12:27 CEST 2016
DEBUG: exec /opt/logstash/vendor/jruby/bin/jruby --1.9 -J-XX:+UseParNewGC -J-XX:+UseConcMarkSweepGC -J-Djava.awt.headless=true -J-XX:CMSInitiatingOccupancyFraction=75 -J-XX:+UseCMSInitiatingOccupancyOnly -J-XX:+HeapDumpOnOutOfMemoryError -J-Xmx1g -J-XX:HeapDumpPath=/opt/logstash/heapdump.hprof /opt/logstash/lib/pluginmanager/main.rb install --local --version 5.1.0 logstash-output-elasticsearch
Installing logstash-output-elasticsearch
[...]
Installing logstash-output-elasticsearch 5.1.0 (was 2.7.1)
0: logstash-output-elasticsearch (5.1.0) from /opt/logstash/vendor/bundle/jruby/1.9/specifications/logstash-output-elasticsearch-5.1.0-java.gemspec
[...]
HTTP GET https://bundler.rubygems.org/api/v1/dependencies
Net::HTTP::Persistent::Error: connection refused: bundler.rubygems.org:443
/opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/net/http/persistent.rb:641:in connection_for'
/opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/net/http/persistent.rb:994:inrequest'
/opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/fetcher.rb:302:in request'
/opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/fetcher.rb:272:infetch'
/opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/fetcher.rb:244:in use_api'
[...]
/opt/logstash/lib/pluginmanager/main.rb:43:in(root)'
Fetching source index from https://rubygems.org/
Gem::RemoteFetcher::FetchError: Errno::ECONNREFUSED: Connection refused - Connection refused (https://rubygems.org/specs.4.8.gz)
/opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:292:in fetch_path'
/opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/rubygems_integration.rb:516:infetch_specs'
/opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/rubygems_integration.rb:530:in fetch_all_remote_specs'
/opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/source_list.rb:90:ineach'
org/jruby/RubyArray.java:1613:in each'
[...] 
Retrying source fetch due to error (2/3): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Gem::RemoteFetcher::FetchError: Errno::ECONNREFUSED: Connection refused - Connection refused (https://rubygems.org/specs.4.8.gz)
/opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:292:infetch_path'
[...]
Retrying source fetch due to error (2/3): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Gem::RemoteFetcher::FetchError: Errno::ECONNREFUSED: Connection refused - Connection refused (https://rubygems.org/specs.4.8.gz)
/opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/remote_fetcher.rb:292:in fetch_path'
[...]
/opt/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'
/opt/logstash/lib/pluginmanager/main.rb:43:in `(root)'
Bundler::HTTPError: Could not fetch specs from https://rubygems.org/
fetch_all_remote_specs at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/fetcher.rb:365

@ph
Copy link
Contributor

ph commented Jan 3, 2017

The pack/unpack command are now deprecated and will be replaced with prepare-offline-pack from #6404 which will be available in logstash 5.2.

@ph ph closed this as completed Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants