oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

After install Oxidized service can't start

Open wieczorr opened this issue 8 years ago • 4 comments

Hello

I installed latest oxidized version on Centos 7, according to the instruction. I had to install ruby 2.3.7 using RVM (minimum version 2.3 required during installation). After installation, the manually running oxidized process works. But oxidized.service does not start. Please help. Below the necessary information.

oxidized: /usr/local/rvm/gems/ruby-2.3.7/bin/oxidized > only in this location

oxidized.service [Unit] Description=Oxidized - Network Device Configuration Backup Tool After=network-online.target multi-user.target Wants=network-online.target

[Service] ExecStart=/usr/local/rvm/gems/ruby-2.3.7/bin/oxidized User=root KillSignal=SIGKILL

[Install] WantedBy=multi-user.target

Error:

root@localhost system]# sudo systemctl status oxidized oxidized.service - Oxidized - Network Device Configuration Backup Tool Loaded: loaded (/etc/systemd/system/oxidized.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2018-10-19 10:00:25 CEST; 4s ago Process: 1614 ExecStart=/usr/local/rvm/gems/ruby-2.3.7/bin/oxidized (code=exited, status=1/FAILURE) Main PID: 1614 (code=exited, status=1/FAILURE)

Oct 19 10:00:24 localhost.localdomain systemd[1]: Starting Oxidized - Network Device Configuration Backup Tool... Oct 19 10:00:25 localhost.localdomain oxidized[1614]: /usr/share/rubygems/rubygems/dependency.rb:296:in to_specs': Could not find 'oxidized' (>= 0.a) among 6 total gem(s) (Gem::LoadError) Oct 19 10:00:25 localhost.localdomain oxidized[1614]: from /usr/share/rubygems/rubygems/dependency.rb:307:in to_spec' Oct 19 10:00:25 localhost.localdomain oxidized[1614]: from /usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:47:in gem' Oct 19 10:00:25 localhost.localdomain oxidized[1614]: from /usr/local/rvm/gems/ruby-2.3.7/bin/oxidized:25:in

' Oct 19 10:00:25 localhost.localdomain oxidized[1614]: from /usr/local/bin/ruby_executable_hooks:24:in eval' Oct 19 10:00:25 localhost.localdomain oxidized[1614]: from /usr/local/bin/ruby_executable_hooks:24:in
' Oct 19 10:00:25 localhost.localdomain systemd[1]: oxidized.service: main process exited, code=exited, status=1/FAILURE Oct 19 10:00:25 localhost.localdomain systemd[1]: Unit oxidized.service entered failed state. Oct 19 10:00:25 localhost.localdomain systemd[1]: oxidized.service failed.

`

wieczorr avatar Oct 19 '18 08:10 wieczorr

Not sure how you installed oxidized. Im also running CentOS Linux release 7.5.1804 (Core)

but my service is like here: https://github.com/ytti/oxidized/blob/master/extra/oxidized.service

Did you follow these instructions? https://github.com/ytti/oxidized#centos-oracle-linux-red-hat-linux

ruby --version
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

davama avatar Oct 19 '18 14:10 davama

I have the same issue, the latest version of oxidized does not work out of the box with CentOS due to prerequisite of some gems requiring higher version of ruby than the version installed by yum. This requires ruby installation via rvm and thus why the OP and myself are running oxidized from rvm directory.

StiM-git avatar Oct 22 '18 14:10 StiM-git

Nevermind I managed to fix my install. Effectively you need to point it to the rvm wrapper of oxidized. To do this open up your etc/systemd/system/oxidized.service and change to the following:

execstart=/usr/local/rvm/gems/ruby-2.3.7/wrappers/oxidized

StiM-git avatar Oct 22 '18 14:10 StiM-git

Thanks for the help. I Installed ruby using Rbenv method and now process works. I used instruction from this link https://linuxize.com/post/how-to-install-ruby-on-centos-7/

wieczorr avatar Oct 24 '18 21:10 wieczorr