<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
priority 0 should result in not using the connection, so the source
code has to be checked for proper analysis.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 8/22/13 10:48 PM, Charles Chance
wrote:<br>
</div>
<blockquote
cite="mid:CAOvxgzA8S15KNm6Zdr5Vyo=gkHZw-CoD1u1tFBOfuRXOCs1scQ@mail.gmail.com"
type="cite">
<p dir="ltr">Hello,</p>
<p dir="ltr">Is anyone able to confirm whether the cluster
definition I provided should indeed do what I think it should?
If so, I will take a look further myself to find the reason why
not.</p>
<p dir="ltr">Thanks in advance,</p>
<p dir="ltr">Charles</p>
<div class="gmail_quote">On 20 Aug 2013 16:18, "Charles Chance"
<<a moz-do-not-send="true"
href="mailto:charles.chance@sipcentric.com">charles.chance@sipcentric.com</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi All,
<div><br>
</div>
<div>I'm having difficulties with the above module and can't
see what I'm doing wrong.</div>
<div><br>
</div>
<div>Config as follows:</div>
<div><br>
</div>
<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
modparam("db_cluster", "connection", "db01=>mysql://<a
moz-do-not-send="true"
href="http://readwrite:password@db01.domain.com/kamailio"
target="_blank">readwrite:password@db01.domain.com/kamailio</a>")<br>
modparam("db_cluster", "connection", "db02=>mysql://<a
moz-do-not-send="true"
href="http://readonly:password@db02.domain.com/kamailio"
target="_blank">readonly:password@db02.domain.com/kamailio</a>")<br>
modparam("db_cluster", "cluster",
"cls1=>db01=0s9s;db02=9s0s")</blockquote>
</div>
<div><br>
</div>
<div><br>
</div>
<div>As you can see, there are two database servers - a
master and a slave. I am trying to force all read
operations to the slave (db02) and all write operations to
the master (db01).</div>
<div><br>
</div>
<div>Unless I am missing the point, the above priorities
should achieve the desired effect. However, it seems to be
going wrong somewhere as write operations are being sent
to the slave:</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">ERROR:
db_mysql [km_dbase.c:122]: driver error on query: DELETE
command denied to user 'readonly'@'x.x.x.x' for table
'location'<br>
</blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">ERROR:
db_mysql [km_dbase.c:122]: driver error on query: UPDATE
command denied to user 'readonly'@'x.x.x.x' for table
'location'<br>
ERROR: db_mysql [km_dbase.c:122]: driver error on query:
INSERT command denied to user 'readonly'@'x.x.x.x' for
table 'location' </blockquote>
<div><br>
</div>
<div>It is the same for all modules, by the way, not just
usrloc. For each module, I have db_url set to
"cluster://cls1".</div>
<div><br>
</div>
<div>If I change the cluster definition to
"cls1=>db01=9s9s;db02=0s0s", all operations (read and
write) are sent to db01 as expected.</div>
<div><br>
</div>
<div>Am I missing something here? Can anyone see what I may
be doing wrong?</div>
<div><br>
</div>
<div>Many thanks,</div>
<div><br>
</div>
<div>Charles</div>
<div><br>
</div>
<div>
</div>
</div>
</blockquote>
</div>
<br>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span
style="font-size:10pt"><a moz-do-not-send="true"
href="http://www.sipcentric.com/"
title="blocked::http://www.sipcentric.com/"
target="_blank">www.sipcentric.com</a><br>
<br>
Follow us on twitter <a moz-do-not-send="true"
href="http://twitter.com/sipcentric"
title="blocked::http://twitter.com/sipcentric"
target="_blank">@sipcentric</a><br>
<br>
<font color="gray">Sipcentric Ltd. Company registered in
England & Wales no. 7365592.</font> <font color="gray">Registered
office: Unit 10 iBIC, Birmingham Science Park, Holt Court
South, Birmingham B7 4EJ.</font></span></font></font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
</pre>
</body>
</html>