oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

net-ssh issues after upgrading from Ubuntu 20.04 to 22.04

Open sealie opened this issue 3 years ago • 4 comments

Greetings,

After upgrading from Ubuntu 20.04 to 22.04 and upgrading to the latest oxidized and net-ssh version (to support OpenSSL 3.0), I get the following error:

Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: /usr/lib/ruby/vendor_ruby/rubygems/dependency.rb:313:in to_specs': Could not find 'net-ssh' (~> 5) - did find: [net-ssh-7.0.1] (Gem::MissingSpecVersionError) Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: Checked in 'GEM_PATH=/home/oxidized/.gem/ruby/3.0.0:/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/lib/ruby/gems/3.0.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.0.0:/usr/share/rubygems-integration/3.0.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.0.0' , execute gem envfor more information Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/lib/ruby/vendor_ruby/rubygems/specification.rb:1399:inblock in activate_dependencies’
Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/lib/ruby/vendor_ruby/rubygems/specification.rb:1387:in each' Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/lib/ruby/vendor_ruby/rubygems/specification.rb:1387:in activate_dependencies’
Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/lib/ruby/vendor_ruby/rubygems/specification.rb:1369:in activate' Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/lib/ruby/vendor_ruby/rubygems.rb:286:in block in activate_bin_path’
Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/lib/ruby/vendor_ruby/rubygems.rb:285:in synchronize' Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/lib/ruby/vendor_ruby/rubygems.rb:285:in activate_bin_path’
Aug 24 09:44:37 ubuntu-1804x8664 oxidized[656150]: from /usr/local/bin/oxidized:25:in `’
Aug 24 09:44:37 ubuntu-1804x8664 systemd[1]: oxidized.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 09:44:37 ubuntu-1804x8664 systemd[1]: oxidized.service: Failed with result ‘exit-code’.

(I pulled this error from journalctl -u oxidized --since “today” -f)

gem is showing the current installed versions of oxidized and net-ssh:

oxidized (0.28.0) oxidized-script (0.6.0) oxidized-web (0.13.1) net-ssh (7.0.1)

Running ruby 3.0.0.

All other installed gems are also recently updated.

sealie avatar Aug 29 '22 06:08 sealie

I was able to avoid the error by editing line 32 in /var/lib/gems/3.0.0/specifications/oxidized-0.28.0.gemspec

From:

s.add_runtime_dependency(%q<net-ssh>.freeze, ["~> 5"])

To:

s.add_runtime_dependency(%q<net-ssh>.freeze, ["~> 7"])

My coding knowledge is very limited, so I suppose there should be a prettier fix than this.

sealie avatar Aug 29 '22 07:08 sealie

I had the same problem and the same fix. Do the dependencies for the gem need to be updated.

allenderj avatar Sep 14 '22 18:09 allenderj

I had the same problem and the same fix. Do the dependencies for the gem need to be updated.

I checked the net-ssh git repository and it contained the correct .gempsec version requirement (7.0.0beta1), so I'm not sure wether its not updating correctly via gem update, or if its the gem repo that contains the wrong .gemspec file.

sealie avatar Sep 14 '22 19:09 sealie

Looks like the package in gem repo is old. Apparently they don't build that often. If you compile yourself or use docker its correct.

allenderj avatar Sep 15 '22 14:09 allenderj

I ran into the same issue, I ended up regenerating my ssh keys in the old PEM format as a workaround for the time being. "ssh-keygen -m PEM". It sounds like this is an issue in the net-ssh gem, but I'm a bit out of my wheelhouse there.

crzdmniac avatar Sep 30 '22 13:09 crzdmniac

This was fixed in https://github.com/ytti/oxidized/pull/2570, which is pending a release.

Firefishy avatar Oct 05 '22 14:10 Firefishy