Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind port issue on linux & macos #661

Open
kingle-zhuang opened this issue Sep 15, 2023 · 6 comments
Open

Bind port issue on linux & macos #661

kingle-zhuang opened this issue Sep 15, 2023 · 6 comments

Comments

@kingle-zhuang
Copy link


sipp -sf sipp_invite_multiple_5m.xml -i 10.74.0.204 10.74.144.102:5070 -t un -inf multiple-m1.csv -r 5 -l 100 -m 60000 -nd -min_rtp_port 30000 -max_rtp_port 60000 -timeout 5000s -timeout_error -trace_err

eax git:(main) ✗ cat sipp_invite_multiple_5m_24223_errors.log
The following events occurred:
2023-09-15 02:55:00.223956 1694746500.223956: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:00.422672 1694746500.422672: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:00.622694 1694746500.622694: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:00.823400 1694746500.823400: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:01.023053 1694746501.023053: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:01.224201 1694746501.224201: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:10.020990 1694746510.020990: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:10.220246 1694746510.220246: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:10.422598 1694746510.422598: Could not bind port for RTP streaming after 100 tries2023-09-15 02:55:10.620187 1694746510.620187: Could not bind port for RTP streaming after 100 tries2023-09-15 02:56:22.725517 1694746582.725517: Overload warning: the minor watchdog timer 500ms has been tripped (1338), 119 trips remaining.2023-09-15 02:56:26.922995 1694746586.922995: Overload warning: the major watchdog timer 3000ms has been tripped (4197), 9 trips remaining.2023-09-15 02:58:02.937452 1694746682.937452: Overload warning: the minor watchdog timer 500ms has been tripped (1232), 118 trips remaining.2023-09-15 02:58:04.945039 1694746684.945039: Overload warning: the minor watchdog timer 500ms has been tripped (2006), 117 trips remaining.2023-09-15 03:00:09.622228 1694746809.622228: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:09.824602 1694746809.824602: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:10.025379 1694746810.025379: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:10.622841 1694746810.622841: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:10.821864 1694746810.821864: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:11.023506 1694746811.023506: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:11.222847 1694746811.222847: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:11.420912 1694746811.420912: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:11.622589 1694746811.622589: Could not bind port for RTP streaming after 100 tries2023-09-15 03:00:11.821999 1694746811.821999: Could not bind port for RTP streaming after 100 tries

how to fix?

@kingle-zhuang
Copy link
Author

[15/09 04:01:53] root@aqa01-i01-gcr04 /home/evm-mock-server/eax # ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 127953
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 655350
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[15/09 04:03:33] root@aqa01-i01-gcr04 /home/evm-mock-server/eax #

when sipp call reach to 100, also can not bind rtp any more

@kingle-zhuang
Copy link
Author

From: ;tag=[call_number] Call-ID: [call_id] CSeq: 1 INVITE Max-Forwards: 70 Contact: Content-Type: application/sdp Content-Length: [len]
        v=0
        o=root [pid] [pid] IN IP[local_ip_type] [local_ip]
        s=session
        t=0 0
        c=IN IP[local_ip_type] [local_ip]
        m=audio [media_port] RTP/AVP 0
        a=rtpmap:0 PCMU/8000
        a=ptime:20
        a=sendrecv
    ]]>
</send>

<!-- Expect "100 Trying" -->
<recv response="100" response_txn="invite" />

<!-- Expect "400 Bad Request" if Invite is invalid -->
<recv response="400" response_txn="invite" optional="true" next="ACK">
    <action>
        <assign assign_to="GOTO_ERROR" value="1" /> <!-- set a variable indicating to jump to "ERROR" label after ACK is sent -->
    </action>
</recv>

<!-- Expect "180 Ringing" -->
<!-- <recv response="180" response_txn="invite" timeout="200" /> -->

<!-- Expect "500 Server Error" if GStreamer pipeline was not created -->
<recv response="500" response_txn="invite" optional="true" next="ACK">
    <action>
        <assign assign_to="GOTO_ERROR" value="1" /> <!-- set a variable indicating to jump to "ERROR" label after ACK is sent -->
    </action>
</recv>

<!-- If GStreamer pipeline was successfully created, then "200 OK" is expected -->
<recv response="200" response_txn="invite" next="ACK"/>

<label id="ACK" />
<send ack_txn="invite" next="ERROR" test="GOTO_ERROR">
    <![CDATA[
        ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
        To: <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]
        From: <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
        Call-ID: [call_id]
        CSeq: 1 ACK
        Content-Length: 0
    ]]>
</send>
<pause milliseconds="3000"/>
<nop>
    <action>
        <exec rtp_stream="pcmu.wav,-1,0,PCMU/8000" />
    </action>
</nop>
<pause milliseconds="300000"/>
<label id="BYE" />
<send next="DONE">
    <![CDATA[
        BYE sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
        To: <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]
        From: <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
        Call-ID: [call_id]
        CSeq: 3 BYE
        Content-Length: 0
    ]]>
</send>
<recv response="200" timeout="500" />

<!-- trick to force return with error code since EXIT method does not exist and therefore is never going to be received -->
<label id="ERROR" />
<recv request="EXIT" timeout="200" />

<label id="DONE" />

@kingle-zhuang
Copy link
Author

kingle-zhuang commented Sep 15, 2023

------------------------------ Scenario Screen -------- [1-9]: Change Screen --
Call rate (length) Port Total-time Total-calls Remote-host
5.0(0 ms)/1.000s 5060 4999.99 s 1700 10.74.144.102:5070(UDP)

command wants to run 60000 calls, but only run 1700 then stopped

@bayroncalderon
Copy link

Looks like this would be the fix #635

@lemenkov
Copy link
Member

Please check the latest master branch and report if PR #635 indeed fixed this issue

@chrisnormand
Copy link

chrisnormand commented Apr 6, 2024

I got the same issue on macos Sonoma 14.1.
It seems that when you use IP4, there is an issue in the bind command because it uses the size of socket_storage by default (which seems to be too large for IP4).

bind(rtpsocket, (sockaddr)&address, sizeof(address)) ` gives "Invalid argument" when using IP4 address

bind(rtpsocket, (sockaddr)&address, sizeof(struct sockaddr_in)) works with IP4.

I guess a test should be added to adapt size argument before the binding call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants