<p></p>
<h3>Description</h3>
<p>ndb_redis is treating MOVED reply from redis cluster as error and breaking out even before the cluster handling code gets a chance to process this.</p>
<pre><code> if(rpl->rplRedis->type == REDIS_REPLY_ERROR) {
                LM_ERR("Redis error:%.*s\n",
                        (int)rpl->rplRedis->len, rpl->rplRedis->str);
                goto error_exec;
        }

        if (check_cluster_reply(rpl->rplRedis, &rsrv)) {
                ...
        }
</code></pre>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Setup a redis cluster with at least 2 nodes.<br>
Set modparam cluster=1 and allow_dynamic_nodes=1<br>
fire redis get commands</p>
<h4>Log Messages</h4>
<pre><code>ERROR: ndb_redis [redis_client.c:1037]: redisc_exec(): Redis error:MOVED 1090 10.4.20.69:6379
</code></pre>
<h3>Possible Solutions</h3>
<p>revert <a class="commit-link" href="https://github.com/kamailio/kamailio/commit/d00b14704805d728f5a845a6af900eff1ed372ac#diff-812f223c66f926088d3aa98c36d96b92"><tt>d00b147</tt>#diff-812f223c66f926088d3aa98c36d96b92</a><br>
or<br>
Add another check to ignore the above logic if cluster support is enabled.<br>
or<br>
Do not treat MOVED replies as of type REDIS_REPLY_ERROR</p>
<h3>Additional Information</h3>
<pre><code>kamailio built from branch 5.4.1
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2461">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMNO5RDNYJVDPIJ6R3SDU7E7ANCNFSM4QSBYYIA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZK6IYAVB2KLXLLMBHLSDU7E7A5CNFSM4QSBYYIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KJGGELA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2461",
"url": "https://github.com/kamailio/kamailio/issues/2461",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>