LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2018, 06:32 PM   #1
novice411
LQ Newbie
 
Registered: Jun 2018
Posts: 2

Rep: Reputation: Disabled
Correcting DHCP file errors


I'm editing my first dhcp file and I googled the world to figure out how to view the errors <journalctl -xe> and received errors called out like the following:

/etc/dhcp/dhcpd.conf line 991: expecting left brace.
host B19-07-Alpha WB-6

I can find this host name in the file, but can't determine where the brace should exist, here is the host details in the file:

}
host B19-07-Alpha WB-6 {
hardware ethernet 00:23:8A:F8:61:00;
fixed-address 10.33.20.130;
# option host-name "D07-31-Alpha";
}

This type of "bracing" error is shown several times, need help figuring out what needs to be corrected, please.
 
Old 06-17-2018, 07:14 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
For every right brace, you need to have a matching left brace.

I know this is just a clip of the file, but it shows to right braces, and only one left brace. I'm assuming that the first right brace does have a matching term above that you just haven't shown. Meanwhile, whatever is parsing this file, does feel that there is an error.

Also, many times it is very typical that the first instance where the syntax rules are violated can cause every following, but correct syntax, instance become an error. Therefore look at the very first problem line and go backwards in the file to verify that the syntax is correct.
 
Old 06-17-2018, 08:01 PM   #3
novice411
LQ Newbie
 
Registered: Jun 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
I was really hoping not to have to provide the entire section, but I was unable to spot an "unmatched" bracket, perhaps you can
}

}
############################################################################

Last edited by novice411; 06-17-2018 at 09:27 PM.
 
Old 06-17-2018, 08:28 PM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
No I meant for you to search the file yourself.

Probably should not post that level of detail in the future, or edit/erase what you've posted if it is identifiable for your system/setup.

I copied that all, put it in an editor and globally searched/replaced { with [ --> 34 occurrences. Globally searched/replace } with ] --> 34 occurrences.

I don't know if that's the entire file, please don't post it. Meanwhile, the "syntax" may be wrong. Just because you have the same amount of { as you do } doesn't mean that one is not in the correct place. What if that group term needs to be terminated right up top and not at the end of the section/file. I don't know the syntax, but as said before, the first line number of the complaint is a good place to search.

Meanwhile, did you once have a working file? Check a file that does work, if possible.
 
Old 06-19-2018, 12:01 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Another approach is to try building the file in small sections and check each one as you you add them.
Error should be pretty obvious then...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 13.0 DHCP server - Configuration file errors encountered hejo Linux - Server 2 11-20-2010 03:38 AM
Correcting Problems Identified in .xsession-errors Cara25 Mandriva 3 01-13-2007 09:03 PM
need help in correcting errors urgently weifeng Programming 4 02-10-2006 12:26 AM
need help in correcting errors urgently weifeng Programming 1 02-09-2006 08:18 PM
DHCP errors andrew001 Linux - Networking 3 03-21-2003 04:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration