If I build cfengine v3.1.2 on Solaris10 and run the commands below directly after make install, the default policies tries to restart cf-serverd,cf-monitord every time cf-agent is run, regardless of whether the processes already are running. Consequently, I get an "Address already in use" bind error. I saw this first in my private setup when going from v3.02 to v3.1.2, but the same thing happens with the baseline default policies as well.
Looking at the code, it seems that there is a bug in enterprise_stubs.c, which returns a set of options for the ps command - when in a Solaris global zone, it returns "-z global" only, instead of the usual "-eo user, pid,ppid,pgid,...". So this bug does not come into effect in a Solaris 10 container (ie a non-global zone), only in a global zone. Fixing this is a bit tricky, since the -e option cancels out any -z global option (ref man ps). This is what you want in a global zone (with -z option, no -e option): /bin/ps -z global -o user,pid,ppid,pgid, ... while this is what you want in a non-global zone (no -z option, with -e option): /bin/ps -e -o user,pid,ppid,pgid, ... - Erlend bash-3.00# uname -a SunOS sol10-01 5.10 Generic_139556-08 i86pc i386 i86pc bash-3.00# bash-3.00# /usr/local/sbin/cf-agent 2>&1 >/dev/null bash-3.00# cp /usr/local/share/doc/cfengine/inputs/*cf /var/cfengine/inputs/ bash-3.00# /usr/local/sbin/cf-agent 2>&1 >/dev/null bash-3.00# /usr/local/sbin/cf-key Making a key pair for cfengine, please wait, this could take a minute... bash-3.00# bash-3.00# /usr/local/sbin/cf-agent -KI -> Making a one-time restart promise for cf-monitord -> Making a one-time restart promise for cf-serverd -> Executing '/var/cfengine/bin/cf-monitord' ...(timeout=-678,owner=-1,group=-1) -> Completed execution of /var/cfengine/bin/cf-monitord -> Executing '/var/cfengine/bin/cf-serverd' ...(timeout=-678,owner=-1,group=-1) -> Completed execution of /var/cfengine/bin/cf-serverd R: Added a 5 minute schedule to crontabs -> Edited file /var/spool/cron/crontabs/root bash-3.00# bash-3.00# ps -ef|grep cf- root 20249 1 0 11:18:43 ? 0:00 /var/cfengine/bin/cf-monitord root 20205 1 0 11:18:21 ? 0:00 /var/cfengine/bin/cf-serverd root 20259 3626 0 11:19:38 pts/5 0:00 grep cf- bash-3.00# bash-3.00# /usr/local/sbin/cf-agent -KI -> Making a one-time restart promise for cf-monitord -> Making a one-time restart promise for cf-serverd -> Executing '/var/cfengine/bin/cf-monitord' ...(timeout=-678,owner=-1,group=-1) -> Completed execution of /var/cfengine/bin/cf-monitord -> Executing '/var/cfengine/bin/cf-serverd' ...(timeout=-678,owner=-1,group=-1) Q: "...cf-serverd": Could not bind server address Q: "...cf-serverd": !!! System error for bind: "Address already in use" I: Last 2 quoted lines were generated by promiser "/var/cfengine/bin/cf-serverd" -> Completed execution of /var/cfengine/bin/cf-serverd bash-3.00# bash-3.00# /usr/local/sbin/cf-agent -KI -> Making a one-time restart promise for cf-monitord -> Making a one-time restart promise for cf-serverd -> Executing '/var/cfengine/bin/cf-monitord' ...(timeout=-678,owner=-1,group=-1) -> Completed execution of /var/cfengine/bin/cf-monitord -> Executing '/var/cfengine/bin/cf-serverd' ...(timeout=-678,owner=-1,group=-1) Q: "...cf-serverd": Could not bind server address Q: "...cf-serverd": !!! System error for bind: "Address already in use" I: Last 2 quoted lines were generated by promiser "/var/cfengine/bin/cf-serverd" -> Completed execution of /var/cfengine/bin/cf-serverd bash-3.00# bash-3.00# /usr/local/sbin/cf-agent -KI -> Making a one-time restart promise for cf-monitord -> Making a one-time restart promise for cf-serverd -> Executing '/var/cfengine/bin/cf-monitord' ...(timeout=-678,owner=-1,group=-1) -> Completed execution of /var/cfengine/bin/cf-monitord -> Executing '/var/cfengine/bin/cf-serverd' ...(timeout=-678,owner=-1,group=-1) Q: "...cf-serverd": Could not bind server address Q: "...cf-serverd": !!! System error for bind: "Address already in use" I: Last 2 quoted lines were generated by promiser "/var/cfengine/bin/cf-serverd" -> Completed execution of /var/cfengine/bin/cf-serverd bash-3.00# _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine