We are using the free test version of nagiosxi. We followed the steps described in the guide Monitoring VMware (https://assets.nagios.com/downloads/nag ... ios-XI.pdf). After successfully executing these steps the nagios.service failed to restart and the website is not reachable anymore.
when we installed the sdk the openssl-devel package was missing, other than the installation was without any issues.
We are using CentOS Stream 9.
× nagios.service - Nagios Core 4.4.10
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Wed 2023-05-31 03:29:29 CDT; 5s ago
Duration: 11ms
Docs: https://www.nagios.org/documentation
Process: 1522883 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 1522884 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 1522890 ExecStopPost=/usr/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Main PID: 1522885 (code=exited, status=1/FAILURE)
CPU: 50ms
May 31 03:29:27 localhost.localdomain nagios[1522885]: wproc: Successfully registered manager as @wproc with query handler
May 31 03:29:27 localhost.localdomain nagios[1522885]: wproc: Registry request: name=Core Worker 1522886;pid=1522886
May 31 03:29:27 localhost.localdomain nagios[1522885]: wproc: Registry request: name=Core Worker 1522888;pid=1522888
May 31 03:29:27 localhost.localdomain nagios[1522885]: wproc: Registry request: name=Core Worker 1522889;pid=1522889
May 31 03:29:27 localhost.localdomain nagios[1522885]: wproc: Registry request: name=Core Worker 1522887;pid=1522887
May 31 03:29:27 localhost.localdomain nagios[1522885]: Error: Could not load module '/usr/local/nagios/bin/ndo.so' -> libmysqlclient.so.21: cannot open shared object file: No such file or directory
May 31 03:29:27 localhost.localdomain nagios[1522885]: Error: Failed to load module '/usr/local/nagios/bin/ndo.so'.
May 31 03:29:27 localhost.localdomain systemd[1]: nagios.service: Main process exited, code=exited, status=1/FAILURE
May 31 03:29:27 localhost.localdomain nagios[1522885]: Error: Module loading failed. Aborting.
May 31 03:29:29 localhost.localdomain systemd[1]: nagios.service: Failed with result 'exit-code'.
nagios.service failed to restart
Re: nagios.service failed to restart
Read the error lines in the posted output and resolve the issues.
You are allowed to copy the messages to the clipboard, then paste them into a search and... search. Then you read... Life is easier than you think
You are allowed to copy the messages to the clipboard, then paste them into a search and... search. Then you read... Life is easier than you think
-
- Posts: 6
- Joined: Wed Jul 05, 2023 2:46 am
Re: nagios.service failed to restart
Check the supplied output for error lines and fix the problems you find x trench run
You may cut and paste the text from the mails into a search engine. Next, you read... Things are simpler than you may imagine.
You may cut and paste the text from the mails into a search engine. Next, you read... Things are simpler than you may imagine.
Re: nagios.service failed to restart
If the libmysqlclient.so.21 file is present but not in a standard library path, you can try updating the library search path for the system to include the directory containing the file.
Change in the /etc/ld.so.conf file and running the ldconfig command to update the library cache.
EX: if the file is located in /path/to/library, add the line /path/to/library to /etc/ld.so.conf, save the file, and run sudo ldconfig.
may be that help you.
Change in the /etc/ld.so.conf file and running the ldconfig command to update the library cache.
EX: if the file is located in /path/to/library, add the line /path/to/library to /etc/ld.so.conf, save the file, and run sudo ldconfig.
may be that help you.
Re: nagios.service failed to restart
If you're encountering an issue where the `nagios.service` fails to restart, here are a few steps you can follow to troubleshoot:
1. **Check the Nagios service status:**
Run the following command to get more details about why the service failed:
```bash
sudo systemctl status nagios.service
```
This will show logs and the current status of the Nagios service, which may provide insights into the cause of the failure.
2. **Check the Nagios logs:**
Nagios logs can be found in `/usr/local/nagios/var/nagios.log` or `/var/log/nagios/nagios.log`, depending on your installation. Look for any errors or warnings.
3. **Verify the configuration:**
A common issue could be a misconfiguration in your Nagios setup. Run the following command to verify the configuration files:
```bash
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
```
Fix any issues that are flagged during the configuration check.
I am also impressed by the source
4. **Check for permission issues:**
Ensure that the Nagios service has the correct file and directory permissions. You can fix common permission issues by running:
```bash
sudo chown -R nagios:nagios /usr/local/nagios/
sudo chown -R nagios:nagios /var/log/nagios/
```
5. **Restart Nagios:**
After addressing any issues, try restarting the service again:
```bash
sudo systemctl restart nagios.service
```
6. **Check system logs:**
If the issue persists, check the system logs for more detailed information using:
```bash
journalctl -xe
```
If these steps don't resolve the issue, share any specific error messages you're seeing for further assistance.
1. **Check the Nagios service status:**
Run the following command to get more details about why the service failed:
```bash
sudo systemctl status nagios.service
```
This will show logs and the current status of the Nagios service, which may provide insights into the cause of the failure.
2. **Check the Nagios logs:**
Nagios logs can be found in `/usr/local/nagios/var/nagios.log` or `/var/log/nagios/nagios.log`, depending on your installation. Look for any errors or warnings.
3. **Verify the configuration:**
A common issue could be a misconfiguration in your Nagios setup. Run the following command to verify the configuration files:
```bash
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
```
Fix any issues that are flagged during the configuration check.
I am also impressed by the source
4. **Check for permission issues:**
Ensure that the Nagios service has the correct file and directory permissions. You can fix common permission issues by running:
```bash
sudo chown -R nagios:nagios /usr/local/nagios/
sudo chown -R nagios:nagios /var/log/nagios/
```
5. **Restart Nagios:**
After addressing any issues, try restarting the service again:
```bash
sudo systemctl restart nagios.service
```
6. **Check system logs:**
If the issue persists, check the system logs for more detailed information using:
```bash
journalctl -xe
```
If these steps don't resolve the issue, share any specific error messages you're seeing for further assistance.