You could obtain the same effect with the following line in /etc/crontab:

*/5  *  *  *  * root /usr/local/pf/bin/pfcmd service pf watch

(you need to specify the user)

Nicola

Il giorno 06/gen/2014, alle ore 19:47, Louis Munro ha scritto:

> Hello Stephen,
> I hope the new year finds you well.
> 
> You would be better off adding the cronjob to the crontab for the user that 
> is to run it (probably root in this case).
> 
> So remove whatever you put in /etc/crontab, then run 
> 
> crontab -e 
> 
> as root.
> 
> Add the line you had previously added, i.e: 
> 
> */5  *  *  *  * /usr/local/pf/bin/pfcmd service pf watch
> 
> and save. 
> That should take effect right away (no restart required).
> 
> Make sure you see some action in the logs for that entry (i.e. in 
> /var/log/cron on RedHat/Centos).
> 
> The real question remains why those services are not started at boot.
> 
> What happens if you wipe the logs (logs/packetfence.log) and reboot? 
> What are the messages saying about pfdhcplistener or dhcpd?
> 
> 
> Regards,
> --
> Louis Munro
> [email protected]  ::  www.inverse.ca 
> +1.514.447.4918 *125  :: +1 (866) 353-6153 
> Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence 
> (www.packetfence.org)
> 
> On 2014-01-03, at 20:10 , Stephen Wittstruck <[email protected]> wrote:
> 
>> Hi again, Louis, et al.
>> 
>> Shouldn't I be able to workaround this issue of dhcpd and dhcpdlistener not 
>> starting on my CentOS 6.5 VM reboot (but they will manually afterwards) by 
>> enabling pf service watch in a cron job?
>> 
>> After enabling email alerts and restarts on the PF web admin Service Watch 
>> page I added "*/5  *  *  *  * /usr/local/pf/bin/pfcmd service pf watch" to 
>> /etc/crontab, rebooted the server and waited 10 minutes; nothing happened, 
>> they still weren't started.  The following is the output from running 'pfcmd 
>> service pf watch' manually after waiting 10 minutes.  I've never used cron 
>> jobs before so I guess it's possible there's another step to using it?
>> 
>> [swittstr@nac-dev bin]$ ./pfcmd service pf watch
>> The following processes are not running:
>>  - dhcpd
>>  - pfdhcplistener
>> service|command
>> Internet Systems Consortium DHCP Server 4.1.1-P1
>> Copyright 2004-2010 Internet Systems Consortium.
>> All rights reserved.
>> For info, please visit https://www.isc.org/software/dhcp/
>> Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not 
>> specified in the config file
>> Wrote 2 leases to leases file.
>> Listening on LPF/eth2/00:50:56:af:00:46/192.168.53.0/24
>> Sending on   LPF/eth2/00:50:56:af:00:46/192.168.53.0/24
>> Listening on LPF/eth1/00:50:56:af:00:3e/192.168.52.0/24
>> Sending on   LPF/eth1/00:50:56:af:00:3e/192.168.52.0/24
>> Sending on   Socket/fallback/fallback-net
>> dhcpd|watch
>> pfdhcplistener|watch
>> [swittstr@nac-dev bin]$ ./pfcmd service pf status
>> service|shouldBeStarted|pid
>> memcached|1|1457
>> httpd.admin|1|1487
>> httpd.webservices|1|1510
>> httpd.portal|1|1525
>> httpd.proxy|0|0
>> pfdns|1|1560
>> dhcpd|1|2015
>> pfdetect|0|0
>> snort|0|0
>> suricata|0|0
>> radiusd|0|0
>> snmptrapd|1|1563
>> pfsetvlan|1|1569
>> pfdhcplistener|1|2021 2027 2033
>> pfmon|1|1636
>> 
>> Thank you.
>> Steve, CSM
>> 
>> 
>> On Dec 20, 2013, at 7:42 PM, Stephen Wittstruck <[email protected]> wrote:
>> 
>>> Hi Louis,
>>> 
>>> Thanks for the fast response.
>>> 
>>> Here's the output you asked for, unfortunately 'pgrep -lf dhcp' doesn't 
>>> return anything:
>>> 
>>> [swittstr@nac-dev bin]$ pgrep -lf dhcp
>>> [swittstr@nac-dev bin]$ 
>>> 
>>> [swittstr@nac-dev bin]$ ./pfcmd service pf status
>>> service|shouldBeStarted|pid
>>> memcached|1|1453
>>> httpd.admin|1|1462
>>> httpd.webservices|1|1480
>>> httpd.portal|1|1497
>>> httpd.proxy|0|0
>>> pfdns|1|1529
>>> dhcpd|1|0
>>> pfdetect|0|0
>>> snort|0|0
>>> suricata|0|0
>>> radiusd|1|0  <<<<<<<<<<<<< we don't use radiusd
>>> snmptrapd|1|1535
>>> pfsetvlan|1|1556
>>> pfdhcplistener|1|0
>>> pfmon|1|1597
>>> [swittstr@nac-dev bin]$
>>> 
>>> I noticed pfmon was a little slow to start but dhcpd and pfdhcplistener 
>>> never start without help after a Centos VM server reboot.
>>> 
>>> Thank you.
>>> Steve
>>> 
>>> On Dec 20, 2013, at 6:39 PM, Louis Munro <[email protected]> wrote:
>>> 
>>>> Hi Stephen,
>>>> Can you make sure the processes really aren't started ?
>>>> 
>>>> What I mean is that we have seen cases where "service packetfence status" 
>>>> (or the dashboard) report services as not started while the process was in 
>>>> fact running.
>>>> 
>>>> When you reboot, what does a pgrep -lf dhcp report?
>>>> 
>>>> Regards,
>>>> --
>>>> Louis Munro
>>>> [email protected]  ::  www.inverse.ca 
>>>> +1.514.447.4918 *125  :: +1 (866) 353-6153 
>>>> Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence 
>>>> (www.packetfence.org)
>>>> 
>>>> On 2013-12-20, at 20:33 , Stephen Wittstruck <[email protected]> wrote:
>>>> 
>>>>> Hi all,
>>>>> 
>>>>> Rebooting the our Centos 6.5 VM host for PF 4.1 fails to start DHCPD and 
>>>>> PFDHCPLISTENER, afterwards both will start individually or with a pfcmd 
>>>>> restart.  This happened in earlier 4.x releases but not 3.x.
>>>>> 
>>>>> I'd guess a good linux admin would know a fix for this but thought it 
>>>>> best to ask here what might be going on and what's the best way to fix it.
>>>>> 
>>>>> If needed I could relay questions/info to our Linux/VM administrator.
>>>>> 
>>>>> Below is our pf.conf, networks.conf and the ifconfig output.
>>>>> 
>>>>> Thank you.  Steve, CSM
>>>>> 
>>>>> [swittstr@nac-dev conf]$ more pf.conf
>>>>> [general]
>>>>> #
>>>>> # general.domain
>>>>> #
>>>>> # Domain name of PacketFence system.
>>>>> domain=mines.edu
>>>>> #
>>>>> # general.hostname
>>>>> #
>>>>> # Hostname of PacketFence system.  This is concatenated with the domain 
>>>>> in Apache rewriting rules and therefore must be resolvable by clients.
>>>>> hostname=nac-dev
>>>>> #
>>>>> # general.dhcpservers
>>>>> #
>>>>> # Comma-delimited list of DHCP servers.  Passthroughs are created to 
>>>>> allow DHCP transactions from even "trapped" nodes.
>>>>> dhcpservers=138.67.1.2,138.67.1.3,192.168.52.1,192.168.53.1
>>>>> 
>>>>> [registration]
>>>>> #
>>>>> # registration.nbregpages
>>>>> #
>>>>> # The number of registration pages to show to the user
>>>>> nbregpages=1
>>>>> #
>>>>> # registration.gaming_devices_registration_role
>>>>> #
>>>>> # The role to assign to gaming devices. If none is specified, the role of 
>>>>> the registrant is used.
>>>>> gaming_devices_registration_role=gaming
>>>>> 
>>>>> [alerting]
>>>>> #
>>>>> # alerting.emailaddr
>>>>> #
>>>>> # Email address to which notifications of rogue DHCP servers, violations 
>>>>> with an action of "email", or any other 
>>>>> # PacketFence-related message goes to.
>>>>> [email protected]
>>>>> 
>>>>> [servicewatch]
>>>>> #
>>>>> # servicewatch.restart
>>>>> #
>>>>> # Should pfcmd service pf watch restart PF if services are not running?
>>>>> # You must make sure to call the watch command. Installing it in the cron 
>>>>> is the
>>>>> # recommended approach:
>>>>> # */5 * * * * /usr/local/pf/bin/pfcmd service pf watch
>>>>> restart=enabled
>>>>> 
>>>>> [interface eth0]
>>>>> ip=138.67.208.88
>>>>> type=management
>>>>> mask=255.255.254.0
>>>>> 
>>>>> [interface eth1]
>>>>> enforcement=vlan
>>>>> ip=192.168.52.1
>>>>> type=internal
>>>>> mask=255.255.255.0
>>>>> 
>>>>> [interface eth2]
>>>>> enforcement=vlan
>>>>> ip=192.168.53.1
>>>>> type=internal
>>>>> mask=255.255.255.0
>>>>> 
>>>>> [swittstr@nac-dev conf]$ ifconfig
>>>>> eth0      Link encap:Ethernet  HWaddr 00:50:56:AF:00:96  
>>>>>           inet addr:138.67.208.88  Bcast:138.67.209.255  
>>>>> Mask:255.255.254.0
>>>>>           inet6 addr: fe80::250:56ff:feaf:96/64 Scope:Link
>>>>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>>>>           RX packets:4101 errors:0 dropped:0 overruns:0 frame:0
>>>>>           TX packets:1319 errors:0 dropped:0 overruns:0 carrier:0
>>>>>           collisions:0 txqueuelen:1000 
>>>>>           RX bytes:592929 (579.0 KiB)  TX bytes:292055 (285.2 KiB)
>>>>> 
>>>>> eth1      Link encap:Ethernet  HWaddr 00:50:56:AF:00:3E  
>>>>>           inet addr:192.168.52.1  Bcast:192.168.52.255  Mask:255.255.255.0
>>>>>           inet6 addr: fe80::250:56ff:feaf:3e/64 Scope:Link
>>>>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>>>>           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
>>>>>           TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
>>>>>           collisions:0 txqueuelen:1000 
>>>>>           RX bytes:120 (120.0 b)  TX bytes:636 (636.0 b)
>>>>> 
>>>>> eth2      Link encap:Ethernet  HWaddr 00:50:56:AF:00:46  
>>>>>           inet addr:192.168.53.1  Bcast:192.168.53.255  Mask:255.255.255.0
>>>>>           inet6 addr: fe80::250:56ff:feaf:46/64 Scope:Link
>>>>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>>>>           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
>>>>>           TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
>>>>>           collisions:0 txqueuelen:1000 
>>>>>           RX bytes:120 (120.0 b)  TX bytes:636 (636.0 b)
>>>>> 
>>>>> lo        Link encap:Local Loopback  
>>>>>           inet addr:127.0.0.1  Mask:255.0.0.0
>>>>>           inet6 addr: ::1/128 Scope:Host
>>>>>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>>>>>           RX packets:1879 errors:0 dropped:0 overruns:0 frame:0
>>>>>           TX packets:1879 errors:0 dropped:0 overruns:0 carrier:0
>>>>>           collisions:0 txqueuelen:0 
>>>>>           RX bytes:1738913 (1.6 MiB)  TX bytes:1738913 (1.6 MiB)
>>>>> 
>>>>> [swittstr@nac-dev conf]$ more networks.conf 
>>>>> [192.168.52.0]
>>>>> dns=192.168.52.1
>>>>> dhcp_start=192.168.52.10
>>>>> gateway=192.168.52.1
>>>>> domain-name=vlan-registration.mines.edu
>>>>> named=enabled
>>>>> dhcp_max_lease_time=30
>>>>> dhcpd=enabled
>>>>> type=vlan-registration
>>>>> netmask=255.255.255.0
>>>>> dhcp_end=192.168.52.246
>>>>> dhcp_default_lease_time=30
>>>>> 
>>>>> [192.168.53.0]
>>>>> dns=192.168.53.1
>>>>> dhcp_start=192.168.53.10
>>>>> gateway=192.168.53.1
>>>>> domain-name=vlan-isolation.mines.edu
>>>>> named=enabled
>>>>> dhcp_max_lease_time=30
>>>>> dhcpd=enabled
>>>>> type=vlan-isolation
>>>>> netmask=255.255.255.0
>>>>> dhcp_end=192.168.53.246
>>>>> dhcp_default_lease_time=30
>>>>> [swittstr@nac-dev conf]$ 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Rapidly troubleshoot problems before they affect your business. Most IT 
>>>>> organizations don't have a clear picture of how application performance 
>>>>> affects their revenue. With AppDynamics, you get 100% visibility into 
>>>>> your 
>>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics 
>>>>> Pro!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
>>>>> PacketFence-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Rapidly troubleshoot problems before they affect your business. Most IT 
>>>> organizations don't have a clear picture of how application performance 
>>>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics 
>>>> Pro!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
>>>> PacketFence-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT 
>> organizations don't have a clear picture of how application performance 
>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics 
>> Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
>> PacketFence-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> PacketFence-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/packetfence-users

