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

Logstash alpha4/alpha5/beta1 - Error while installing any plugin on CentOS #5966

Closed
shoggeh opened this issue Sep 23, 2016 · 9 comments
Closed

Comments

@shoggeh
Copy link

shoggeh commented Sep 23, 2016

This is very similar to #5581, however proposed solution (update certs) doesn't work for CentOS

  • LS Version: alpha4/alpha5/beta1 (last version confirmed working alpha2, no chance to try with alpha3)
  • Operating System: fully updated CentOS 7.
  • Steps to Reproduce: Installation of any local gem will fail with a reference to
# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 

# rpm -qa logstash java-\*
logstash-5.0.0~beta1-1.noarch
java-1.8.0-openjdk-headless-1.8.0.101-3.b13.el7_2.x86_64

# /usr/share/logstash/bin/logstash-plugin install --local --no-verify /home/maciej/logstash-filter-translate-3.0.0.gemInstalling logstash-filter-translate
which: no javac in (/usr/local/sbin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
Error Bundler::InstallError, retrying 1/10
An error occurred while installing logstash-core-event-java (5.0.0.pre.beta1), and Bundler cannot continue.
Make sure that `gem install logstash-core-event-java -v '5.0.0.pre.beta1'` succeeds before bundling.
@shoggeh
Copy link
Author

shoggeh commented Sep 26, 2016

I'd like to stress out that this isn't related to filter translate plugin.

Here an example with an attempt to reinstall filter mutate:

# /usr/share/logstash/bin/logstash-plugin install --local --no-verify /home/maciej/logstash-filter-mutate-3.1.2.gem
Installing logstash-filter-mutate
which: no javac in (/usr/local/sbin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
Error Bundler::InstallError, retrying 1/10
An error occurred while installing logstash-core-event-java (5.0.0.pre.beta1), and Bundler cannot continue.
Make sure that `gem install logstash-core-event-java -v '5.0.0.pre.beta1'` succeeds before bundling.

@shoggeh shoggeh changed the title Logstash alpha4/alpha5/beta1 - Error while installing plugins from local gems on CentOS Logstash alpha4/alpha5/beta1 - Error while installing plugins on CentOS Sep 27, 2016
@shoggeh shoggeh changed the title Logstash alpha4/alpha5/beta1 - Error while installing plugins on CentOS Logstash alpha4/alpha5/beta1 - Error while installing any plugin on CentOS Sep 27, 2016
@shoggeh
Copy link
Author

shoggeh commented Sep 28, 2016

Probably also a cross-dup with #5777

@shoggeh
Copy link
Author

shoggeh commented Sep 28, 2016

Also as flagged in #5777 (comment) despite all the errors plugin is being installed properly and you can call it from the config.

@suyograo
Copy link
Contributor

suyograo commented Oct 3, 2016

@ph can you take a look at this please?

@ph
Copy link
Contributor

ph commented Oct 12, 2016

@suyograo I am looking at it.

@ph
Copy link
Contributor

ph commented Oct 13, 2016

@shoggeh

From what I read in the description, I believe you have an air gap system with no direct access to rubygems. There are some known issues in #5906 that we are working to resolve. Also I see that you are using --local and a plugin with a .gem extension and theses are incompatible, the --local is meant to be used with pack subcommand.

In the meantime, Do you have an http proxy in place? You should be able to setup a HTTP_PROXY variable to make the plugin manager work.

Or for some plugin you can download the gem from rubygems and install it with bin/logstash-plugin install a-plugin.gem be warned that it might not work with all plugins.

@shoggeh
Copy link
Author

shoggeh commented Oct 13, 2016

Yes, I've used any combo of --local and --no-verify switches I could and I truly have internet-isolated environment.

--no-verify seemed to work fine in my case up to alpha2, there is no combo of options that will allow me to install any local gem now.

Or for some plugin you can download the gem from rubygems and install it with bin/logstash-plugin install a-plugin.gem be warned that it might not work with all plugins.

I've tried this on logstash-filter-translate-3.0.0.gem, but the same error as previously.
I'll try my options with proxy.

@shoggeh
Copy link
Author

shoggeh commented Oct 21, 2016

For future use of people looking into this thread: I managed to install local plugins from gem by using http proxy configured in .m2/settings.xml to make a proper connection to ruby gems (as mentioned in other tickets this connections shouldn't be made or required at all and that's gonna be fixed at some point).

I guess in current state of things it's not possible to install local gems without any outside connectivity.

How to configure proxy: #2851 (comment)

@suyograo
Copy link
Contributor

Fixed in 5.2.0

marcinc added a commit to UKHomeOffice/docker-logstash-kubernetes that referenced this issue Jan 26, 2017
The issue with logstash plugin installation appear to be related to maven and jar-dependencies.

This is temporary fix!

There is several related issues on github:
elastic/logstash#5583
mkristian/ruby-maven#8
elastic/logstash#5072
elastic/logstash#5966
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

3 participants