invalid expression type in print_expression: 45

Bob Harold rharolde at umich.edu
Wed Nov 4 13:42:28 UTC 2015


On Mon, Nov 2, 2015 at 6:45 PM, Shraddha Pandhe <spandhe.openstack at gmail.com
> wrote:

> Hi folks,
>
> I am using dhcp-4.1.1-49.
>
> What are the possible reasons for getting this error? I have been using
> the same dhcpd.conf without any issues. Today, I removed "dhcp-domain"
> option from the subnet definition and I started seeing this issue. Adding
> dhcp-domain back didn't help, so I am not sure if that caused anything.
>
>
>
> My dhcpd config file:
>
>
> # dhcpd.conf
> #
> # Sample configuration file for ISC dhcpd
> #
> log-facility local6;
> allow booting;
> deny unknown-clients;
> ddns-update-style none;
> default-lease-time 3600;
>
> lease-file-name "/home/neutron/dhcpd/dhcpd.leases";
> pid-file-name "/home/neutron/dhcpd/pid";
>
> next-server <ip-address>;
> server-name "<ip-address>";
>
> omapi-port 7911;
>
> # Local subnet definition is required to start dhcpd
> subnet <ip-address> netmask 255.255.255.255 {
> }
>
>
> if exists user-class and option user-class = "iPXE" {
>    filename "init.ipxe";
> }
> elsif exists user-class and option user-class = "gPXE" {
>    filename "init.gpxe";
> }
> else {
>    filename "undionly.kpxe";
> }
>
> ####################################################################
> #           DHCP Subnet Definitions to follow               #
> ####################################################################
> # NETWORK_ID 0b00f86d-2dbd-4931-8a17-8ddaea74f475
> subnet 192.168.122.0 netmask 255.255.255.0 {
>   option broadcast-address 192.168.122.255;
>   option domain-name-servers 192.168.122.1;
>   range 192.168.122.2 192.168.122.254;
> }
>
> Guessing here, but worth a try.
The "45" in the error message is probably the line number, but that would
be the very end of your file, from what I see.  One possibility is that
there is an invisible control character somewhere in the file, or some
punctuation is unicode instead of ascii.
By any chance did you copy/paste from a work processor?  They often use
different quote and hyphen characters that look similar but are not the
right character.

On Linux or Unix, try this:
    cat -v /etc/dhcpd.conf > /tmp/dhcpd.conf
    diff /etc/dhcpd.conf /tmp/dhcpd.conf
If there are any differences, delete and retype that line (do not
copy/paste).

Or
Open in a plain text editor like Notepad on Windows or gedit on Linux and
then save as a new file, and try the new file.

Or
Open in "vi" or "vim" and look for control characters - should show as "^"
followed by some character, but you won't be able to search for the "^".

-- 
Bob Harold
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20151104/d7b99303/attachment.html>


More information about the dhcp-users mailing list