Closed MLyszyk closed 2 months ago
I also just updated the "/etc/systemd/system/oxidized.service" and "lib/systemd/system/oxidized.service" files and changed the #Environment="OXIDIZED_HOME=/etc/oxidized"
to be Environment="OXIDIZED_HOME=/home/oxidized/.config/oxidized"
, but still won't start.
One more thing, tried doing some ruby stuff and installing oxidized gems and this is where I am left off -->
oxidized@<device>/home/mlyszyk$ rvm list
Command 'rvm' not found, but there are 19 similar ones.
oxidized@<device>:/home/mlyszyk$ exit
exit
mlyszyk@<device>:~$ rvm use ruby-3.2.2
Using /home/mlyszyk/.rvm/gems/ruby-3.2.2
mlyszyk@<device>:~$ sudo su - oxidized
oxidized@<device>:~$ sudo gem install oxidized
ERROR: Error installing oxidized:
The last version of oxidized (>= 0) to support your Ruby & RubyGems was 0.28.0. Try installing it with `gem install oxidized -v 0.28.0`
oxidized requires Ruby version >= 3.0. The current ruby version is 2.7.0.0.
oxidized@<device>:~$ sudo gem install oxidized -v 0.28.0
Successfully installed oxidized-0.28.0
Parsing documentation for oxidized-0.28.0
Done installing documentation for oxidized after 1 seconds
1 gem installed
oxidized@<device>:~$ sudo systemctl daemon-reload
oxidized@<device>:~$ sudo systemctl restart oxidized
oxidized@<device>:~$ sudo systemctl status oxidized
● oxidized.service - Oxidized - Network Device Configuration Backup Tool
Loaded: loaded (/etc/systemd/system/oxidized.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2024-08-02 20:21:56 UTC; 1s ago
Process: 44577 ExecStart=/usr/local/bin/oxidized (code=exited, status=1/FAILURE)
Main PID: 44577 (code=exited, status=1/FAILURE)
oxidized@<device>:~$ sudo journalctl -fu oxidized
-- Logs begin at Fri 2024-05-31 12:50:59 UTC. --
Aug 02 20:21:22 <device>.fakedomain.com systemd[1]: Stopped Oxidized - Network Device Configuration Backup Tool.
Aug 02 20:21:22 <device>.fakedomain.com systemd[1]: Started Oxidized - Network Device Configuration Backup Tool.
Aug 02 20:21:26 <device>.fakedomain.com oxidized[44496]: source returns no usable nodes
Aug 02 20:21:26 <device>.fakedomain.com systemd[1]: oxidized.service: Main process exited, code=exited, status=1/FAILURE
Aug 02 20:21:26 <device>.fakedomain.com systemd[1]: oxidized.service: Failed with result 'exit-code'.
Aug 02 20:21:53 <device>.fakedomain.com systemd[1]: Stopped Oxidized - Network Device Configuration Backup Tool.
Aug 02 20:21:53 <device>.fakedomain.com systemd[1]: Started Oxidized - Network Device Configuration Backup Tool.
Aug 02 20:21:56 <device>.fakedomain.com oxidized[44577]: source returns no usable nodes
Aug 02 20:21:56<device>.fakedomain.com systemd[1]: oxidized.service: Main process exited, code=exited, status=1/FAILURE
Aug 02 20:21:56 <device>.fakedomain.com systemd[1]: oxidized.service: Failed with result 'exit-code'.
It is written in the first lines:
Aug 02 19:06:48 <device>.fakedomain.com systemd[41297]: oxidized.service: Failed to execute command: No such file or directory
Aug 02 19:06:48 <device>.fakedomain.com systemd[41297]: oxidized.service: Failed at step EXEC spawning /home/mlyszyk/.rvm/gems/ruby-3.2.2/bin/oxidized: No such file or directory
You probably updated ruby, and the path ist another.
This is not an oxidized issue, closing.
@ytti Hi everyone, I am having some Oxidized issues if anyone can take a look please -->
In /home/oxidized/.config/oxidized/config -->
But the file is present and configured correctly -->
If I try to run oxidized while I'm on my admin account, I get this -->
However, If I run oxidized while being the oxidized user, I get this -->
Here is the contents of the /usr/local/bin/oxidized file -->
Here is the content of the /lib/systemd/system/oxidized.service file -->
Here is the content of the /etc/systemd/system/oxidized.service file -->
If I do a "gem list | grep oxidized" command, this is what i see -->
If I do a "which ruby" command and a "ruby --version" command from both my admin account and the oxidized account, this is what I see -->
I check the Ruby version and gems -->
I do a "gem env" command from both my admin account and the oxidized account and this is what I see -->
I tried to run the "sudo gem install oxidized" command from the oxidized account, and I got this -->
Gem info and Oxidized Version:
Time and Scenario when issue occurred: I was trying to see if I can adjust how Oxidized formats its emails that get sent out. The only file I modified was "/opt/oxidized/oxidized-report-git-commits". I was trying to do some formatting changes, but I reverted the file back to how it was, primarily this line -->
Now oxidized is being weird and won't start, even though it was working just fine earlier today. I know I added a lot of info bit wanted to add as much as I could to help streamline troubleshooting compared to having people ask for this file and that file and such. If anything else is needed, please let me know! I think I have an idea of what is going on, but want to verify what's happening before I touch anything else since Oxidized seems to be so fragile.