omshell "connect": dhcpctl_connect: no more

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

omshell "connect": dhcpctl_connect: no more

Post by ^rooker »

[PROBLEM]
Tried to fix a "peer holds all free leases" problem in my failover DHCP setup, using "omshell" to set the running dhcpd to state "partner-down".
Trying to connect with omshell, returns the following error:
dhcpctl_connect: no more
[SOLUTION]
By default, the om-api connection is not configured in /etc/dhcp/dhcpd.conf, so you must add a few lines to enable the omshell connection.
Thanks to the DHCPd failover article on Frederik's blog, I got an idea of how to configure the "omapi" for using "omshell".
Add the following lines to your primary DHCP server dhcpd.conf:

Code: Select all

key primaryhost {
    algorithm hmac-md5;
    secret "secret";
};

omapi-key primaryhost;
omapi-port 7911;
Now, try to connect with "omshell":

Code: Select all

server localhost
port 7911
key primaryhost "secret"
connect
Upon connect, you'll get the following message:
obj: <null>
This is not an error, but it indicates, that you haven't told omshell which "object" to work on.

For example:

Code: Select all

new failover-state
set name = "failovername"
open
Where "failovername" is the name you defined in the failover-pool in /etc/dhcp/dhcpd.conf.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply