Oxidized fails as service, runs fine otherwise

Hi all, using the latest librenms OVA, Ive got a relatively new Oxidized install being fed from librenms. when running “oxidized” from the command line, it backs up the devices just fine. When trying to run as a service, it fails. here’s the status output:

librenmseubuntu: —$ sudo systemctl start oxidized
librenmseubuntu: —$ sudo systemctl status oxidized
* oxidized. service — Oxidized — Network Device Configuration Backup Tool
Loaded: loaded (/etc/systemd/system/oxidized. service; enabled; vendor preset: enabled)
Active: failed (Result: exit—code) since Fri 2023—06—30 09:41:16 EDT; 36s ago
Process: 87916 ExecStart=/usr/10ca1/bin/oxidized (code—exited, status—I/ FAILURE)
Main PID: 87916 (code=exited, status=1/FAILURE)
CPU: 213ms

Jun 30 09:41:15 ubuntu.localdomain systemd[1]: Started Oxidized - Network Device Configuration Backup Tool
Jun 30 09:41:16 ubuntu.localdomain oxidized [87916]: I, [2023-06-30T0941:16.113828 #87916] INFO -- : Oxidized starting, running as pid 87916
Jun 30 09:41:16 ubuntu.localdomain oxidized [87916]: I, [2023-06-30T0941:16.115041 #87916] INFO -- : lib/oxidized/nodes.rb: Loading nodes
Jun 30 09:41:16 ubuntu.localdomain oxidized [87916]: F, [2023-06-30T0941:16.115118 #87916] FATAL -- : Oxidized crashed, crashfile written in /home/oxidized/.config/oxidized/crash
Jun 30 09:41:16 ubuntu.localdomain oxidized [87916]: No such file or directory @ rb_sysopen — / home/oxidized/.config/oxidized/router.db
Jun 30 09:41:16 ubuntu.localdomain systemd[1]:oxidized.service: Main process exited, code=exited, status=1/FAILURE
Jun 30 09:41:16 ubuntu.localdomain systemd[1]:oxidized.service: Failed with result exit—code'.

and the crash file is below. timestamp is different but the messages are all the same:

--------------------------------------------------
2023-06-30 14:38:37 UTC
No such file or directory @ rb_sysopen — /home/oxidized/.config/oxidized/router.db [Errno:: ENOENT]
--------------------------------------------------
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/source/csv.rb:57:in 'initialize'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/source/csv.rb:57:in 'open'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/source/csv.rb:57:in 'open_file'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/source/csv.rb:57:in 'load'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/nodes.rb:16:in 'block in load'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/nodes.rb:133:in 'synchronize'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/nodes.rb:133:in 'with_lock'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/nodes.rb:11:in 'load'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/nodes.rb:128:in 'initialize'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/core.rb:14:in 'new'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/core.rb:14:in 'initialize'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in 'new'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in 'new'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/cli.rb:13:in 'run'
/var/1ib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized:8:in ',top (required).'
/usr/local/bin/oxidized:25:in 'load'
/usr/local/bin/oxidized:25:in 'main'
--------------------------------------------------

No updates have been done after spinning up the ova other than updating the psych module/gem. System is airgapped so any updates will require a bit of work.

Is the “/var/1ib/” path correct, or should it be “/var/lib/” maybe?

I just checked and its /var/lib. Those are just errors from the windows OCR capture i didnt even notice to clean up. Getting any logs are a pain because of the air gap.

That’s the reason for the failure, /home/oxidized/.config/oxidized/router.db doesn’t exist. If it works from the cli then you are most likely not starting it as the same user as systemctl is and possibly now have to oxidized config files. Make sure you are editing the correct one, check the oxidized docs GitHub - ytti/oxidized: Oxidized is a network device configuration backup tool. It's a RANCID replacement!

Aha! That was the ticket. i copied my config file to the oxidized users home directory and it started without issue! Man thats not super clear in the config at all. Now i gotta figure out why my groups dont come over and ill have a fully functioning install/

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.