installing logstash plugins on windows 10 - windows-10

Wondering if anyone has had any luck running logstash on Windows 10. I can get the simple stdin input and stdout outputs to work, but I can't install any additional plugins. For example, running .\logstash-plugin.bat install logstash-input-heroku yields this output:
Validating logstash-input-heroku Installing logstash-input-heroku
Error Bundler::InstallError, retrying 1/10 An error occurred while
installing net-ssh (4.0.1), and Bundler cannot continue. Make sure
that gem install net-ssh -v '4.0.1' succeeds before bundling.
WARNING: SSLSocket#session= is not supported Error
Bundler::InstallError, retrying 2/10 An error occurred while
installing net-ssh (4.0.1), and Bundler cannot continue. Make sure
that gem install net-ssh -v '4.0.1' succeeds before bundling.
WARNING: SSLSocket#session= is not supported
(etc.)
I don't see windows 10 in the logstash support matrix so I'm guessing it's not intended to work. Perhaps on the linux subsystem for windows? Has anyone tried that? Doesn't look like java8 runs on it.

Well installation seems to have now succeeded. Thanks #Darth_Vader for the suggestion. Here's the source github issue that I referred to. The issue was resolved after updating the Gemfile (in logstash root folder) and changing the net-ssh and rest-client library versions:
# This is a Logstash generated Gemfile.
# If you modify this file manually all comments and formatting will be lost.
source "https://rubygems.org"
gem "net-ssh", "2.9.0"
gem "rest-client", "1.7.2"
gem "logstash-core", :path => "./logstash-core"
(etc...)

Related

Ubuntu Server - Opam installation issue

I am installing Ubuntu 18.04
I have done this before, and never had this issue, the installation of OPAM has always gone smoothly, except this time.
I run the code to install OPAM.
sudo apt install opam
The installation does not give any errors, everything seems to go normally.
Then I run this.
opam init
and this is my output
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
[WARNING] Recommended dependencies -- most packages rely on these:
- m4
=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
[ERROR] Base package base-threads of compiler system not found! Ignored.
[ERROR] Base package base-bigarray of compiler system not found! Ignored.
[ERROR] Base package base-unix of compiler system not found! Ignored.
[ERROR] Inconsistent set of base compiler packages: {} needed but not included
/ { base-bigarray, base-threads, base-unix } extra
[ERROR] Initialisation failed
OpamGlobals.Exit(66)
Once this errors out, I am stuck and can not go any further.
As I mentioned at the top, I have installed this version of the server many times in the past, and installed OPAM without an issue, until now.
This is through Virtualbox, so I deleted the installment and reinstalled it again, thinking that maybe there was a bad install. But, I get the same error.
I did some researching through Google, and cannot find this exact issue, but found similar ones with this OPAM build issue.
An update. Performing as suggested by AndreasKralj
opam init --comp $1.2.2
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
[WARNING] Recommended dependencies -- most packages rely on these:
- m4
=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
Cannot find /home/darkness/.opam/compilers/.2.2/.2.2/.2.2.comp: .2.2 is not a valid compiler name.
[ERROR] Initialisation failed
OpamGlobals.Exit(1)
Any idea's on this one, will be greatly appreciated.
Wayne
To fix this issue, you'll need to do opam init --comp 1.2.2 to ensure ocaml is installed properly and set as the version you want.

We did not find at least one configured Smart Proxy with the Puppet feature

I have installed puppetmaster, puppet and foreman in Ubuntu 12.04,
puppetmaster and agent is configured to report to foreman and its working fine.
I can see my host in foreman UI...
Up to this everything is fine..............
Now the problem is,
I have installed ntp, nexus and other modules in /etc/puppet/modules directory but none of these modules/classes are showing up in foreman ui ( Classes ) section.
My Configuration
puppet agent 3.0.1
foreman 1.11
puppet master 3.0.1
ruby 1.9.3
In master section of puppet.conf, I have
[production] environment path set to /etc/puppet/modules
Tried restarting puppetmaster and foreman, but not working
Then, I tried this,
admin#host:/usr/share/foreman$ sudo foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
admin#host:/usr/share/foreman$ sudo foreman-rake puppet:import:puppet_classes --trace
** Invoke puppet:import:puppet_classes (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute puppet:import:puppet_classes
I am getting the below error
ERROR: We did not find at least one configured Smart Proxy with the
Puppet feature
Btw, I have the proxy configured and running fine and I have log service running in it. I didn't have SSL enabled, but http port is running and listening...
UPDATE 1:
Now I enabled puppet.yml along with SSL options under /etc/foreman-proxy/settings.d/settings.yml.
I then navigated to proxy section in foreman GUI and found this log
Message
Couldn't enable plugin puppet: Gem loading error: cannot load such file -- augeas
Backtrace
/usr/lib/ruby/vendor_ruby/bundler_ext/output.rb:12:in `strict_err'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:50:in `rescue in block in system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:39:in `block in system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `each'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext.rb:19:in `block in system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `each'
/usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `system_require'
/usr/share/foreman-proxy/lib/bundler_helper.rb:22:in `require_groups'
/usr/share/foreman-proxy/lib/proxy/plugin.rb:151:in `configure_plugin'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:31:in `block in configure_plugins'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:29:in `each'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:29:in `configure_plugins'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:5:in `initialize_plugins'
/usr/share/foreman-proxy/lib/launcher.rb:114:in `configure_plugins'
/usr/share/foreman-proxy/lib/launcher.rb:124:in `launch'
/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'
UPDATE 2:
I tried to install ruby-augeas gem, but got this error,
sudo gem install ruby-augeas
Fetching: ruby-augeas-0.5.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing ruby-augeas:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/1.9.1/gems/ruby-augeas-0.5.0/ext/augeas
/usr/bin/ruby1.9.1 -r ./siteconf20160906-12554-zvrlfk.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.9.1
--with-augeas-config
--without-augeas-config
--with-pkg-config
--without-pkg-config
extconf.rb:27:in `<main>': augeas-devel not installed (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/ruby-augeas-0.5.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ruby-augeas-0.5.0 for inspection.
Well, there's a whole bunch of issues here.
Foreman 1.11 is not the current version, please use Foreman 1.12. It supports the current version of Puppet (4.x) and more modern Ubuntu releases.
Puppet 3.0.x is a really bad release to use, because it has poor support in Foreman and had a number of issues. There's no reason not to be using Puppet 3.8.x or preferably 4.x with Foreman 1.12.
Ubuntu 12.04 is a very old release to be installing new software onto, use 16.04 or 14.04. Foreman 1.11 had deprecated its support for Ubuntu 12.04, so I wouldn't recommend putting a new installation onto it.
If missing the Augeas dependency, install the package, don't try installing gems over the top - you'll probably introduce new issues. apt-get install libruby-augeas1.8
apt-get install libaugeas-ruby1.9.1
This fixed my issue

No package 'mono' found when installing XSP

I am trying to get Mono working on nginx with fastCGI.
I have done a fresh install of CentOS 6, and performed all the updates. I then installed nginx, and opened up the firewalls I needed. I can now see the simple HTML page from nginx without a problem.
I then followed this tutorial for installing Mono via Git :
https://stackoverflow.com/a/13424880/221456
libgdiplus installed fine
mono installed fine
xsp, when I run autogen (with the prefix), gives me this error :
checking for MONO_MODULE... configure: error: Package requirements
(mono >= 2.10.0) were not met:
No package 'mono' found
I did a bit of searching, and the only thing I could find was to run this command :
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Which I have tried, however I still get the exact same error message.
What am I missing?
The problem is with the variable
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
the correct is
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
because you compile with the with the prefix. /usr

watir - installation

I have installed Ruby 2, devkit & Watir. I am getting the following error. Can anyone please help me resolve this issue?
C:\devkit>irb
DL is deprecated, please use Fiddle
irb(main):001:0> require "watir"
=> true
irb(main):002:0> browser = Watir::Browser.new
LoadError: cannot load such file -- watir-classic
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-4.0.2/lib/watir/loader.rb:48:in `load_driver'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-4.0.2/lib/watir/loader.rb:40:in `load_driver_for'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-4.0.2/lib/watir/loader.rb:8:in `new'
from (irb):2
from C:/Ruby200/bin/irb:12:in `<main>'
irb(main):003:0>
I'm not sure what happened then, but in case someone else runs into this problem here is what i did to get it working. Install the watir-classic (as suggested), install ffi, uninstall ffi, install ffi again. For some reason i had 2 variations of ffi (might be due to originally installing Ruby 64 bit?), but I also uninstalled 64 bit Ruby and installed 32 bit to get this all working. – breezy katt Feb 26 at 13:47
I'm assuming you're talking about using Watir on a Windows machine. From my experience installing Ruby in the correct way is the most difficult part.
First of all, install everything as if you're on a 32 bit system. The 64 bit installation often brings unwanted issues.
That said, the ffi gem can also cause issues, so you'll have to uninstall it, and re-install with specific tags:
gem uninstall ffi
gem install ffi --platform ruby
Finally, the error that is showing LoadError: cannot load such file -- watir-classic simply means that what you're doing is trying to make use of a certain gem that is not there. In this case watir-classic, so the following should fix that:
gem install watir-classic
A complete guide on installing Watir on Windows

Cucumber and WebRat in Selenium mode: Can't start mongrel_rails when using gem bundle

I'm using gem bundler (v.0.9.6) and Rails 2.3.5, rubygems 1.3.6 and ruby 1.8.7 (On Snow Leopard). My Gemfile looks like this:
source :rubyforge
source "http://gems.github.com"
gem "rails", "2.3.5"
gem "ruby-debug"
gem "activemerchant", :require => 'active_merchant'
gem "hpricot"
gem "nokogiri"
gem "state_machine"
gem "fastercsv"
gem "yubikey"
gem "httparty"
gem "ruby-openid"
gem "mongrel"
group :development do
gem 'mongrel'
end
#teste
group :test do
gem 'rspec'
gem 'rspec-rails'
gem 'cucumber'
gem 'cucumber-rails'
gem "mechanize"
gem 'notahat-machinist', :require => 'machinist'
gem 'faker'
gem 'webrat'
gem 'selenium-client'
gem 'database_cleaner'
gem 'fakeweb'
gem 'mongrel' #Selenium needs this
end
So far so good. I've been using bundler successfully for a couple of weeks already. However, I started using Cucumber and WebRat in the Selenium mode to test some ajaxy features of the site, and whenever I was running the feature, WebRat was telling me that the Rails server was started, but I always got a XHR_ERROR, where Selenium couldn't find the URL. Well, it happened the server was not being started.
Then, I opened the webrat/lib/webrat/selenium/application_servers/rails.rb file and put a debugger statement in start method. Ran the feature again, when the debugger triggered, I printed the return of the start_command def, which was:
mongrel_rails start -d --chdir='/Users/fullofcaffeine/Projetos/myproject' --port=3001 --environment=test --pid /Users/fullofcaffeine/Projetos/myproject/tmp/pids/mongrel_selenium.pid
I copied and pasted it in the console, removed the -d and & from the end, and here's the output I got:
** Rails loaded.
** Loading any Rails specific GemPlugins
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require': no such file to load -- /Users/fullofcaffeine/.bundle/ruby/1.8/gems/mongrel-1.1.5/lib/mongrel/init.rb (MissingSourceFile)
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:134:in `load'
from /Library/Ruby/Site/1.8/rubygems/source_index.rb:241:in `each'
from /Library/Ruby/Site/1.8/rubygems/source_index.rb:241:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:112:in `load'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:231:in `load_plugins'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:117:in `cloaker_'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
from /usr/bin/mongrel_rails:19:in `load'
from /usr/bin/mongrel_rails:19
Check the path it is trying to load mongrel from: "~/.bundle/...", but mongrel is installed as a system gem. Bundle handles the loading of system gems fine for in other context, but in this particular case, I have no idea why it is failing :(.
I've tried to run "bundle install" again, and it always says:
Installing mongrel (1.1.5) from system
gems
I've tried uninstalling mongrel from the system to try to make bundle to install it on ~/.bundle (as this seems the source of the error, since mongrel is being searched in this path I start mongrel_rails like above), but I just couldn't do it.
gem uninstall mongrel
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d mongrel`
And when I run "gem list | grep mongrel", I get:
mongrel (1.1.5)
Weird.
I just want to be able to run Cucumber and WebRat + Selenium successfully while using gem bundler, but this is driving me nuts.
Could anyone enlighten me ?
Well, I found an workaround, kind of fishy, but works:
cp /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/ mongrel-1.1.5
Now, if you try to:
mongrel_rails start --chdir='/Users/fullofcaffeine/Projetos/myproject' --port=3001 --environment=test --pid /Users/fullofcaffeine/Projetos/myproject/tmp/pids/mongrel_selenium.pid
It will find mongrel and start the server, you can then run the Cucumber feature that uses Selenium and it will work :)
If someone else finds out or knows anything else about this issue, please share, this might end up being a bug somewhere.
I had a similar problem, but it turned out to be mismatching versions of gems between what was in my /Users/{account}/.gems/ and what was installed in either /Library/Ruby/Gems/ (default install) or in /opt/local/lib/ruby/gems/ (the Mac Ports install). As soon as I deleted the /Users/{account}/.gems/ it all worked.
I encountered this same problem, and spent a while trying to debug it. It appears that there's some kind of interaction between Mongrel, GemPlugin and Bundler. Possible solutions include:
Fix GemPlugin to play nicely with Bundler 0.9.
Modify Mongrel to no longer use GemPlugin.
Modify Webrat to support a web server other than Mongrel.
Since both GemPlugin and Mongrel are looking somewhat obsolete and abandoned these days, I decided to add Thin support to Webrat based on this patch.
You can find the new patch on github, or add the following to your Gemfile:
gem 'webrat', :git => 'git://github.com/emk/webrat.git'
...and update your features/support/env.rb file accordingly:
Webrat.configure do |config|
# Add this line.
config.application_framework = :rails_thin
# Your previous configuration here...
end
bundle exec mongrel_rails start ... ?
The point here is to load the rails gems from the bundle as well not from the system gemenv.
We have a similar scenario which was written up here:
How to get mongrel working with bundler?
Try to locate the gems directory which the current gem executable is using and delete any residue from cache or specifications directories, that should work.

Resources