UERANSIM issue with Free5gc lab - GTP/UDP task could not be created. Socket bind failed

We are facing one error in UERANSIM in our Free5gc lab while running nr-gnb.
error [2022-06-08 12:03:25.940] [gtp] [error] GTP/UDP task could not be created. Socket bind failed: Address already in use

See error detail message below. After nr-ue execution, PDU gets establish but UE is not able to reach internet and we Have also noticed that after some time gNB process crashes too. We also see two sctp connections established though we created one only,
Logs shared below We have reinstalled UERANSIM , gtp5g and restarted free5gc too but still issue is there.

While we are connecting with real gNB with this same free5gc, our real UE is working fine. So when connected to actual RAN things are working as expected, this is happening only in case of simulator

./nr-gnb -c …/config/free5gc-gnb.yaml &

root@free5gc-vm:/home/ubuntu/LMF_Test/UERANSIM/build# UERANSIM v3.2.4
[2022-06-08 10:22:30.206] [sctp] [info] Trying to establish SCTP connection… (10.161.4.192:38412)
[2022-06-08 10:22:30.206] [gtp] [error] GTP/UDP task could not be created. Socket bind failed: Address already in use
[2022-06-08 10:22:30.207] [sctp] [info] SCTP connection established (10.161.4.192:38412)
[2022-06-08 10:22:30.208] [sctp] [debug] SCTP association setup ascId[9]
[2022-06-08 10:22:30.208] [ngap] [debug] Sending NG Setup Request
[2022-06-08 10:22:30.209] [ngap] [debug] NG Setup Response received
[2022-06-08 10:22:30.209] [ngap] [info] NG Setup procedure is successful

./nr-ue -c …/config/free5gc-ue.yaml &

[2022-06-08 12:03:38.121] [nas] [info] UE switches to state [MM-DEREGISTERED/PLMN-SEARCH]
[2022-06-08 12:03:38.122] [rrc] [debug] UE[1] new signal detected
[2022-06-08 12:03:38.122] [rrc] [debug] New signal detected for cell[1], total [1] cells in coverage
[2022-06-08 12:03:38.122] [nas] [info] Selected plmn[001/01]
[2022-06-08 12:03:38.122] [rrc] [info] Selected cell plmn[001/01] tac[100] category[SUITABLE]
[2022-06-08 12:03:38.122] [nas] [info] UE switches to state [MM-DEREGISTERED/PS]
[2022-06-08 12:03:38.122] [nas] [info] UE switches to state [MM-DEREGISTERED/NORMAL-SERVICE]
[2022-06-08 12:03:38.122] [nas] [debug] Initial registration required due to [MM-DEREG-NORMAL-SERVICE]
[2022-06-08 12:03:38.128] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2022-06-08 12:03:38.128] [nas] [debug] Sending Initial Registration
[2022-06-08 12:03:38.128] [nas] [info] UE switches to state [MM-REGISTER-INITIATED]
[2022-06-08 12:03:38.128] [rrc] [debug] Sending RRC Setup Request
[2022-06-08 12:03:38.128] [rrc] [info] RRC Setup for UE[1]
[2022-06-08 12:03:38.128] [rrc] [info] RRC connection established
[2022-06-08 12:03:38.128] [rrc] [info] UE switches to state [RRC-CONNECTED]
[2022-06-08 12:03:38.128] [ngap] [debug] Initial NAS message received from UE[1]
[2022-06-08 12:03:38.128] [nas] [info] UE switches to state [CM-CONNECTED]
[2022-06-08 12:03:38.232] [nas] [debug] Authentication Request received
[2022-06-08 12:03:38.237] [nas] [debug] Security Mode Command received
[2022-06-08 12:03:38.237] [nas] [debug] Selected integrity[2] ciphering[0]
[2022-06-08 12:03:38.559] [ngap] [debug] Initial Context Setup Request received
[2022-06-08 12:03:38.559] [nas] [debug] Registration accept received
[2022-06-08 12:03:38.559] [nas] [info] UE switches to state [MM-REGISTERED/NORMAL-SERVICE]
[2022-06-08 12:03:38.559] [nas] [debug] Sending Registration Complete
[2022-06-08 12:03:38.559] [nas] [info] Initial Registration is successful
[2022-06-08 12:03:38.559] [nas] [debug] Sending PDU Session Establishment Request
[2022-06-08 12:03:38.559] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2022-06-08 12:03:39.014] [ngap] [info] PDU session resource(s) setup for UE[1] count[1]
[2022-06-08 12:03:39.014] [nas] [debug] PDU Session Establishment Accept received
[2022-06-08 12:03:39.014] [nas] [info] PDU Session establishment is successful PSI[1]
[2022-06-08 12:03:39.031] [app] [info] Connection setup for PDU session[1] is successful, TUN interface[uesimtun0, 60.60.0.2] is up.

ping -I uesimtun0 google.com
PING google.com (142.250.196.14) from 60.60.0.2 uesimtun0: 56(84) bytes of data.
[2022-06-08 12:05:02.757] [rrc] [debug] Signal lost for cell[1], total [0] cells in coverage
[2022-06-08 12:05:02.757] [nas] [error] Radio link failure detected
[2022-06-08 12:05:02.757] [nas] [info] UE switches to state [CM-IDLE]
[2022-06-08 12:05:02.757] [nas] [info] UE switches to state [MM-REGISTERED/PS]
[2022-06-08 12:05:02.757] [nas] [info] UE switches to state [MM-REGISTERED/PLMN-SEARCH]
[2022-06-08 12:05:02.757] [nas] [error] PLMN selection failure, no cells in coverage
[2022-06-08 12:05:03.155] [rrc] [warning] Acceptable cell selection failed, no cell is in coverage
[2022-06-08 12:05:03.155] [rrc] [error] Cell selection failure, no suitable or acceptable cell found
[2022-06-08 12:05:05.100] [nas] [error] PLMN selection failure, no cells in coverage
[2022-06-08 12:05:07.302] [nas] [error] PLMN selection failure, no cells in coverage
[2022-06-08 12:05:08.403] [nas] [info] UE switches to state [MM-REGISTERED/NO-CELL-AVAILABLE]
[2022-06-08 12:05:33.167] [rrc] [warning] Acceptable cell selection failed, no cell is in coverage
[2022-06-08 12:05:33.167] [rrc] [error] Cell selection failure, no suitable or acceptable cell found
[2022-06-08 12:05:38.130] [nas] [error] PLMN selection failure, no cells in coverage
^C
google.com ping statistics —
42 packets transmitted, 0 received, 100% packet loss, time 41975ms

ps -ef|grep nr (no nr-gnb running, it got crashed as logs shared above)
root 23536 7695 0 12:03 pts/7 00:00:00 ./nr-ue -c …/config/free5gc-ue.yaml
ubuntu 23645 23624 0 12:05 pts/0 00:00:00 ./bin/nrf
root 23732 7695 0 12:06 pts/7 00:00:00 grep --color=auto nr

netstat -ano|grep sctp (more sctp connections are seen while we have established only one)
sctp 10.161.4.192:38412 LISTEN
sctp 0 0 10.161.4.192:38412 10.161.4.192:37362 ESTABLISHED
sctp 0 0 10.161.4.192:37362 10.161.4.192:38412 ESTABLISHED
sctp 0 0 10.161.4.192:38412 10.161.4.230:38412 ESTABLISHED

@razat.trehan

Can you show your configuration in free5gc-gnb.yaml and ifconfig message?
it is a problem with “gtpIp” address setting.

Hi, @razat.trehan
since there hasn’t been any replies from you, this topic is closed by admin.
If you have further questions about this topic, please create another topic.
Thanks.