Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: Marcus on April 04, 2011, 05:01:16 pm

Title: [SOLVED][BUG] DHCP + Static IP issue
Post by: Marcus on April 04, 2011, 05:01:16 pm
Hello,
I'm experiencing some difficulties with the new DHCP system.

From time to time (most of time), when adding a static IP to the list, DHCP server fails to restart.  Restarting it from the admin gives me a:
"The module was restarted correctly."

But in facts, it does not restart correctly.  

There goes the error reported by the DHCP server when trying to restart it:
Code: [Select]
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp3/dhcpd.conf line 59: expecting left brace.
    some static name
                             ^
Configuration file errors encountered -- exiting

Ok,
I must admit that I'm a bit short in time so I didn't test every possibilities in order to identify where this error comes from.

So it can be:
a) A space in "some static name"
b) The MAC is already listed in the DHCP server list.

** This is the current "workaround" that I'm using in order to restart the DHCP server:
1) Check the error log
2) Remove the problematic static IP from the list
3) Restart the DHCP server

Any help for figuring this one out would be greatly appreciated
otherwise
I'll post the solution/problem source when I'll find it

Thanks for reading

Best,

Marcus
Title: Re: DHCP + Static IP issue
Post by: sixstone on April 05, 2011, 10:38:49 am
Hi Marcus,

Glad to see you here again ;).

Ok,
I must admit that I'm a bit short in time so I didn't test every possibilities in order to identify where this error comes from.

So it can be:
a) A space in "some static name"
b) The MAC is already listed in the DHCP server list.

Reading the manual page, there is no restriction about the hostname. In this case, we have assumed the member name can be anything. Could you test it setting a member with spaces in its name?

Option b) is already checked by Zentyal code. So it'll go for a) option.

Best regards,
Title: Re: DHCP + Static IP issue
Post by: Marcus on April 05, 2011, 08:21:56 pm
Hello sixstone,

I wasn't very far - just busy :)


So there goes my results:
Code: [Select]
Failed to start dhcpd :

dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp3/dhcpd.conf line 125: expecting left brace.
     host Marc workstation
                             ^
Configuration file errors encountered -- exiting

Lines around 125 in /etc/dhcp3/dhcpd.conf :

           }
     group {
                   

     host Marc workstation {
    hardware ethernet so:me:bo:gu:sm:ac;
  fixed-address 192.168.2.80;
                         

                          }
           }

After removing the space between Marc and workstation (making it MarcWorkstation), DHCP server restarted without any issue.

So the problem is right there...

Heading for the bugtracker and opening a new one...

Thanks for your advice :)

Best,

Marcus
Title: Re: [BUG] DHCP + Static IP issue
Post by: sixstone on April 06, 2011, 03:38:07 pm
Hi Marcus,

My colleague Javier has already fixed the issue with this changeset [1].

We hope this will be released pretty soon. Thanks very much for your feedback here!

Best regards,

[1] http://trac.zentyal.org/changeset/20997
Title: Re: [SOLVED][BUG] DHCP + Static IP issue
Post by: Marcus on April 06, 2011, 08:38:36 pm
Hello sixstone,

That was very quick!

Thanks a bunch!


Best,

Marcus
Title: Re: [SOLVED][BUG] DHCP + Static IP issue
Post by: ASRIX on May 31, 2011, 10:20:08 pm
Hello Marcus and Sixstone,

I just write to say THANKS!  :D

I've had a similar problem with the DHCP service. It didn't report an error, but also never assigned the static IP according to the list. And the problem was the spaces en that names!

This post really helped me.

Sorry about my english!

ASRIX