Link to home
Start Free TrialLog in
Avatar of gumball60
gumball60Flag for United States of America

asked on

Error: Unexpected EOF in file

I am receiving this error after making changes to this configh file.  How do I correct this?

Error: Unexpected EOF in file '/usr/local/nagios/etc/objects/hosts.cfg' on line 299 - check for a missing closing bracket.
   Error processing object config files!
280 #define host{
    281 #       use             generic-switch
    282 #       host_name       5094_Switch
    283 #       parents         1059_Switch
    284 #       hostgroups      cisco-switches
    285 #       alias           cs0003
    286 #       address         192.x.x.2
    287 #       hostgroups      cisco-switches
    288 #       }
    289
    290 #define host{
    291 #       use             generic-switch
    292 #       host_name       5102_Switch
    293 #       parents         1059_Switch
    294 #       hostgroups      cisco-switches
    295 #       alias           cs0002
    296 #       address         192.x.x.3
    297 #       hostgroups      cisco-switches
    298 #       }
    299
ASKER CERTIFIED SOLUTION
Avatar of Sanga Collins
Sanga Collins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Since all the definitions are commented out - it may be really missing in a line way prior the one you posted or get the error on.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gumball60

ASKER

The error probably was else where in file. I recreated the file and it worked.  Thanks for your help.
I've requested that this question be closed as follows:

Accepted answer: 0 points for gumball60's comment #a39504558

for the following reason:

I created a new file to replace it.
Avatar of Tintin
Tintin

gumball60, you were given answers as to where the problem was and how to fix it, so not sure why you don't want to accept any of the answers as a solution.