How to disable cf-serverd

271 views
Skip to first unread message

Peter Wood

unread,
Dec 18, 2014, 4:58:42 PM12/18/14
to Help CFEngine
On a CentOS5 system I have CFEngine2 and CFEngine3.6.3. Both are clients type installations bootstrapped to two different masters each.

I'd like to disable cf-serverd so it will not fight with cfservd  for the port.

In /etc/sysconfig/cfengine3 I have:
  RUN_CF_SERVERD=0

In /var/cfengine/inputs/controls/cf_serverd.cf I added:
  listen => "false";

During boot cf-serverd still starts. After the system is up and running then the init script starts ignoring cf-serverd, i.e. "service cfengine3 stop" will not stop cf-serverd and the start option will not start cf-serverd.

What could be the reason for cf-serverd to start at boot time only?

Thanks,

-- Peter

Nick Anderson

unread,
Dec 18, 2014, 5:04:22 PM12/18/14
to Peter Wood, Help CFEngine
On 12/18/2014 03:58 PM, Peter Wood wrote:
> What could be the reason for cf-serverd to start at boot time only?

I believe the init script starts the services directly, it doesnt run
the agent. That would be my first guess.

Nick Anderson

unread,
Dec 18, 2014, 5:04:28 PM12/18/14
to Peter Wood, Help CFEngine
On 12/18/2014 03:58 PM, Peter Wood wrote:
> What could be the reason for cf-serverd to start at boot time only?

Neil Watson

unread,
Dec 18, 2014, 5:11:11 PM12/18/14
to Help CFEngine
You should do it the other way, use cf-serverd and disable cfservd.
Change the boot order so that cfservd starts first then cf-serverd will
error out, because the port is taken. Better, configure cfserver3 init
script to not start cf-serverd.

--
Neil H Watson
Sr. Partner, Architecture and Infrastructure
CFEngine reporting: https://github.com/evolvethinking/delta_reporting
CFEngine policy: https://github.com/evolvethinking/evolve_cfengine_freelib
CFEngine and vim: https://github.com/neilhwatson/vim_cf3
CFEngine support: http://evolvethinking.com

Nick Anderson

unread,
Dec 18, 2014, 5:11:56 PM12/18/14
to help-c...@googlegroups.com
On 12/18/2014 04:04 PM, Nick Anderson wrote:
> I believe the init script starts the services directly, it doesnt run
> the agent. That would be my first guess.

Oh ignore that.

Peter Wood

unread,
Dec 18, 2014, 5:27:24 PM12/18/14
to Neil Watson, Help CFEngine
Changing the boot order or changing the init script will work with various level of effort in my case but why do I have to do that. Seems that the config options are in place to do what I need and I was hoping that I'm just not doing it right.

Why is RUN_CF_SERVERD=0 ignored at boot time?


--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengine+unsubscribe@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.

Peter Wood

unread,
Dec 18, 2014, 5:42:56 PM12/18/14
to Peter Wood, Help CFEngine
I was wrong. cf-serverd doesn't start at boot. Cf-agent starts it. I'm looking into why and how to disable it.

Nick Anderson

unread,
Dec 18, 2014, 6:26:04 PM12/18/14
to Peter Wood, Help CFEngine
On 12/18/2014 04:42 PM, Peter Wood wrote:
> I was wrong. cf-serverd doesn't start at boot. Cf-agent starts it. I'm
> looking into why and how to disable it.

Try these

https://github.com/cfengine/masterfiles/blob/master/update/update_processes.cf#L37

and

https://github.com/cfengine/masterfiles/blob/master/update/update_processes.cf#L41-45

Peter Wood

unread,
Dec 18, 2014, 6:36:37 PM12/18/14
to Nick Anderson, Help CFEngine
Removing it from agents_to_be_anabled list worked. Thanks, Nick.
Reply all
Reply to author
Forward
0 new messages