<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">Trying to get NATS module working but Kamailio is refusing to start.</p>
<pre class="notranslate"><code class="notranslate">Sep 27 23:08:27 server kernel: kamailio[338880]: segfault at 70 ip 00007fe97b06f1cc sp 00007fff72d158f0 error 4 in libuv.so.1.0.0[7fe97b066000+1f000]
Sep 27 23:08:27 server kernel: Code: 5a 85 ff ff b8 ea ff ff ff c3 0f 1f 40 00 f3 0f 1e fa 8b 4e 30 83 f9 ff 0f 84 80 00 00 00 48 83 ec 08 85 c9 0f 88 90 00 00 00 <3b> 4f 70 73 45 f7 d2 21 56 28 48 8d 4e 18 48 89 f0 48 8b 76 18 75
Sep 27 23:08:27 server systemd[1]: Started Process Core Dump (PID 338886/UID 0).
</code></pre>
<h4 dir="auto">Log Messages</h4>
<p dir="auto">In the log message I'm getting the following error:</p>
<pre class="notranslate"><code class="notranslate">INFO: nats [nats_mod.c:437]: nats_init_connection(): adding server [nats://192.168.1.1:4222] [1]
ERROR: nats [nats_mod.c:456]: nats_init_connection(): could not create nats options [System Error]
</code></pre>
<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li><strong>Kamailio Version</strong> - output of <code class="notranslate">kamailio -v</code></li>
</ul>
<pre class="notranslate"><code class="notranslate">(version: kamailio 5.6.1 (x86_64/linux) 34e6dd)
</code></pre>
<p dir="auto">NATS Server version:</p>
<pre class="notranslate"><code class="notranslate">nats-server: v2.9.0
</code></pre>
<p dir="auto">libnats version:</p>
<pre class="notranslate"><code class="notranslate">libnats.so.3.4.0
</code></pre>
<ul dir="auto">
<li><strong>Operating System</strong>:</li>
</ul>
<pre class="notranslate"><code class="notranslate">CentOS Stream 9 
5.14.0-163.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 8 13:52:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>
<ul dir="auto">
<li><strong>Module Configuration</strong>:</li>
</ul>
<pre class="notranslate"><code class="notranslate">loadmodule  "nats.so"
modparam("nats", "nats_url", "nats://192.168.1.1:4222")
</code></pre>
<p dir="auto">There is no issue at the network/firewall level as by using telnet I'm able to connect to the NATS server successfully.<br>
What is weird is that with tcpdump I can't see even attempts to connect to the NATS server.</p>

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