<br><br><div class="gmail_quote">2013/4/2 Angus Salkeld <span dir="ltr">&lt;<a href="mailto:asalkeld@redhat.com" target="_blank">asalkeld@redhat.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 29/03/13 01:13 +0400, eXeC001er wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello.<br>
<br>
This Q is crosspost from openais-maillist.<br>
<br>
I use corosync-2.3.0, libqb-0.14.4 on OpenIndiana:<br>
<br>
I tried to create an application that uses corosync via its libraries, but<br>
it seems something wrong.<br>
On the machine where i debug corosync-tests work fine, but my application<br>
does not work. The application cannot intialize CMAP connection (same with<br>
VOTEQUORUM).<br>
&quot;*_initialize&quot; function returned CS_ERR_NOT_EXIST error. on server side i<br>
see &quot;Error in connection setup (7104-7367-0): Broken pipe (32)&quot;.<br>
<br>
My appliacation is multi-thread and &quot;*_initialize&quot; is called not in main<br>
thread.<br>
</blockquote>
<br></div>
Well, I suggest you keep it simple initially.<br>
Do the standard corosync apps work ok?<br>
like:<br>
./tests/testcpg<br></blockquote><div><br></div><div>yes. all tests from test directory of corosync sources work fine.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
It would be good to try narrow down what is failing.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
the stack-trace:<br>
<br>
/3@3:   -&gt; libvotequorum:votequorum_<u></u>initialize(0x8834b2c, 0x0, 0x0,<br>
0xfea63855)<br>
/2: nanosleep(0xFE99BF48, 0x00000000)       = 0<br>
/3@3:     -&gt; libqb:qb_hdb_handle_create()<br>
/3@3:     &lt;- libqb:qb_hdb_handle_create() = 0<br>
/3@3:     -&gt; libcorosync_common:hdb_error_<u></u>to_cs()<br>
/3@3:     &lt;- libcorosync_common:hdb_error_<u></u>to_cs() = 1<br>
/3@3:     -&gt; libqb:qb_hdb_handle_get()<br>
/3@3:     &lt;- libqb:qb_hdb_handle_get() = 0<br>
/3@3:     -&gt; libcorosync_common:hdb_error_<u></u>to_cs()<br>
/3@3:     &lt;- libcorosync_common:hdb_error_<u></u>to_cs() = 1<br>
/3@3:     -&gt; libqb:qb_ipcc_connect()<br>
/3: so_socket(PF_UNIX, SOCK_STREAM, 0, 0x00000000, SOV_DEFAULT) = 8<br>
/3: fcntl(8, F_GETFD, 0x00000000)           = 0<br>
/3: fcntl(8, F_SETFD, 0x00000001)           = 0<br>
/3: fcntl(8, F_SETFL, FNONBLOCK)            = 0<br>
/3: connect(8, 0xFE67C13A, 21, SOV_DEFAULT)     = 0<br>
/3: sigaction(SIGPIPE, 0xFE67C0E0, 0xFE67C140)  = 0<br>
/3: send(8, &quot;FFFFFFFF\0\0\0\018\0\0\0&quot;.., 24, 0)    = 24<br>
/3: sigaction(SIGPIPE, 0xFE67C0E0, 0x00000000)  = 0<br>
/3: sigaction(SIGPIPE, 0xFE67C0D0, 0xFE67C130)  = 0<br>
/3: recv(8, 0xFE67C210, 3112, 64)           Err#11 EAGAIN<br>
</blockquote>
<br></div>
this ^ is the client returngin EAGAIN on the socket...<br>
the problem is probably on the server.</blockquote><div><br></div><div>on server side i also see strange case:</div><div><br></div><div>if i try to run a corosync-* tool, then the tool returned required info, but on server side i see &quot;File not found&quot; error. I see that the corosync daemon tries to do something with /proc/&lt;client_pid&gt; file:</div>
<div><br></div><div>an example:</div><div><br></div><div>......... [QB    ] recv from client connection failed (10656-12155-22): No such file or directory (2)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
/3: sigaction(SIGPIPE, 0xFE67C0D0, 0x00000000)  = 0<br>
/3: shutdown(8, SHUT_RDWR, SOV_DEFAULT)     = 0<br>
/3: close(8)                    = 0<br>
/3@3:     &lt;- libqb:qb_ipcc_connect() = 0<br>
/3@3:     -&gt; libcorosync_common:qb_to_cs_<u></u>error()<br>
/3@3:     &lt;- libcorosync_common:qb_to_cs_<u></u>error() = 12<br>
/3@3:     -&gt; libqb:qb_hdb_handle_put(<u></u>0xfe9f3070, 0x0, 0xb86775, 0xfe67ce7c)<br>
/3@3:     &lt;- libqb:qb_hdb_handle_put() = 0<br>
/3@3:     -&gt; libqb:qb_hdb_handle_destroy(<u></u>0xfe9f3070, 0x0, 0xb86775, 0x0)<br>
/3@3:       -&gt; libqb:qb_ipcc_disconnect(0x0, 0x8835b88, 0x0, 0x1)<br>
/3@3:       &lt;- libqb:qb_ipcc_disconnect() = 0<br>
/3@3:     &lt;- libqb:qb_hdb_handle_destroy() = 0<br>
/3@3:   &lt;- libvotequorum:votequorum_<u></u>initialize() = 12<br>
<br>
As you can see it returns CS_ERR_NOT_EXIST.<br>
<br>
same behaviour with CMAP and another services.<br>
<br>
Any ideas?<br>
</blockquote>
<br></div>
Can you turn on debug in corosync.conf and to_stderr<br>
logging {<br>
to_stderr: yes<br>
debug: on<br>
}<br>
and run corosync like this:<br>
&quot;sudo corosync -f&quot;<br>
<br>
then in another window run:<br>
./tests/testcpg<br>
<br>
then type a couple of words (any junk) - testcpg should send what ever<br>
is typed to corosync. Then Ctrl-C to end.<br>
<br>
Can you send the contents of both shells so I can see what both the<br>
client and server are doing?<br></blockquote><div><br></div><div>CLIENT:</div><div><br></div><div><div>$ sudo ./testcpg</div><div>Type EXIT to finish</div><div>Local node id is ac12fe0a</div><div>membership list</div><div>
nza4-devel:20446 2013-04-02 10:43:38.902</div><div>ConfchgCallback: group &#39;GROUP&#39;</div><div>Local node id is <a href="http://10.254.18.172/ac12fe0a">10.254.18.172/ac12fe0a</a> result 1</div><div>joined node/pid -1408041462/20446 reason: 1</div>
<div>nodes in group now 1</div><div>node/pid -1408041462/20446</div><div><br></div><div>nza4-devel:20446 2013-04-02 10:43:38.904</div><div>TotemConfchgCallback: ringid (2886925834.156)</div><div>active processors 1: -1408041462</div>
<div>param param param param</div><div>nza4-devel:20446 2013-04-02 10:44:07.682</div><div>DeliverCallback: message (len=25)from node/pid -1408041462/20446: &#39;param param param param</div><div>&#39;</div></div><div><br>
</div><div><br></div><div>SERVER:</div><div><br></div><div>see attached file or <a href="http://pastie.org/7276133">http://pastie.org/7276133</a></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
-Angus<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks.<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<u></u>_________________<br>
quarterback-devel mailing list<br>
<a href="mailto:quarterback-devel@lists.fedorahosted.org" target="_blank">quarterback-devel@lists.<u></u>fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/quarterback-devel" target="_blank">https://lists.fedorahosted.<u></u>org/mailman/listinfo/<u></u>quarterback-devel</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
quarterback-devel mailing list<br>
<a href="mailto:quarterback-devel@lists.fedorahosted.org" target="_blank">quarterback-devel@lists.<u></u>fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/quarterback-devel" target="_blank">https://lists.fedorahosted.<u></u>org/mailman/listinfo/<u></u>quarterback-devel</a><br>
</blockquote></div><br>