Nicola Canepa
Phone: +39-0522-399-3474
[email protected]

-
Remember, remember, the 5th of November (V)

Il contenuto della presente comunicazione è riservato e destinato 
esclusivamente ai destinatari indicati. Nel caso in cui sia ricevuto da persona 
diversa dal destinatario sono proibite la diffusione, la distribuzione e la 
copia. Nel caso riceveste la presente per errore, Vi preghiamo di informarci e 
di distruggerlo e/o cancellarlo dal Vostro computer, senza utilizzare i dati 
contenuti. La presente comunicazione (comprensiva dei documenti allegati) non 
avrà valore di proposta contrattuale e/o accettazione di proposte provenienti 
dal destinatario, nè rinuncia o riconoscimento di diritti, debiti e/o crediti, 
nè sarà impegnativa, qualora non sia sottoscritto successivo accordo da chi può 
validamente obbligarci. Non deriverà alcuna responsabilità precontrattuale a 
ns. carico, se la presente non sia seguita da contratto sottoscritto dalle 
parti.

The content of the above communication is strictly confidential and reserved 
solely for the referred addressees. In the event of receipt by persons 
different from the addressee, copying, alteration and distribution are 
forbidden. If received by mistake we ask you to inform us and to destroy and/or 
delete from your computer without using the data herein contained. The present 
message (eventual annexes inclusive) shall not be considered a contractual 
proposal and/or acceptance of offer from the addressee, nor waiver recognizance 
of rights, debts  and/or credits, nor shall it be binding when not executed as 
a subsequent agreement by persons who could lawfully represent us. No 
pre-contractual liability shall apply to us when the present communication is 
not followed by any binding agreement between the parties.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to