[SR-Users] Kamailio 3.0 cann't access the RTPProxy

KevinJin kevin.jzh at hotmail.com
Tue Sep 7 13:25:45 CEST 2010


Hello Daniel,
 
Thanks for your suggestion.
I  search on the net and find there's some limits on the Solaris in the limits.h:

#define _XOPEN_IOV_MAX  16      /* max # iovec/process with readv()/writev() */
#define _XOPEN_NAME_MAX 255     /* max # bytes in filename excluding null */
#define _XOPEN_PATH_MAX 1024    /* max # bytes in a pathname */
#define IOV_MAX         _XOPEN_IOV_MAX

And 
The writev() function may fail if:
     EINVAL    The iovcnt argument was less than or equal to 0 or
               greater  than {IOV_MAX}; one of the iov_len values
               in the iov array was negative; or the sum  of  the
               iov_len  values  in  the  iov  array overflowed an
               ssize_t.

can't send command to a RTP proxy (Invalid argument/22) [sock 7 (0), vcnt 18]

Does it mean the iovcnt is bigger than 16 in our case?  
 
If this is the case, could you suggest how should I modify the nathelper.c?
 
Thanks,
Kevin
 


Date: Mon, 30 Aug 2010 12:25:37 +0200
From: miconda at gmail.com
To: kevin.jzh at hotmail.com
CC: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy


Hello,

On 8/26/10 7:18 PM, KevinJin wrote: 


Hello,
 
May I have any comments on the issue? 
It blocks the application for monthes.

if you are in a hurry, then maybe you can find a consultant. The public mailing list is best effort, many of us having other jobs/travelings/vacations, and cannot guarantee a solution in a given time. Besides, your deployment is particular, running solaris, which may require to get access to fix it.

I looked over the log udp_rtpproxy_log and rtpproxy is found at start up (pids: 24610, ...). Then one of the processes (24613, line 1462) can communicate fine with it for an INVITE. The second process gets the error (24613, line 1630). I assume it may have to do something with the limits of your system. Are there any limits on writev() or UDP on solaris? Not being is solaris devel, maybe you can find someone else to answer if you don't know.
 


Cheers,
Daniel


 
Thanks,
Kevin
 


From: kevin.jzh at hotmail.com
To: miconda at gmail.com; sr-users at lists.sip-router.org
Subject: RE: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
Date: Thu, 19 Aug 2010 21:24:45 +0800




 Hi Daniel,
 
Attached please find the logs in zip.
thanks for the help.
 
BR
Kevin


Date: Wed, 18 Aug 2010 19:14:05 +0200
From: miconda at gmail.com
To: kevin.jzh at hotmail.com; sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy

Hello,

apart of the email with logs, or private data that was required, please continue the discussion on public mailing list.

I need some time to check the logs, the first inconvenience is the rar archive, a zip or tgz is much better -- not a fan of installing binaries from unknown companies on mac os x, going to get unrar from macports. Then solaris is not an OS i have at hand nor use frequently, so need to read about. It is also why using mailing list keeps you in touch with others that can help.

Cheers,
Daniel

On 8/18/10 7:04 PM, KevinJin wrote: 


Hi Daniel,
 
Does the logs have any hint for what's cause of the issue? I didn't include the user list in the previous email since logs have the actual IP info.
 
Thanks in advance!
 
Best Regard
Kevin
 


From: kevin.jzh at hotmail.com
To: miconda at gmail.com
Subject: RE: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
Date: Tue, 17 Aug 2010 18:51:02 +0800




 Hi Daniel,
 
Attached are the two kamailio logs, 
unix_socket_log     --- run rtp proxy wth -s unix:/tmp/rtpproxy.sock
udp_rtpproxy_log   --- run rtp proxy with -s udp:*:7722
 
Please help to check what's wrong with it.
 
Thanks,
Kevin


Date: Tue, 17 Aug 2010 11:29:46 +0200
From: miconda at gmail.com
To: kevin.jzh at hotmail.com
CC: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy

Hello,

please send full log at startup, your snippets include just few lines per process, being mixed from different processes.

Cheers,
Daniel


On 8/14/10 3:54 AM, KevinJin wrote: 


Hello,
 


Date: Thu, 12 Aug 2010 22:16:18 +0200
From: miconda at gmail.com
To: kevin.jzh at hotmail.com
CC: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy

Hello,

On 8/12/10 8:34 PM, KevinJin wrote: 


Hello,
 


Date: Thu, 12 Aug 2010 18:46:19 +0200
From: miconda at gmail.com
To: kevin.jzh at hotmail.com
CC: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy

Hello,

On 8/12/10 4:47 PM, KevinJin wrote: 


Hi Daniel,
 
What does the log below means? Does it mean nathelper has issue to send the request to RTP proxy first or nathelper doesn't receive a response after sending a request to the rtp proxy?
0(27429) ERROR: nathelper [nathelper.c:2457]: can't send command to a RTP proxy
this error is printed when write to socket fails. Do you have any firewall running on the system? Is the user under which kamailio runs allowed to write to sockets? 

There's no firewall on the system, and I run the kamailio as root, 
 root 26310     1   0 02:24:19 ?           0:00 /usr/local/kamailio-3.0.2/sbin/kamailio -f /usr/local/kamailio-3.0.2/etc/kamail

You can edit module_k/nathelper/nathelper.c and replace the line 2457 with:

LM_ERR("can't send command to a RTP proxy (%s/%d)\n", strerror(errno), errno);

Recompile and reinstall. Hopefully will get more hints about what happens.

 Here is the error message after the change: 
2(26312) ERROR: nathelper [nathelper.c:2457]: can't send command to a RTP proxy(Invalid argument/22)
 2(26312) ERROR: nathelper [nathelper.c:2492]: proxy <udp:210.13.124.15:7722> does not respond, disable it
 2(26312) ERROR: nathelper [nathelper.c:3144]: no available proxies
what could be the cause?
hmm, invalid argurment ... try with this line:

LM_ERR("can't send command to a RTP proxy (%s/%d) [sock %d (%d), vcnt %d]\n",
                        strerror(errno), errno, rtpp_socks[node->idx], node->idx, vcnt);

maybe will give some hints about which value is invalid.
 
 Here's the log after the change:
4(14415) ERROR: nathelper [nathelper.c:2457]: can't send command to a RTP proxy (Invalid argument/22) [sock 7 (0), vcnt 18]
 4(14415) ERROR: nathelper [nathelper.c:2492]: proxy <udp:210.13.x.y:7722> does not respond, disable it
 4(14415) ERROR: nathelper [nathelper.c:3144]: no available proxies


Can you try as well with an unix file socket:

modparam("nathelper", "rtpproxy_sock", "unix:/tmp/rtpproxy.sock")

then start rtpproxy with -s unix:/tmp/rtpproxy.sock

 
 4(17530) INFO: nathelper [nathelper.c:2369]: rtp proxy <unix:/tmp/rtpproxy.sock> found, support for it re-enabled
 3(17529) ERROR: nathelper [nathelper.c:2429]: can't send command to a RTP proxy
 3(17529) ERROR: nathelper [nathelper.c:2492]: proxy <unix:/tmp/rtpproxy.sock> does not respond, disable it
 3(17529) ERROR: nathelper [nathelper.c:3144]: no available proxies
 
Thanks,
Kevin

I have no solaris (sparc) to try myself...

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com/
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100907/f88a519a/attachment.htm>


More information about the sr-users mailing list