Bobcares

Clear Solaris Service Maintenance Status – Troubleshoot and fix

by | Apr 7, 2021

Don’t know how to clear Solaris Service Maintenance Status? We can help you.

Generally, when the Nagios Core service verifies the configuration files and finds an invalid configuration, the core service will not start.

As part of our Server Management Services, we assist our customers with several Nagios queries.

Today, let us see how to clear the Solaris Maintenance Status on service, specifically the Nagios Core or NRPE service.

 

Service Maintenance Status in Solaris

Though this is normal behavior of Nagios Core, it is not specific to Solaris alone.

However, when the service fails to start several times, Solaris will put the service into a Maintenance State. This prevents the problem from becoming a great issue.

If Nagios Core continues to complain, even after fixing the problem, we must clear the maintenance state on the service before Solaris allows a service to start again.

 

Troubleshoot the error

A common scenario our customers have come across is when they reboot the Solaris server.

Initially, our Support Techs determine why the service did not start.

To see detailed status information, we run:

svcs -xv nagios
Output:
svc:/application/nagios:default (?)
State: maintenance since March 31, 2021 04:57:38 PM EST
Reason: Start method failed repeatedly, last exited with status 8.
See: http://support.oracle.com/msg/SMF-8000-KS
See: /var/svc/log/application-nagios:default.log
Impact: This service is not running.

The output shows that the service is in a maintenance state. However, we don’t have details as to the cause of the issue except that the Start method failed repeatedly.

We saw the mention of a log file /var/svc/log/application-nagios:default.log.

To perform further troubleshooting, we execute:

tail -20 /var/svc/log/application-nagios:default.log
License: GPL

Website: https://www.nagios.org
Reading configuration data…
Read main config file okay…
Error: Invalid max_check_attempts value for host ‘test’
Error: Could not register host (config file ‘/usr/local/nagios/etc/objects/localhost.cfg’, starting on line 33)
Error processing object config files!

***> One or more problems was encountered while processing the config files…

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
‘Whats New’ section to find out what has changed.

[ Mar 31 16:57:38 Method “start” exited with status 8. ]

The object definition in the configuration file is missing required directives is a common Nagios Core problem.

Here, the template was forgotten and hence all the common options were missing.

Before we proceed, we fix the error. Once done, we can run the verify command to check:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Successful verification will end like this:

Total Errors: 0

Things look okay – No serious problems were detected during the pre-flight check

At this point, however, if we try to restart the service, it will not start:

svcadm enable nagios
svcs -xv nagios
svc:/application/nagios:default (?)
State: maintenance since March 31, 2021 04:57:38 PM EST
Reason: Start method failed repeatedly, last exited with status 8.
See: http://support.oracle.com/msg/SMF-8000-KS
See: /var/svc/log/application-nagios:default.log
Impact: This service is not running.

This does not mean there is still a Nagios configuration issue.

If we pay attention to the date and time on the state, we can see it has not changed.

Solaris will refuse to start the service until we clear the maintenance state.

 

Clear Solaris Service Maintenance Status

In order to clear the maintenance state, we execute:

svcadm clear nagios

Then to start Nagios, we run:

svcadm enable nagios

Now we check the state of the service:

svcs -xv nagios

The output resembles something like this:

svc:/application/nagios:default (?)
State: online since March 31, 2021 05:17:21 PM EST
See: /var/svc/log/application-nagios:default.log
Impact: None.

From the output, we can see that the Nagios Core is now running again.

[Need help with the resolution? We are here for you]

 

Conclusion

In short, When the Nagios Core service finds an invalid configuration, the core service will not start. Hence, we Clear Solaris Service Maintenance Status.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF