Hello,
I got some debug info using the truss as below, hope it can provide some info why it
reports "invalid argument" error.
Any suggestions are greatly appreciated.
======explanation for the EINVAL of writew() =======
The write() and writev() functions may fail if:
EINVAL
The STREAM or multiplexer referenced by fildes is linked (directly or indirectly)
downstream from a multiplexer.
==============truss info ===================
3673: sendto(6, " I N V I T E s i p : 0".., 938, 0, 0xFFFFFFFF779E44C8, 16)
= 938
3681: Received signal #14, SIGALRM, in pause() [caught]
3681: pause() Err#4 EINTR
3681: lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3681: setcontext(0xFFFFFFFF7FFFE890)
3675: recvfrom(6, " S I P / 2 . 0 1 0 0 ".., 65535, 0, 0x1004438E8,
0xFFFFFFFF7FFFF44C) = 591
3681: Received signal #14, SIGALRM, in pause() [caught]
3681: pause() Err#4 EINTR
3681: lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3681: setcontext(0xFFFFFFFF7FFFE890)
3677: recvfrom(6, " S I P / 2 . 0 1 8 0 ".., 65535, 0, 0x1004438E8,
0xFFFFFFFF7FFFF44C) = 641
3677: sendto(6, " S I P / 2 . 0 1 8 0 ".., 583, 0, 0xFFFFFFFF779E4420, 16)
= 583
3671: recvfrom(6, " S I P / 2 . 0 2 0 0 ".., 65535, 0, 0x100443798,
0xFFFFFFFF7FFFF44C) = 943
3671: pollsys(0xFFFFFFFF7FFFDCF0, 1, 0xFFFFFFFF7FFFDBC0, 0x00000000) = 0
3671: writev(4, 0xFFFFFFFF7FFFDF60, 18) Err#22 EINVAL
3671: write(2, " 1 (", 3) = 3
3671: write(2, " 3 6 7 1", 4) = 4
3671: write(2, " ) ", 2) = 2
3671: write(2, " E R R O R", 5) = 5
3671: write(2, " : ", 2) = 2
3671: write(2, " n a t h e l p e r [ n".., 30) = 30
3671: write(2, " c a n ' t s e n d c".., 35) = 35
3671: write(2, " I n v a l i d a r g u".., 16) = 16
3671: write(2, " / 2 2", 3) = 3
3671: write(2, " ) [ s o c k ", 8) = 8
3671: write(2, " 4 ( 0", 4) = 4
3671: write(2, " ) , v c n t ", 8) = 8
3671: write(2, " 1 8 ]\n", 4) = 4
3671: write(2, " 1 (", 3) = 3
3671: write(2, " 3 6 7 1", 4) = 4
3671: write(2, " ) ", 2) = 2
3671: write(2, " E R R O R", 5) = 5
3671: write(2, " : ", 2) = 2
3671: write(2, " n a t h e l p e r [ n".., 30) = 30
3671: write(2, " p r o x y <", 7) = 7
3671: write(2, " u d p : 2 1 0 . 1 3 . 1".., 22) = 22
3671: write(2, " > d o e s n o t r".., 31) = 31
3671: write(2, " 1 (", 3) = 3
3671: write(2, " 3 6 7 1", 4) = 4
3671: write(2, " ) ", 2) = 2
3671: write(2, " E R R O R", 5) = 5
3671: write(2, " : ", 2) = 2
3671: write(2, " n a t h e l p e r [ n".., 30) = 30
3671: write(2, " n o a v a i l a b l e".., 21) = 21
3671: sendto(6, " S I P / 2 . 0 2 0 0 ".., 885, 0, 0xFFFFFFFF779E4420, 16)
= 885
3671: time() = 1283059383
3671: write(2, " 1 (", 3) = 3
3671: write(2, " 3 6 7 1", 4) = 4
3671: write(2, " ) ", 2) = 2
3671: write(2, " N O T I C E", 6) = 6
3671: write(2, " : ", 2) = 2
3671: write(2, " a c c [ a c c . c : 2".., 17) = 17
3671: write(2, " A C C : t r a n s a c".., 27) = 27
3671: write(2, " t i m e s t a m p =", 10) = 10
3671: write(2, " 1 2 8 3 0 5 9 3 8 3", 10) = 10
3681: Received signal #14, SIGALRM, in pause() [caught]
3671: write(2, " ; m e t h o d = I N V I".., 247) = 247
3681: pause() Err#4 EINTR
3681: lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3681: setcontext(0xFFFFFFFF7FFFE890)
3681: Received signal #14, SIGALRM, in pause() [caught]
3681: pause() Err#4 EINTR
3681: lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3681: setcontext(0xFFFFFFFF7FFFE890)
3681: Received signal #14, SIGALRM, in pause() [caught]
3681: pause() Err#4 EINTR
3681: lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3681: setcontext(0xFFFFFFFF7FFFE890)
3681: Received signal #14, SIGALRM, in pause() [caught]
3681: pause() Err#4 EINTR
3681: lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3681: setcontext(0xFFFFFFFF7FFFE890)
3681: Received signal #14, SIGALRM, in pause() [caught]
3681: pause() Err#4 EINTR
3681: lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3681: setcontext(0xFFFFFFFF7FFFE890)
3677: recvfrom(6, " A C K s i p : 0 2 1 6".., 65535, 0, 0x1004438E8,
0xFFFFFFFF7FFFF44C) = 736
3677: sendto(6, " A C K s i p : 0 2 1 6".., 769, 0, 0xFFFFFFFF7FFFD158, 16)
= 769
3681: Received signal #14, SIGALRM, in pause() [caught]
=====end ============
=====kamalio log =======
9(3687) INFO: nathelper [nathelper.c:2369]: rtp proxy <udp:210.13.x.y:7722> found,
support for it enabled
1(3671) ERROR: nathelper [nathelper.c:2457]: can't send command to a RTP proxy
(Invalid argument/22) [sock 4 (0), vcnt 18]
1(3671) ERROR: nathelper [nathelper.c:2492]: proxy <udp:210.13.x.y:7722> does not
respond, disable it
1(3671) ERROR: nathelper [nathelper.c:3144]: no available proxies
===================
Thanks,
Kevin
From: kevin.jzh(a)hotmail.com
To: miconda(a)gmail.com; sr-users(a)lists.sip-router.org
Subject: RE: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
Date: Thu, 19 Aug 2010 21:34:44 +0800
Hello,
I'm not familiar with coding, however attached is the man for the writev on the
system. Help this can provide some additional information.
Thanks,
Kevin
Date: Wed, 18 Aug 2010 19:50:24 +0200
From: miconda(a)gmail.com
To: kevin.jzh(a)hotmail.com; sr-users(a)lists.sip-router.org
Subject: Re: [SR-Users] Kamailio 3.0 cann't access the RTPProxy
On 8/17/10 7:14 PM, KevinJin wrote:
Hello Daniel,
What does the nathelper error messages mean?
==========
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]
can you check the manual page for writev on your system to see what are possible reasons
for 'Invalid argument' error (error code 22)? The values in between [...] are just
some debug values I wanted to see, not error codes or so.
Cheers,
Daniel
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
Thanks,
Kevin
From: kevin.jzh(a)hotmail.com
To: miconda(a)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(a)gmail.com
To: kevin.jzh(a)hotmail.com
CC: sr-users(a)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(a)gmail.com
To: kevin.jzh(a)hotmail.com
CC: sr-users(a)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(a)gmail.com
To: kevin.jzh(a)hotmail.com
CC: sr-users(a)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
Test env:
UA1 (Behind NAT) --------> Kamailio & RTPproxy (Public IP) --------->UA2
(Public IP)
Thanks,
Kevin
Cheers,
Daniel
0(27429) ERROR: nathelper [nathelper.c:2492]: proxy <udp:210.13.124.15:7722> does
not respond, disable it
There's no problem for the resource(CPU, mem etc.) on the server, the load is very
low.
Thanks in advance!
----------
0(27429) DEBUG: nathelper [nhelpr_funcs.c:148]: type <application/sdp> found valid
0(27429) ERROR: nathelper [nathelper.c:3144]: no available proxies
0(27429) ERROR: nathelper [nathelper.c:2627]: no available proxies
0(27429) DEBUG: nathelper [nhelpr_funcs.c:148]: type <application/sdp> found valid
0(27429) INFO: nathelper [nathelper.c:2369]: rtp proxy <udp:210.13.124.15:7722>
found, support for it re-enabled
0(27429) DEBUG: nathelper [nathelper.c:3196]: proxy reply: 42040 210.13.124.14
0(27429) DEBUG: nathelper [nhelpr_funcs.c:148]: type <application/sdp> found valid
0(27429) ERROR: nathelper [nathelper.c:2457]: can't send command to a RTP proxy
0(27429) ERROR: nathelper [nathelper.c:2492]: proxy <udp:210.13.124.15:7722> does
not respond, disable it
0(27429) ERROR: nathelper [nathelper.c:3144]: no available proxies
0(27429) ERROR: nathelper [nathelper.c:2627]: no available proxies
Thanks,
Kevin
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://www.asipto.com/
--
Daniel-Constantin Mierla
http://www.asipto.com/
--
Daniel-Constantin Mierla
http://www.asipto.com/
--
Daniel-Constantin Mierla
http://www.asipto.com/