PacketFence - BTS - PacketFence
View Issue Details
0001557PacketFencedhcppublic2012-09-28 13:542012-10-19 11:10
candlerb 
 
normalminoralways
resolvedopen 
3.5.1 
3.6.0devel 
0001557: Two instances of pfdhcplistener started
[root@pf pf]# ps auxwww | grep pfdhcp
root 12180 0.0 0.8 238956 33896 ? Ss Sep27 0:08 pfdhcplistener: listening on eth0
root 12198 0.0 0.8 238956 33896 ? Ss Sep27 0:08 pfdhcplistener: listening on eth0
root 17280 0.0 0.0 103244 836 pts/0 S+ 17:22 0:00 grep pfdhcp

# grep "pfdhcp.*Start" logs/packetfence.log|tail
Sep 27 07:24:47 pfcmd(12114) INFO: Starting pfdhcplistener with '/usr/local/pf/sbin/pfdhcplistener -i eth0 -d &' (pf::services::service_ctl)
Sep 27 07:24:47 pfcmd(12114) INFO: Starting pfdhcplistener with '/usr/local/pf/sbin/pfdhcplistener -i eth0 -d &' (pf::services::service_ctl)

However the web GUI shows only one process:

pfdhcplistener Running Running (pid: 12180)

Configuration:
---- 8< ----
[interface eth0]
ip=192.0.2.14
type=internal,management
mask=255.255.255.224
enforcement=vlan

[database]
pass=XXXXXX

[general]
dhcpservers=10.1.7.10,192.0.2.14,192.0.2.15
domain=example.com
hostname=pf
dnsservers=192.0.2.10,192.0.2.24,192.0.2.80
timezone=Africa/Accra

[alerting]
emailaddr=postmaster@example.com

[interface eth1]
ip=0.0.0.0
mask=255.255.255.255
type=monitor
enforcement=

[guests_self_registration]
modes=sponsor

[registration]
auth=radius
guests_self_registration=disabled

[trapping]
range=192.0.0.0/16,10.0.0.0/8
registration=enabled
detection=enabled
------------

(IPs sanitised to 192.0.2, domain sanitised to example.com)

Note: you can see eth0 has 'internal,management'. If I change this to 'management' only, then on attempting to start the daemons I get:

Checking configuration sanity...
FATAL - internal network(s) not defined!
It appears that:
@listen_ints gets interfaces with type=internal
@dhcplistener_ints gets interfaces with type=management

and these are combined:

                            my @devices = @listen_ints;
                            push @devices, @dhcplistener_ints;

Hence two instances of the daemon are started, because the same interface is marked as both internal and management
No tags attached.
Issue History
2012-09-28 13:54candlerbNew Issue
2012-09-28 14:02obilodeauNote Added: 0003109
2012-09-29 15:42candlerbNote Added: 0003110
2012-10-19 11:10fgaudreaultStatusnew => resolved
2012-10-19 11:10fgaudreaultFixed in Version => devel
2012-10-19 11:10fgaudreaultTarget Version => 3.6.0

Notes
(0003109)
obilodeau   
2012-09-28 14:02   
This issue is fixed in this pull request which should be part of the next stable release. https://github.com/inverse-inc/packetfence/pull/65 [^]
(0003110)
candlerb   
2012-09-29 15:42   
Thank you. Patch applied and it has solved the problem.