theangryangel / logstash-output-jdbc

JDBC output for Logstash
MIT License
256 stars 101 forks source link

Manual Installation #120

Closed cawoodm closed 6 years ago

cawoodm commented 6 years ago

Installation fails (Windows Sever 2012) with

$ logstash-plugin install logstash-output-jdbc Validating logstash-output-jdbc Unable to download data from https://rubygems.org - Errno::ECONNREFUSED: Connection refused - Failed to open TCP connection to api.rubygems.org:443 (Connection refused - connect(2) for "api.rubygems.org" port 443) (https://api.rubygems.org/latest_specs.4.8.gz) ERROR: Installation aborted, verification failed for logstash-output-jdbc

I suspect proxy issues so...

1) Can you provide a way to manually download and install 2) How does the installer deal with proxies?

theangryangel commented 6 years ago

This really isn't an issue with the plugin itself, so I'm only able to give you really basic information here. The command logstash-plugin is provided by logstash. Have you looked at the documentation at https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html which has several lines on HTTP proxies?

If you absolutely need to download it manually I believe the following still works;

  1. Visit https://rubygems.org/gems/logstash-output-jdbc/versions [1] and click on the version you want. If you've got a recent copy of Logstash you want the newest.
  2. Click the Download button on the right and save the gem file somewhere.
  3. Run logstash-plugin install path/to/gem/file.gem which should install it for you

[1] Do not just click the download on https://rubygems.org/gems/logstash-output-jdbc, because it will give you a much older version that isn't supported. This is partially due to a naming convention that rubygems uses.

cawoodm commented 6 years ago

Yeah sorry, found those links later. I'll add for other's reference this one: https://www.elastic.co/guide/en/logstash/current/offline-plugins.html

One way is to install the plugin online (on a machine with no proxy woes) and then export it with: logstash/bin/logstash-plugin prepare-offline-pack --output logstash-output-jdbc.zip logstash-output-jdbc

This can then be installed with: bin/logstash-plugin install file:///c:/path/to/logstash-output-jdbc.zip

It really isn't helpful that a search of "logstash-output-jdbc" on rubygems.org gives an old version which won't work with the latest Logstash. Boooo!

theangryangel commented 6 years ago

It really isn't helpful that a search of "logstash-output-jdbc" on rubygems.org gives an old version which won't work with the latest Logstash. Boooo!

Part of the reason for this is because newer versions have been tagged for the java platform only. Older versions weren't and caused other problems in the past. Unfortunately rubygems.org doesnt seem to care that they're newer. I believe I'd need to yank the older versions to get it to update the "index page" on rubygems.org properly. Sadly there are still a trickle of downloads for those versions, and I'd prefer not to break things for those users who. Since this only affects people having to download manually, which I've had literally 2 or 3 people reach out for help, I've chosen to keep them for now.

I'm sorry I can't please everyone :(