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

HAWK not starting on fresh install of openSUSE LEAP 15.2 #225

Open
matthiashinrichs opened this issue Jan 5, 2021 · 11 comments
Open

HAWK not starting on fresh install of openSUSE LEAP 15.2 #225

matthiashinrichs opened this issue Jan 5, 2021 · 11 comments

Comments

@matthiashinrichs
Copy link

matthiashinrichs commented Jan 5, 2021

Hello

if you install hawk2 on openSUSE LEAP 15.2,
hawk-backend.service will not start because of the following error:
2020-07-06T21:52:07.710011-06:00 nss-leap152 puma.ruby2.5[10033]: [10033] ! Unable to load application: Gem::ConflictError: Unable to activate sass-rails-5.1.0, because railties-5.1.4 conflicts with railties (>= 5.2.0) 2020-07-06T21:52:07.710267-06:00 nss-leap152 puma.ruby2.5[10033]: /usr/lib64/ruby/2.5.0/rubygems/specification.rb:2327:in raise_if_conflicts': Unable to activate sass-rails-5.1.0, because railties-5.1.4 conflicts with railties (>= 5.2.0) (Gem::ConflictError)
`

I found a simple "workaround" to fix this issue by locking the package "ruby2.5-rubygem-railties-5.2" before installing hawk.
Then only "ruby2.5-rubygem-railties-5_1" will be installed and every works fine.

I saw at least the package "ruby2.5-rubygem-sass-rails-5.1" requires "rubygem(ruby:2.5.0:railties) >= 5.2.0" and if you want to try installing it alone after locking "ruby2.5-rubygem-railties-5.2" you get a missing dependency error.
But not when try to install hawk2.

Logs/"zypper in" output:
Nothing locked: no issues for zipper but hawk-backend.service will not start

root:~ # zypper in hawk2
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 90 NEW packages are going to be installed:
  cluster-glue corosync crmsh crmsh-scripts csync2 hawk-apiserver hawk2 libcfg6 libcmap4 libcorosync_common4 libcpg4 libglue2 libpacemaker3 libqb20 libquorum5 librsync2 libsam4 libtotem_pg5 libvotequorum8 mozilla-nss-tools pacemaker
  pacemaker-cli python3-cssselect python3-lxml python3-parallax python3-python-dateutil resource-agents ruby2.5-rubygem-actioncable-5_1 ruby2.5-rubygem-actionmailer-5_1 ruby2.5-rubygem-actionpack-5.2 ruby2.5-rubygem-actionpack-5_1
  ruby2.5-rubygem-actionview-5.2 ruby2.5-rubygem-actionview-5_1 ruby2.5-rubygem-activejob-5_1 ruby2.5-rubygem-activemodel-5_1 ruby2.5-rubygem-activerecord-5_1 ruby2.5-rubygem-activesupport-5.2 ruby2.5-rubygem-activesupport-5_1
  ruby2.5-rubygem-arel ruby2.5-rubygem-axiom-types ruby2.5-rubygem-builder ruby2.5-rubygem-bundler ruby2.5-rubygem-coercible ruby2.5-rubygem-concurrent-ruby ruby2.5-rubygem-crass ruby2.5-rubygem-descendants_tracker
  ruby2.5-rubygem-equalizer ruby2.5-rubygem-erubi ruby2.5-rubygem-ffi ruby2.5-rubygem-gettext ruby2.5-rubygem-gettext_i18n_rails ruby2.5-rubygem-gettext_i18n_rails_js ruby2.5-rubygem-globalid ruby2.5-rubygem-i18n ruby2.5-rubygem-ice_nine
  ruby2.5-rubygem-js-routes ruby2.5-rubygem-kramdown ruby2.5-rubygem-locale ruby2.5-rubygem-loofah ruby2.5-rubygem-mail ruby2.5-rubygem-method_source ruby2.5-rubygem-mini_mime ruby2.5-rubygem-mini_portile2 ruby2.5-rubygem-nio4r
  ruby2.5-rubygem-nokogiri ruby2.5-rubygem-po_to_json ruby2.5-rubygem-puma ruby2.5-rubygem-rack ruby2.5-rubygem-rack-test-0_6 ruby2.5-rubygem-rails-5_1 ruby2.5-rubygem-rails-dom-testing ruby2.5-rubygem-rails-html-sanitizer
  **ruby2.5-rubygem-railties-5.2 ruby2.5-rubygem-railties-5_1** ruby2.5-rubygem-rb-fsevent ruby2.5-rubygem-rb-inotify ruby2.5-rubygem-sass ruby2.5-rubygem-sass-listen **ruby2.5-rubygem-sass-rails-5.1** ruby2.5-rubygem-sprockets
  ruby2.5-rubygem-sprockets-rails ruby2.5-rubygem-text ruby2.5-rubygem-thor ruby2.5-rubygem-thread_safe ruby2.5-rubygem-tilt ruby2.5-rubygem-tzinfo-1.2 ruby2.5-rubygem-virtus ruby2.5-rubygem-websocket-driver-0_6
  ruby2.5-rubygem-websocket-extensions sqlite3

90 new packages to install.
Overall download size: 39.3 MiB. Already cached: 0 B. After the operation, additional 90.4 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): n

Locking "ruby2.5-rubygem-railties-5.2":
ruby2.5-rubygem-sass-rails-5.1 cannot be installed ...

root:~ # zypper al ruby2.5-rubygem-railties-5.2
Specified lock has been successfully added.
root:~ # zypper in ruby2.5-rubygem-sass-rails-5.1
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: ruby2.5-rubygem-sass-rails-5.1-5.1.0-lp152.1.1.x86_64 requires rubygem(ruby:2.5.0:railties) >= 5.2.0, but this requirement cannot be provided
  not installable providers: ruby2.5-rubygem-railties-5.2-5.2.3-lp152.2.3.x86_64[susemanager:opensuse_leap15_2-x86_64]
 Solution 1: remove lock to allow installation of ruby2.5-rubygem-railties-5.2-5.2.3-lp152.2.3.x86_64[susemanager:opensuse_leap15_2-x86_64]
 Solution 2: do not install ruby2.5-rubygem-sass-rails-5.1-5.1.0-lp152.1.1.x86_64
 Solution 3: break ruby2.5-rubygem-sass-rails-5.1-5.1.0-lp152.1.1.x86_64 by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/3/c/d/?] (c):

... but hawk2 can. And is running fine as it should:

root:~ # zypper in hawk2
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 86 NEW packages are going to be installed:
  cluster-glue corosync crmsh crmsh-scripts csync2 hawk-apiserver hawk2 libcfg6 libcmap4 libcorosync_common4 libcpg4 libglue2 libpacemaker3 libqb20 libquorum5 librsync2 libsam4 libtotem_pg5 libvotequorum8 mozilla-nss-tools pacemaker
  pacemaker-cli python3-cssselect python3-lxml python3-parallax python3-python-dateutil resource-agents ruby2.5-rubygem-actioncable-5_1 ruby2.5-rubygem-actionmailer-5_1 ruby2.5-rubygem-actionpack-5_1 ruby2.5-rubygem-actionview-5_1
  ruby2.5-rubygem-activejob-5_1 ruby2.5-rubygem-activemodel-5_1 ruby2.5-rubygem-activerecord-5_1 ruby2.5-rubygem-activesupport-5_1 ruby2.5-rubygem-arel ruby2.5-rubygem-axiom-types ruby2.5-rubygem-builder ruby2.5-rubygem-bundler
  ruby2.5-rubygem-coercible ruby2.5-rubygem-concurrent-ruby ruby2.5-rubygem-crass ruby2.5-rubygem-descendants_tracker ruby2.5-rubygem-equalizer ruby2.5-rubygem-erubi ruby2.5-rubygem-ffi ruby2.5-rubygem-gettext
  ruby2.5-rubygem-gettext_i18n_rails ruby2.5-rubygem-gettext_i18n_rails_js ruby2.5-rubygem-globalid ruby2.5-rubygem-i18n ruby2.5-rubygem-ice_nine ruby2.5-rubygem-js-routes ruby2.5-rubygem-kramdown ruby2.5-rubygem-locale
  ruby2.5-rubygem-loofah ruby2.5-rubygem-mail ruby2.5-rubygem-method_source ruby2.5-rubygem-mini_mime ruby2.5-rubygem-mini_portile2 ruby2.5-rubygem-nio4r ruby2.5-rubygem-nokogiri ruby2.5-rubygem-po_to_json ruby2.5-rubygem-puma
  ruby2.5-rubygem-rack ruby2.5-rubygem-rack-test-0_6 ruby2.5-rubygem-rails-5_1 ruby2.5-rubygem-rails-dom-testing ruby2.5-rubygem-rails-html-sanitizer ruby2.5-rubygem-railties-5_1 ruby2.5-rubygem-rb-fsevent ruby2.5-rubygem-rb-inotify
  ruby2.5-rubygem-sass ruby2.5-rubygem-sass-listen ruby2.5-rubygem-sass-rails ruby2.5-rubygem-sprockets ruby2.5-rubygem-sprockets-rails ruby2.5-rubygem-text ruby2.5-rubygem-thor ruby2.5-rubygem-thread_safe ruby2.5-rubygem-tilt
  ruby2.5-rubygem-tzinfo-1.2 ruby2.5-rubygem-virtus ruby2.5-rubygem-websocket-driver-0_6 ruby2.5-rubygem-websocket-extensions sqlite3

86 new packages to install.
Overall download size: 37.5 MiB. Already cached: 0 B. After the operation, additional 85.7 MiB will be used.
Continue? [y/n/v/...? shows all options] (y):

==============
As I saw that there is already an issue regarding "sass-rails" I thought this might help, sorting these rails dependencies out :)

@stdevel
Copy link

stdevel commented Feb 23, 2021

Thanks for sharing - I'm having the same issue. The workaround is not working for me so I'm stuck with 15.1.

@MalloZup
Copy link
Contributor

MalloZup commented Feb 23, 2021

thx guys for reporting issue. I will try to see if I can manage to solve this packaging issue or dependency. I"m currently working on other things right now but I will add it on a "short-term" stack

@stdevel
Copy link

stdevel commented Feb 23, 2021

Thanks for taking care of it!

Here are some additional openSUSE-specific insights in case you need it: https://bugzilla.opensuse.org/show_bug.cgi?id=1173919

@MalloZup
Copy link
Contributor

@MalloZup
Copy link
Contributor

yes thx @stdevel , I have seen the bug. There is in my understanding something missing between sles and leap pkging since I didn't face the problem on sles codebase. Is something I will look at once time

@stdevel
Copy link

stdevel commented Feb 24, 2021

Hello @MalloZup,
thanks for pointing out - but it seems like also SLE 15.2 is affected. Just spun-up some SLE 15.2 machines and it has exactly the same error:

# rpm -qa|egrep -i "rail|rubygem-sass"
ruby2.5-rubygem-gettext_i18n_rails_js-1.3.0-1.28.x86_64
ruby2.5-rubygem-gettext_i18n_rails-1.8.0-1.28.x86_64
ruby2.5-rubygem-sass-3.5.3-1.19.x86_64
ruby2.5-rubygem-rails-html-sanitizer-1.0.4-2.11.x86_64
ruby2.5-rubygem-rails-dom-testing-2.0.3-1.28.x86_64
ruby2.5-rubygem-railties-5.2-5.2.3-bp152.3.13.x86_64
ruby2.5-rubygem-railties-5_1-5.1.4-3.3.1.x86_64
ruby2.5-rubygem-rails-5_1-5.1.4-1.26.x86_64
ruby2.5-rubygem-sass-listen-4.0.0-1.26.x86_64
ruby2.5-rubygem-sprockets-rails-3.2.1-1.26.x86_64
ruby2.5-rubygem-sass-rails-5.1-5.1.0-bp152.1.9.x86_64

@MalloZup
Copy link
Contributor

@stdevel thx for your time. In case you remark sles is affected, can you please open a bug on bugzilla with the exact way you reproduce it?

I mean with the repositories/subscription etc you have on your system enabled/installed. I think that is relevant here, since one could have more ways to get this pkg.

But I would open a seperate bug on bugzilla of suse for SLEs, so we don't mix the both issue, since they are related but have 2 different root causes.. Yeah releasing distro problems are far to be boring 😁

@matthiashinrichs
Copy link
Author

Hello @MalloZup,

thanks for pointing out - but it seems like also SLE 15.2 is affected. Just spun-up some SLE 15.2 machines and it has exactly the same error:

# rpm -qa|egrep -i "rail|rubygem-sass"

ruby2.5-rubygem-gettext_i18n_rails_js-1.3.0-1.28.x86_64

ruby2.5-rubygem-gettext_i18n_rails-1.8.0-1.28.x86_64

ruby2.5-rubygem-sass-3.5.3-1.19.x86_64

ruby2.5-rubygem-rails-html-sanitizer-1.0.4-2.11.x86_64

ruby2.5-rubygem-rails-dom-testing-2.0.3-1.28.x86_64

ruby2.5-rubygem-railties-5.2-5.2.3-bp152.3.13.x86_64

ruby2.5-rubygem-railties-5_1-5.1.4-3.3.1.x86_64

ruby2.5-rubygem-rails-5_1-5.1.4-1.26.x86_64

ruby2.5-rubygem-sass-listen-4.0.0-1.26.x86_64

ruby2.5-rubygem-sprockets-rails-3.2.1-1.26.x86_64

ruby2.5-rubygem-sass-rails-5.1-5.1.0-bp152.1.9.x86_64

Hello

I see you have both version of ruby2.5-rubygem-railties installed.
Just remove the newer one:
zypper rm ruby2.5-rubygem-railties-5.2-5.2.3-bp152.3.13.x86_64

And after that lock this package:
zypper al ruby2.5-rubygem-railties-5.2-5.2.3-bp152.3.13.x86_64

When you remove the newer version it will also remove dependencies.
On opensuse just reinstall hawk again.
On Sles reinstall sles_ha.

For me it worked on opensuse 15.1 as well as on SLES 15 SP2.

Best regards

@suntorytimed
Copy link

@stdevel on the issue in SLE: does the SLE 15 SP2 system have PackageHub enabled? ruby2.5-rubygem-railties-5.2 is only provided via PackageHub and not in the base SLE distribution. Same applies for 15 SP3.

@stdevel
Copy link

stdevel commented Jul 13, 2021

Thanks for pointing out, @suntorytimed - I just reproduced the issue with the latest available SLE 15 SP2 Vagrantbox (SLES15-SP2-Vagrant.x86_64-15.2-virtualbox-QU3.vagrant.virtualbox.box). Package Hub is not enabled but the service is not starting:

Jul 13 10:25:41 worker01 systemd[1]: Started HA Web Konsole Backend.
Jul 13 10:25:41 worker01 puma.ruby2.5[1581]: [1581] Puma starting in cluster mode...
Jul 13 10:25:41 worker01 puma.ruby2.5[1581]: [1581] * Version 4.3.5 (ruby 2.5.9-p229), codename: Mysterious Traveller
Jul 13 10:25:41 worker01 puma.ruby2.5[1581]: [1581] * Min threads: 0, max threads: 1
Jul 13 10:25:41 worker01 puma.ruby2.5[1581]: [1581] * Environment: production
Jul 13 10:25:41 worker01 puma.ruby2.5[1581]: [1581] * Process workers: 1
Jul 13 10:25:41 worker01 puma.ruby2.5[1581]: [1581] * Preloading application
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]: [1581] ! Unable to load application: Gem::ConflictError: Unable to activate sass-rails-5.1.0, because railties-5.1.4 conflicts with railties (>= 5.2.0)
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]: /usr/lib64/ruby/2.5.0/rubygems/specification.rb:2327:in `raise_if_conflicts': Unable to activate sass-rails-5.1.0, because railties-5.1.4 conflicts with railties (>= >
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1438:in `activate'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_gem.rb:67:in `gem'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/share/hawk/config/boot.rb:35:in `<top (required)>'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/share/hawk/config/application.rb:4:in `<top (required)>'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/share/hawk/config/environment.rb:5:in `require_relative'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/share/hawk/config/environment.rb:5:in `<top (required)>'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from config.ru:4:in `block in <main>'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from config.ru:in `new'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from config.ru:in `<main>'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/puma-4.3.5/lib/puma/configuration.rb:321:in `load_rackup'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/puma-4.3.5/lib/puma/configuration.rb:246:in `app'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/puma-4.3.5/lib/puma/runner.rb:155:in `load_and_bind'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/puma-4.3.5/lib/puma/cluster.rb:413:in `run'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/puma-4.3.5/lib/puma/launcher.rb:172:in `run'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/puma-4.3.5/lib/puma/cli.rb:80:in `run'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/lib64/ruby/gems/2.5.0/gems/puma-4.3.5/bin/puma:10:in `<top (required)>'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/bin/puma.ruby2.5:23:in `load'
Jul 13 10:25:42 worker01 puma.ruby2.5[1581]:         from /usr/bin/puma.ruby2.5:23:in `<main>'
Jul 13 10:25:42 worker01 systemd[1]: hawk-backend.service: Main process exited, code=exited, status=1/FAILURE
Jul 13 10:25:42 worker01 systemd[1]: hawk-backend.service: Unit entered failed state.
Jul 13 10:25:42 worker01 systemd[1]: hawk-backend.service: Failed with result 'exit-code'.

I attached the output of the zypper lr and rpm -qa outputs to this ticket. Hope this helps.

log_worker01_sle15sp2.txt

Edit: I can also share the Vagrantfile and Ansible playbook if required.

@bjin01
Copy link

bjin01 commented Dec 1, 2021

I had same problem. hawk-backend.service fails to start.

Solution:
Deactivate Packagehub repos.
Uninstall the conflict package from packagehub:
rpm -e --nodeps ruby2.5-rubygem-sass-rails-5.1
Install the package from SLES HA:
zypper in -y ruby2.5-rubygem-sass-rails
Restart hawk-backend.service
systemctl restart hawk-backend.service

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

5 participants