<div dir="ltr">If your system is under heavy loads you can use multiple RTPProxy servers to balance the load between them. You can do this using rtpproxy_sock parameter or read RTPProxy's information from a database. Here I created a GIT repository which you can use to auto-deploy such a configuration:<br><br><a href="https://github.com/ghrst/Kamailio-HA">https://github.com/ghrst/Kamailio-HA</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 6:15 PM, Maxim Sobolev <span dir="ltr"><<a href="mailto:sobomax@sippysoft.com" target="_blank">sobomax@sippysoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That option sets RLIMIT_NOFILE, which is the maximum number of open files for this process to the specified number, i.e. 10,000 in my example. See "man setrlimit" for details.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 1:41 AM, Igor Potjevlesch <span dir="ltr"><<a href="mailto:igor.potjevlesch@gmail.com" target="_blank">igor.potjevlesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="FR"><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d">Hi Maxim,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB">There are no errors like "can't create" or "can't bind". <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB">I don't find the -L option into the manual. I'm not sure to understand what the option is used for?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB">Regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB">Igor.<u></u><u></u></span></p><p class="MsoNormal"><a name="15139f4c239709e7_15138de7f0412c84__MailEndCompose"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1f497d" lang="EN-GB"><u></u> <u></u></span></a></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">De :</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> sr-users [mailto:<a href="mailto:sr-users-bounces@lists.sip-router.org" target="_blank">sr-users-bounces@lists.sip-router.org</a>] <b>De la part de</b> Maxim Sobolev<br><b>Envoyé :</b> mardi 24 novembre 2015 06:26</span></p><div><div><br><b>À :</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>><br><b>Objet :</b> Re: [SR-Users] Kamailio/RTPProxy incorrect port 0<u></u><u></u></div></div><p></p><div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Try setting some more reasonable FD limit, i.e. say 10,000. Bumping from 1,000 to 500,000 seems somewhat excessive. You can also see if you also need to use matching -L option, there might be separate soft limit that application needs to lift by itself. In general, when session creation fails you should see any of those error messages: 10,000 is plenty, that's 2,000 sessions with 5 sockets per session. One instance is going to be CPU-limited at around 1,000 sessions with the current top CPUs and software architecture.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">            RTPP_ELOG(cf->glog, RTPP_LOG_ERR, "can't create %s socket",<u></u><u></u></p></div><div><p class="MsoNormal">              (ia->sa_family == AF_INET) ? "IPv4" : "IPv6");<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><div><div><p class="MsoNormal">                RTPP_ELOG(cf->glog, RTPP_LOG_ERR, "can't bind to the %s port %d",<u></u><u></u></p></div><div><p class="MsoNormal">                  (ia->sa_family == AF_INET) ? "IPv4" : "IPv6", port);<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I suggest checking logs around that "0" reply, There should be some clue.<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Mon, Nov 23, 2015 at 5:37 AM, Igor Potjevlesch <<a href="mailto:igor.potjevlesch@gmail.com" target="_blank">igor.potjevlesch@gmail.com</a>> wrote:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm"><p class="MsoNormal">Hello Daniel, Dirk,<br><br>I'm also seeing that these errors seems to be related to the load. Because<br>the errors are present during peak of traffic.<br><br>Many of the cases are not updates but new calls.<br>Regarding to the file descriptors : I set the limit to 500000:<br><br>Max open files            500000               500000               files<br><br><br>And if I had a look to the opened files with, globally, "lsof | grep rtppro<br>| wc -l", there is still less than 1000.<br><br>RTPProxy is already running with -d DBUG. I can see that there are update<br>which fail because the log is associated to a call handled into On Reply<br>Route.<br><br>How can be explained that the RTPProxy can't find the call? And what is the<br>impact on the call?<br><br>Regards,<br><br>Igor.<br><br>-----Message d'origine-----<br>De : sr-users [mailto:<a href="mailto:sr-users-bounces@lists.sip-router.org" target="_blank">sr-users-bounces@lists.sip-router.org</a>] De la part de<br>Daniel-Constantin Mierla<br>Envoyé : lundi 23 novembre 2015 09:33<br>À : Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>><br>Objet : Re: [SR-Users] Kamailio/RTPProxy incorrect port 0<u></u><u></u></p><div><div><p class="MsoNormal"><br>Hello,<br><br>typical reasons for this error are:<br><br>- the session is not found by rtpproxy (if it was an update command)<br>- rtpproxy run out of file descriptors (check the limits of your system<br>regarding opened files per process)<br>- some internal error of rtpproxy (see if there are errors in syslog from<br>rtpproxy, you can also run it in debug mode with -D DBUG command line<br>parameters)<br><br>Cheers,<br>Daniel<br><br>On 23/11/15 09:09, Dirk Teurlings - SIGNET B.V. wrote:<br>> I'm seeing the exact same message sometimes as well.<br>><br>> For me it seems to be tied to volume, as soon as a lot of calls are<br>> coming from an interconnect this could occur. Also, as soon as this<br>> happens both incoming and outgoing calls have audio problems.<br>><br>> My RTP instance isn't as much patched as your version, and I'm also<br>> not seeing the other INFO packages, just the 0 port error message.<br>><br>> Any insight would be appreciated.<br>> Dirk<br>><br>><br>> On 20-11-15 19:25, Igor Potjevlesch wrote:<br>>> To complete my message, each "incorrect port 0…" is preceded with the<br>>> following logs:<br>>><br>>> rtpproxy[3289]:<br>>><br><a href="mailto:INFO%3Artpp_command_ul_handle%3Aebf8863557e5c8709e46ba48c1f8f780@10.5.129.117" target="_blank">INFO:rtpp_command_ul_handle:ebf8863557e5c8709e46ba48c1f8f780@10.5.129.117</a>:<br>>><br>>> RTP packets from caller will be resized to 20 milliseconds<br>>><br>>> rtpproxy[3289]: ERR:rtpp_command_pre_parse:GLOBAL: update/create<br>>> command syntax error: invalid number of arguments (1)<br>>><br>>> I use the following version:<br>>><br>>> rtpproxy -v<br>>><br>>> Basic version: 20040107<br>>><br>>> Extension 20050322: Support for multiple RTP streams and MOH<br>>><br>>> Extension 20060704: Support for extra parameter in the V command<br>>><br>>> Extension 20071116: Support for RTP re-packetization<br>>><br>>> Extension 20071218: Support for forking (copying) RTP stream<br>>><br>>> Extension 20080403: Support for RTP statistics querying<br>>><br>>> Extension 20081102: Support for setting codecs in the update/lookup<br>>> command<br>>><br>>> Extension 20081224: Support for session timeout notifications<br>>><br>>> Extension 20090810: Support for automatic bridging<br>>><br>>> Extension 20140323: Support for tracking/reporting load<br>>><br>>> Extension 20140617: Support for anchoring session connect time<br>>><br>>> Extension 20141004: Support for extendable performance counters<br>>><br>>> Extension 20150330: Support for allocating a new port ("Un"/"Ln"<br>>> commands)<br>>><br>>> Extension 20150420: Support for SEQ tracking and new rtpa_ counters;<br>>> Q command extended<br>>><br>>> Regards,<br>>><br>>> Igor.<br>>><br>>> *De :*Igor Potjevlesch [mailto:<a href="mailto:igor.potjevlesch@gmail.com" target="_blank">igor.potjevlesch@gmail.com</a>]<br>>> *Envoyé :* vendredi 20 novembre 2015 19:09 *À :*<br>>> <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a> *Objet :* Kamailio/RTPProxy incorrect<br>>> port 0<br>>><br>>> Hello,<br>>><br>>> I can't figure out why Kamailio reports hundreds of calls with the<br>>> following error:<br>>><br>>> "/usr/local/sbin/kamailio[2997]: ERROR: rtpproxy [rtpproxy.c:2727]:<br>>> force_rtp_proxy(): incorrect port 0 in reply from rtp proxy"<br>>><br>>> It seems that each time this error occurs, we got a one-way audio call.<br>>><br>>> I already check and increase the limit for opening files that the<br>>> process can open with ulimit -n 500000. But, anyway, if I look to<br>>> /proc/$PID/fd, I never see more than 1000 files open.<br>>><br>>> I also check the socket with netstat: same; I can see the error while<br>>> there's only less than 800 sockets open.<br>>><br>>> Is someone know what can be the trigger of this?<br>>><br>>> Regards,<br>>><br>>> Igor.<br>>><br>>><br>>><br>>> _______________________________________________<br>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>>> list <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>>><br>><br>> _______________________________________________<br>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>> list <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br><br>--<br>Daniel-Constantin Mierla<br><a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>Book: SIP Routing With Kamailio - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> Kamailio Advanced<br>Training, Nov 30-Dec 2, Berlin - <a href="http://asipto.com/kat" target="_blank">http://asipto.com/kat</a><br><br><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br><br><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><u></u><u></u></p></div></div></blockquote></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p><div><div><p class="MsoNormal">Maksym Sobolyev<br>Sippy Software, Inc.<br>Internet Telephony (VoIP) Experts<br>Tel (Canada): <a href="tel:%2B1-778-783-0474" value="+17787830474" target="_blank">+1-778-783-0474</a><br>Tel (Toll-Free): <a href="tel:%2B1-855-747-7779" value="+18557477779" target="_blank">+1-855-747-7779</a><br>Fax: <a href="tel:%2B1-866-857-6942" value="+18668576942" target="_blank">+1-866-857-6942</a><br>Web: <a href="http://www.sippysoft.com" target="_blank">http://www.sippysoft.com</a><br>MSN: <a href="mailto:sales@sippysoft.com" target="_blank">sales@sippysoft.com</a><br>Skype: SippySoft<u></u><u></u></p></div></div></div></div></div></div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Maksym Sobolyev<br>Sippy Software, Inc.<br>Internet Telephony (VoIP) Experts<br>Tel (Canada): +1-778-783-0474<br>Tel (Toll-Free): +1-855-747-7779<br>Fax: +1-866-857-6942<br>Web: <a href="http://www.sippysoft.com" target="_blank">http://www.sippysoft.com</a><br>MSN: <a href="mailto:sales@sippysoft.com" target="_blank">sales@sippysoft.com</a><br>Skype: SippySoft<br></div></div>
</div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>