herlesupreeth / docker_open5gs

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker
BSD 2-Clause "Simplified" License
320 stars 179 forks source link

SCTP issue during registration testing with UERANSIM #344

Closed ajaydas03 closed 2 months ago

ajaydas03 commented 3 months ago

Hi,

Can anyone help me with below issue ..i am getting this error while doing the "Registration" Testing with UERANSIM

root@f16fe841440e:/UERANSIM/build# ./nr-gnb -c /UERANSIM/config/open5gs-gnb.yaml UERANSIM v3.2.6 [2024-08-02 13:48:27.258] [rls-udp] [error] RLS failure [Socket bind failed: Address already in use] [2024-08-02 13:48:27.259] [sctp] [info] Trying to establish SCTP connection... (192.168.10.213:38412) [2024-08-02 13:48:27.260] [gtp] [error] GTP/UDP task could not be created. Socket bind failed: Address already in use [2024-08-02 13:48:27.276] [sctp] [info] SCTP connection established (192.168.10.213:38412) [2024-08-02 13:48:27.277] [sctp] [debug] SCTP association setup ascId[276045] [2024-08-02 13:48:27.277] [ngap] [debug] Sending NG Setup Request [2024-08-02 13:48:27.309] [ngap] [debug] NG Setup Response received [2024-08-02 13:48:27.309] [ngap] [info] NG Setup procedure is successful [2024-08-02 13:48:30.985] [sctp] [warning] Unhandled SCTP notification received [2024-08-02 13:48:32.009] [sctp] [warning] Unhandled SCTP notification received ^Croot@f16fe841440e:/UERANSIM/build# ^C

changes in open5gs-gnb.yaml file are host ip and sd value.

root@f16fe841440e:/UERANSIM/config# cat open5gs-gnb.yaml

mcc: '001'          # Mobile Country Code value
mnc: '01'          # Mobile Network Code value (2 or 3 digits)

nci: '0x000000010'  # NR Cell Identity (36-bit)
idLength: 32        # NR gNB ID length in bits [22...32]
tac: 1              # Tracking Area Code

linkIp: 172.22.0.23   # gNB's local IP address for Radio Link Simulation (Usually same with local IP)
ngapIp: 172.22.0.23   # gNB's local IP address for N2 Interface (Usually same with local IP)
gtpIp: 172.22.0.23    # gNB's local IP address for N3 Interface (Usually same with local IP)

# List of AMF address information
amfConfigs:
  - address: **192.168.10.213**
    port: 38412

# List of supported S-NSSAIs by this gNB
slices:
  - sst: 1
    **sd: 000001**

# Indicates whether or not SCTP stream number errors should be ignored.
ignoreStreamIds: true

root@f16fe841440e:/UERANSIM/config#

herlesupreeth commented 3 months ago

First, please describe your setup. Are you running 5GC + UERANSIM in the same machine/VM or on different machines/VM?

[2024-08-02 13:48:27.258] [rls-udp] [error] RLS failure [Socket bind failed: Address already in use] [2024-08-02 13:48:27.259] [sctp] [info] Trying to establish SCTP connection... (192.168.10.213:38412) [2024-08-02 13:48:27.260] [gtp] [error] GTP/UDP task could not be created. Socket bind failed: Address already in use

It looks like UERANSIM was not able to bind the UDP port 2152 for N3 interface. So there is another entity which is using that port

You can check that by executing the command on UERANSIM machine sudo netstat -tupln | grep 2152

ajaydas03 commented 3 months ago

Hi Supureeth,

Yes, 5GC and UERANSIM both are running in same VM.

I had issue with SCTP as well like GTP for that we made changes in "open5gs-gnb.yaml" file are host IP & SD value. post changing SCTP problem solved. (i described in my first post)

herlesupreeth commented 3 months ago

I had issue with SCTP as well like GTP for that we made changes in "open5gs-gnb.yaml" file are host IP & SD value. post changing SCTP problem solved. (i described in my first post)

Usually you dont need to modify those files even for SCTP issue

Can you post a pcap when you bring up the 5GC and connect the gNB?

ajaydas03 commented 3 months ago

Hi Supreeth,

Please find the PCAP and logs below.

openshift@openshift:~$ sudo netstat -tupln | grep 2152 udp 0 0 0.0.0.0:2152 0.0.0.0: 232148/docker-proxy udp6 0 0 :::2152 ::: 232155/docker-proxy openshift@openshift:~$

Error:

root@f16fe841440e:/UERANSIM/build# . /nr-gnb -c /UERANSIM/config/open5gs-gnb.yaml UERANSIM v3.2.6 [2024-08-06 11:54:24.064] [rls-udp] [error] RLS failure [Socket bind failed: Address already in use] [2024-08-06 11:54:24.066] [sctp] [info] Trying to establish SCTP connection... (172.22.0.10:38412) [2024-08-06 11:54:24.066] [gtp] [error] GTP/UDP task could not be created. Socket bind failed: Address already in use

sctp100pcap.txt

herlesupreeth commented 3 months ago

Please remove all the modification you have done to docker_open5gs repo and run it as it is. Since you are running all in one machine you dont need any modification

ajaydas03 commented 3 months ago

Hi Supreeth,

Thanks for your support!!

Even though i reverted all changes still having the same issue. For trial i installed the UERANSIM on base machine (not container) and tested the registration and PDU session for 5G SA and no issue found. but concern is i have deployed 5G SA core nodes with the help of sa-deploy.yaml but now i have to test the voice call from UE for that i need to deploy the IMS core node only but from the "4g-volte-deploy.yaml" deploying the 4G EPC node + IMS + UPF+SMF etc.

Can you help to share the yaml file which can help to deploy the IMS nodes only like I/P/S CSCF and HSS & rtpengine, DNS etc.

I tried below modification in same yaml file, but it did not work.

version: '3' services: hss: image: docker_open5gs container_name: hss env_file: