<div dir="ltr"><div><div><div><div><div><div><div><div>Thanks Ken and Emmanuel. <br></div>Its a big endian machine. I will try with running &quot;pcs cluster setup&quot; and &quot;pcs cluster start&quot;<br></div>Inside cluster.py, &quot;service pacemaker start&quot; and &quot;service corosync start&quot; are executed to bring up pacemaker and corosync.<br></div>Those service scripts and the infrastructure needed to bring up the processes in the above said manner doesn&#39;t exist in my board.<br></div>As it is a embedded board with the limited memory, full fledged linux is not installed.<br></div>Just curious to know, what could be reason the pacemaker throws that error.<br><br><i>&quot;cmap connection setup failed: CS_ERR_TRY_AGAIN.  Retrying in 1s&quot;<br><br></i></div>Thanks for response.<br><br></div>Regards,<br></div>Sriram.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 8:55 AM, Ken Gaillot <span dir="ltr">&lt;<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04/27/2016 11:25 AM, emmanuel segura wrote:<br>
&gt; you need to use pcs to do everything, pcs cluster setup and pcs<br>
&gt; cluster start, try to use the redhat docs for more information.<br>
<br>
</span>Agreed -- pcs cluster setup will create a proper corosync.conf for you.<br>
Your corosync.conf below uses corosync 1 syntax, and there were<br>
significant changes in corosync 2. In particular, you don&#39;t need the<br>
file created in step 4, because pacemaker is no longer launched via a<br>
corosync plugin.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; 2016-04-27 17:28 GMT+02:00 Sriram &lt;<a href="mailto:sriram.ec@gmail.com">sriram.ec@gmail.com</a>&gt;:<br>
&gt;&gt; Dear All,<br>
&gt;&gt;<br>
&gt;&gt; I m trying to use pacemaker and corosync for the clustering requirement that<br>
&gt;&gt; came up recently.<br>
&gt;&gt; We have cross compiled corosync, pacemaker and pcs(python) for ppc<br>
&gt;&gt; environment (Target board where pacemaker and corosync are supposed to run)<br>
&gt;&gt; I m having trouble bringing up pacemaker in that environment, though I could<br>
&gt;&gt; successfully bring up corosync.<br>
&gt;&gt; Any help is welcome.<br>
&gt;&gt;<br>
&gt;&gt; I m using these versions of pacemaker and corosync<br>
&gt;&gt; [root@node_cu pacemaker]# corosync -v<br>
&gt;&gt; Corosync Cluster Engine, version &#39;2.3.5&#39;<br>
&gt;&gt; Copyright (c) 2006-2009 Red Hat, Inc.<br>
&gt;&gt; [root@node_cu pacemaker]# pacemakerd -$<br>
&gt;&gt; Pacemaker 1.1.14<br>
&gt;&gt; Written by Andrew Beekhof<br>
&gt;&gt;<br>
&gt;&gt; For running corosync, I did the following.<br>
&gt;&gt; 1. Created the following directories,<br>
&gt;&gt;     /var/lib/pacemaker<br>
&gt;&gt;     /var/lib/corosync<br>
&gt;&gt;     /var/lib/pacemaker<br>
&gt;&gt;     /var/lib/pacemaker/cores<br>
&gt;&gt;     /var/lib/pacemaker/pengine<br>
&gt;&gt;     /var/lib/pacemaker/blackbox<br>
&gt;&gt;     /var/lib/pacemaker/cib<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2. Created a file called corosync.conf under /etc/corosync folder with the<br>
&gt;&gt; following contents<br>
&gt;&gt;<br>
&gt;&gt; totem {<br>
&gt;&gt;<br>
&gt;&gt;         version: 2<br>
&gt;&gt;         token:          5000<br>
&gt;&gt;         token_retransmits_before_loss_const: 20<br>
&gt;&gt;         join:           1000<br>
&gt;&gt;         consensus:      7500<br>
&gt;&gt;         vsftype:        none<br>
&gt;&gt;         max_messages:   20<br>
&gt;&gt;         secauth:        off<br>
&gt;&gt;         cluster_name:   mycluster<br>
&gt;&gt;         transport:      udpu<br>
&gt;&gt;         threads:        0<br>
&gt;&gt;         clear_node_high_bit: yes<br>
&gt;&gt;<br>
&gt;&gt;         interface {<br>
&gt;&gt;                 ringnumber: 0<br>
&gt;&gt;                 # The following three values need to be set based on your<br>
&gt;&gt; environment<br>
&gt;&gt;                 bindnetaddr: 10.x.x.x<br>
&gt;&gt;                 mcastaddr: 226.94.1.1<br>
&gt;&gt;                 mcastport: 5405<br>
&gt;&gt;         }<br>
&gt;&gt;  }<br>
&gt;&gt;<br>
&gt;&gt;  logging {<br>
&gt;&gt;         fileline: off<br>
&gt;&gt;         to_syslog: yes<br>
&gt;&gt;         to_stderr: no<br>
&gt;&gt;         to_syslog: yes<br>
&gt;&gt;         logfile: /var/log/corosync.log<br>
&gt;&gt;         syslog_facility: daemon<br>
&gt;&gt;         debug: on<br>
&gt;&gt;         timestamp: on<br>
&gt;&gt;  }<br>
&gt;&gt;<br>
&gt;&gt;  amf {<br>
&gt;&gt;         mode: disabled<br>
&gt;&gt;  }<br>
&gt;&gt;<br>
&gt;&gt;  quorum {<br>
&gt;&gt;         provider: corosync_votequorum<br>
&gt;&gt;  }<br>
&gt;&gt;<br>
&gt;&gt; nodelist {<br>
&gt;&gt;   node {<br>
&gt;&gt;         ring0_addr: node_cu<br>
&gt;&gt;         nodeid: 1<br>
&gt;&gt;        }<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; 3.  Created authkey under /etc/corosync<br>
&gt;&gt;<br>
&gt;&gt; 4.  Created a file called pcmk under /etc/corosync/service.d and contents as<br>
&gt;&gt; below,<br>
&gt;&gt;       cat pcmk<br>
&gt;&gt;       service {<br>
&gt;&gt;          # Load the Pacemaker Cluster Resource Manager<br>
&gt;&gt;          name: pacemaker<br>
&gt;&gt;          ver:  1<br>
&gt;&gt;       }<br>
&gt;&gt;<br>
&gt;&gt; 5. Added the node name &quot;node_cu&quot; in /etc/hosts with 10.X.X.X ip<br>
&gt;&gt;<br>
&gt;&gt; 6. ./corosync -f -p &amp; --&gt; this step started corosync<br>
&gt;&gt;<br>
&gt;&gt; [root@node_cu pacemaker]# netstat -alpn | grep -i coros<br>
&gt;&gt; udp        0      0 10.X.X.X:61841     0.0.0.0:*<br>
&gt;&gt; 9133/corosync<br>
&gt;&gt; udp        0      0 10.X.X.X:5405      0.0.0.0:*<br>
&gt;&gt; 9133/corosync<br>
&gt;&gt; unix  2      [ ACC ]     STREAM     LISTENING     148888 9133/corosync<br>
&gt;&gt; @quorum<br>
&gt;&gt; unix  2      [ ACC ]     STREAM     LISTENING     148884 9133/corosync<br>
&gt;&gt; @cmap<br>
&gt;&gt; unix  2      [ ACC ]     STREAM     LISTENING     148887 9133/corosync<br>
&gt;&gt; @votequorum<br>
&gt;&gt; unix  2      [ ACC ]     STREAM     LISTENING     148885 9133/corosync<br>
&gt;&gt; @cfg<br>
&gt;&gt; unix  2      [ ACC ]     STREAM     LISTENING     148886 9133/corosync<br>
&gt;&gt; @cpg<br>
&gt;&gt; unix  2      [ ]         DGRAM                    148840 9133/corosync<br>
&gt;&gt;<br>
&gt;&gt; 7. ./pacemakerd -f &amp; gives the following error and exits.<br>
&gt;&gt; [root@node_cu pacemaker]# pacemakerd -f<br>
&gt;&gt; cmap connection setup failed: CS_ERR_TRY_AGAIN.  Retrying in 1s<br>
&gt;&gt; cmap connection setup failed: CS_ERR_TRY_AGAIN.  Retrying in 2s<br>
&gt;&gt; cmap connection setup failed: CS_ERR_TRY_AGAIN.  Retrying in 3s<br>
&gt;&gt; cmap connection setup failed: CS_ERR_TRY_AGAIN.  Retrying in 4s<br>
&gt;&gt; cmap connection setup failed: CS_ERR_TRY_AGAIN.  Retrying in 5s<br>
&gt;&gt; Could not connect to Cluster Configuration Database API, error 6<br>
&gt;&gt;<br>
&gt;&gt; Can you please point me, what is missing in these steps ?<br>
&gt;&gt;<br>
&gt;&gt; Before trying these steps, I tried running &quot;pcs cluster start&quot;, but that<br>
&gt;&gt; command fails with &quot;service&quot; script not found. As the root filesystem<br>
&gt;&gt; doesn&#39;t contain either /etc/init.d/ or /sbin/service<br>
&gt;&gt;<br>
&gt;&gt; So, the plan is to bring up corosync and pacemaker manually, later do the<br>
&gt;&gt; cluster configuration using &quot;pcs&quot; commands.<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Sriram<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt;&gt; <a href="http://clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://clusterlabs.org/mailman/listinfo/users</a><br>
&gt;&gt;<br>
&gt;&gt; Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
&gt;&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
&gt;&gt; Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://clusterlabs.org/mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</div></div></blockquote></div><br></div>