<div dir="ltr">Liviu,<div><br></div><div>Thanks for your reply</div><div><br></div><div>this worked for me                 cache_raw_query(&quot;mongodb:instance1&quot;,&quot;<span class="">{ \&quot;op\&quot; : \&quot;find\&quot;,\&quot;query\&quot;: { \&quot;User\&quot; : \&quot;$rU\&quot;} }</span>&quot;,&quot;$avp(mongo_result)&quot;)<span class="">;     </span></div><div><br></div><div>The documentation is lacking the escape characters around the pseudo variables. Unless this is assumed it should be added otherwise a JSON parse error is thrown.</div><div><br></div><div>Ovidiu,</div><div><br></div><div>Thanks for the suggestions.</div><div><br></div><div>Thanks,</div><div>Tito</div>







</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 7:55 AM, Liviu Chircu <span dir="ltr">&lt;<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div><tt>Hello Tito,<br>
        <br>
        Either use the group name everywhere, or don&#39;t specify it at all
        in the modparam:<br>
        <br>
            </tt><tt>modparam(&quot;db_cachedb&quot;,&quot;cachedb_url&quot;,&quot;mongodb://localhost
        ...<br>
        or<br>
            </tt><tt>cache_raw_query(&quot;mongodb:instance1&quot; ...<br>
        <br>
        <br>
        Best regards,<br>
      </tt>
      <pre cols="72">Liviu Chircu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
      On 09/09/2014 03:11 AM, Tito Cumpen wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Ovidiu,
        <div><br>
        </div>
        <div><br>
        </div>
        <div>I have corrected the param and now I am seeing opensips
          start without a problem the query problem still persists with
          the error </div>
        <div>
          <p>/sbin/opensips[22454]:
            ERROR:core:cachedb_raw_query: failed to get connection for
            grp name []</p>
          <p>I am not seeing any attempts being made from this
            server to the my mongo instance on the ingress interface.
            Any ideas??</p>
          <p><br>
          </p>
          <p><br>
            Thanks,</p>
          <p>Tito</p>
          <p><br>
          </p>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Sep 8, 2014 at 8:01 PM, Ovidiu
          Sas <span dir="ltr">&lt;<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here&#39;s
            what works for me (I use both mongo and cache):<br>
            loadmodule &quot;cachedb_mongodb.so&quot;<br>
              modparam(&quot;cachedb_mongodb&quot;,<br>
&quot;cachedb_url&quot;,&quot;mongodb:instance1://localhost:27017/db.collection&quot;)<br>
            loadmodule &quot;db_cachedb.so&quot;<br>
             
modparam(&quot;db_cachedb&quot;,&quot;cachedb_url&quot;,&quot;mongodb:instance1://localhost:27017/db.collection&quot;)<br>
            <br>
            You have the wrong module name (cachedb_mongo vs.
            cachedb_mongodb)<br>
            <br>
            Regards,<br>
            Ovidiu Sas<br>
            <div>
              <div><br>
                On Mon, Sep 8, 2014 at 7:50 PM, Tito Cumpen &lt;<a href="mailto:tito@xsvoce.com" target="_blank">tito@xsvoce.com</a>&gt;
                wrote:<br>
                &gt; Hello Group,<br>
                &gt;<br>
                &gt;<br>
                &gt; I am perplexed about what the correct params are to
                point opensips to an<br>
                &gt; instance of mongodb<br>
                &gt;<br>
                &gt;<br>
                &gt; I am currently using these<br>
                &gt;<br>
                &gt;<br>
                &gt; loadmodule &quot;db_cachedb.so&quot;<br>
                &gt;<br>
                &gt; loadmodule &quot;cachedb_mongodb.so&quot;<br>
                &gt;<br>
                &gt;<br>
                &gt;
modparam(&quot;cachedb_mongo&quot;,&quot;cachedb_url&quot;,&quot;mongodb:instance1://162.XXX.XX.XXXX:27017/AOR.Location&quot;)<br>
                &gt;<br>
                &gt; which triggers this error<br>
                &gt;<br>
                &gt;  Parameter &lt;cachedb_url&gt; not found in module
                &lt;cachedb_mongo&gt; - can&#39;t set<br>
                &gt;<br>
                &gt; Alternatively I have tried using :<br>
                &gt;<br>
                &gt;<br>
                &gt;
modparam(&quot;db_cachedb&quot;,&quot;cachedb_url&quot;,&quot;mongodb:instance1://162.XX.XX.XX:27017/AOR.Location&quot;)<br>
                &gt;<br>
                &gt; which would cause the following error when running
                this query<br>
                &gt;<br>
                &gt;                 cache_raw_query(&quot;mongodb&quot;,&quot;{ \&quot;op\&quot;
                : \&quot;find\&quot;, \&quot;ns\&quot; :<br>
                &gt; \&quot;AOR.Location\&quot;, \&quot;query\&quot;: {\&quot;User\&quot; : $rU}
                }&quot;,&quot;$avp(mongo_result)&quot;);<br>
                &gt;<br>
                &gt;<br>
                &gt; ERROR:core:cachedb_raw_query: failed to get
                connection for grp name [}<br>
                &gt;<br>
                &gt; I am using Opensips version 1.11<br>
                &gt;<br>
                &gt; Thanks<br>
                &gt;<br>
                &gt;<br>
                &gt;<br>
              </div>
            </div>
            &gt; _______________________________________________<br>
            &gt; Users mailing list<br>
            &gt; <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
            &gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            &gt;<br>
            <span><font color="#888888"><br>
                <br>
                <br>
                --<br>
                VoIP Embedded, Inc.<br>
                <a href="http://www.voipembedded.com" target="_blank">http://www.voipembedded.com</a><br>
                <br>
                _______________________________________________<br>
                Users mailing list<br>
                <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>