Nagios Error Message CONFIG ERROR! Restart aborted. Check your Nagios configuration

I got the following error message after I add the client system to the Nagios server.

Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.
Copy the Nagios server configuration file like linux-server.cfg linux-remotemachine.cfg
Here I changed & Edit
server Host name to client Host name
server IP Address to the Client IP Address


#Cp linux-server.cfg linux-remotemachine.cfg
While I restart the nagios service I got the Following error message
#service nagios restart
Error message;
Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.


SOLUTION : How To Solve The problem
Then I run the Following command It will help to find out the error message.
#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
It through the following Error message.
Processing object config file '/usr/local/nagios/etc/objects/client.cfg'...
Warning: Duplicate definition found for hostgroup 'linux-servers' (config file '/usr/local/nagios/etc/objects/client.cfg', starting on line 46)
Error: Could not add object property in file '/usr/local/nagios/etc/objects/client.cfg' on line 47.
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.


As per the error message Line Number 47 I have the error message.
I go to the configuration file
I disable these Line BY through putting # symbol before the line
Just Like I trouble shoot renaming line.
Then I try it the problem has been resolved.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
By using these line you can trouble shoot these nagios problem.
It will clearly mention Line Number about where the error occur.

Related post