herlesupreeth / docker_open5gs

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

Container error related to srsran_zmp #212

Closed ChoB100 closed 8 months ago

ChoB100 commented 10 months ago

Container error related to srsran_zmp

I run Open5GS as stated in the tutorial, and run gNB with the command "docker-compose -f srsgnb_zmq.yaml up && docker attach srsgnb_zmq".

However, I'm getting the following error log, can you help me resolve it?

Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/ Starting srsgnb_zmq ... done Attaching to srsgnb_zmq srsgnb_zmq | Configuring component: 'gnb_zmq' srsgnb_zmq | Removing stale PID file /var/run/dbus/pid. srsgnb_zmq | Starting system message bus dbus [ OK ]. srsgnb_zmq | avahi-daemon: unrecognized service srsgnb_zmq | INI was not able to parse cell_cfg.pdcch.ss_type srsgnb_zmq | Run with --help for more information. srsgnb_zmq exited with code 110 You cannot attach to a stopped container, start it first

herlesupreeth commented 10 months ago

I believe you are using older commits. Can you please pull the latest changes and give it a try??

ChoB100 commented 10 months ago

Yes, I ran it again.

I get an error like the one below.

Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/ WARNING: Found orphan containers (upf, mongo, udm, webui, pcf, scp, amf, ausf, nssf, udr, bsf, nrf, smf, metrics) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. Creating srsgnb_zmq ... done Lower PHY in executor blocking mode.

--== srsRAN gNB (commit 1afd7240f) ==--

Failed to bind SCTP socket to 172.22.0.37:0. Success srsGNB ERROR: Failed to create SCTP gateway.

/mnt/srsran/srsran_init.sh: line 53: 37 Aborted (core dumped) gnb -c /etc/srsran/gnb.yml

Do I need to change the SCTP settings that are commented out in the AMF?

herlesupreeth commented 10 months ago

Do I need to change the SCTP settings that are commented out in the AMF?

If you are running both gNB and 5GC in the same machine then no.

Can you please post your docker-compose and docker version you are using??

Also, can you please describe your setup?? Is it a RPi or generic x86 machine? And have you installed libsctp-dev on the host machine??

ChoB100 commented 10 months ago

Yes, I didn't change it to shielded on the same host.

I am using docker-compose and docker as shown below.

I didn't install libsctp-dev, I just followed the tutorial.

Can you tell me how to install libsctp-dev?

Thank you for your kind reply.

herlesupreeth commented 10 months ago

Ah, the docker-compose you are using is quite old. You should use the recommended docker-compose version in README

Can you tell me how to install libsctp-dev?

sudo apt install libsctp-dev

icea-conf commented 10 months ago

I restarted the virtualization setup to resolve this issue.

I apologize for the late response.

I updated the "docker" and "docker-compose" versions

I also installed libsctp-dev.

After following all the tutorials, I get the following error.

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Ddocker_open5gs%22%3Atrue%7D%7D": dial unix /var/run/docker.sock: connect: permission denied

So, I tried to solve it like below

check docker permissions

$ ls -al /var/run/docker.sock

authorize docker group user

$ sudo chmod 666 /var/run/docker.sock

This time I encountered a different error.... Can you solve it?


I entered the command as below.

$ docker-compose -f srsgnb_zmq.yaml up && docker attach srsgnb_zmq

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true WARN[0000] Found orphan containers ([upf smf amf webui pcf bsf udr nssf ausf udm scp mongo nrf metrics]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. [+] Running 1/0 ✔ Container srsgnb_zmq Created 0.0s Attaching to srsgnb_zmq srsgnb_zmq | Configuring component: 'gnb_zmq' srsgnb_zmq | Removing stale PID file /var/run/dbus/pid. srsgnb_zmq | Starting system message bus dbus
srsgnb_zmq | srsgnb_zmq |
srsgnb_zmq | srsgnb_zmq | srsgnb_zmq | [ OK ] srsgnb_zmq | avahi-daemon: unrecognized service srsgnb_zmq | Lower PHY in executor blocking mode. srsgnb_zmq | srsgnb_zmq | --== srsRAN gNB (commit 1afd7240f) ==-- srsgnb_zmq | srsgnb_zmq | Connecting to AMF on 172.22.0.10:38412 srsgnb_zmq | Failed to connect SCTP socket to 172.22.0.10:38412. error="Connection timed out" timeout=1373ms srsgnb_zmq | srsGNB ERROR: Failed to create SCTP gateway. srsgnb_zmq | srsgnb_zmq | /mnt/srsran/srsran_init.sh: line 53: 39 Aborted (core dumped) gnb -c /etc/srsran/gnb.yml srsgnb_zmq exited with code 134

$ docker-compose -f srsgnb_zmq.yaml up -d && docker attach srsgnb_zmq

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true WARN[0000] Found orphan containers ([upf smf amf webui pcf bsf udr nssf ausf udm scp mongo nrf metrics]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. [+] Running 1/1 ✔ Container srsgnb_zmq Started 0.0s

--== srsRAN gNB (commit 1afd7240f) ==--

Connecting to AMF on 172.22.0.10:38412 Failed to connect SCTP socket to 172.22.0.10:38412. error="Connection timed out" timeout=1363ms srsGNB ERROR: Failed to create SCTP gateway.

/mnt/srsran/srsran_init.sh: line 53: 39 Aborted (core dumped) gnb -c /etc/srsran/gnb.yml

I still get the SCTP error.

icea-conf commented 10 months ago

There seems to be another reason.

I followed the tutorial exactly, but AMF doesn't seem to be operating.

I ran the docker ps -a command in my virtual environment, and here is the error log for AMF on Opens5GS.

amf_srsgnb_zmq_exited

amf | Deploying component: 'amf-1' amf | Open5GS daemon v2.6.4-76-gfc40725 amf | amf | amf | 08/18 07:09:32.237: [app] INFO: Configuration: '/open5gs/install/etc/open5gs/amf.yaml' (../lib/app/ogs-init.c:126) amf | 08/18 07:09:32.237: [app] INFO: File Logging: '/open5gs/install/var/log/open5gs/amf.log' (../lib/app/ogs-init.c:129) amf | 08/18 07:09:32.240: [amf] ERROR: No amf.time.t3512.value in '/open5gs/install/etc/open5gs/amf.yaml' (../src/amf/context.c:185) amf | 08/18 07:09:32.241: [sctp] ERROR: Failed to intialize AMF (../src/amf/app.c:30) amf | 08/18 07:09:32.241: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:219) amf exited with code 255

Additionally, the SCTP port of AMF and srsgnb is set to 38412 as per the tutorial.

herlesupreeth commented 10 months ago

ah..good catch..that must have been a new addition in AMF configuration file. Thats the reason its failing. Will push fix shortly. Thank you

icea-conf commented 10 months ago

Thank you for your efforts.

Let me know when you're done updating the version ;)

Great work!

herlesupreeth commented 10 months ago

I pushed the fix. Please fetch latest commit and give it a try (no need to recompile the image in your case)

icea-conf commented 10 months ago

Thank you for your attention.

AMF and gNB seem to be operating very well.

AMF 로그

amf | 08/18 08:11:42.807: [amf] INFO: gNB-N2 accepted[172.22.0.37]:50755 in ng-path module (../src/amf/ngap-sctp.c:113) amf | 08/18 08:11:42.807: [amf] INFO: gNB-N2 accepted[172.22.0.37] in master_sm module (../src/amf/amf-sm.c:741) amf | 08/18 08:11:42.807: [amf] INFO: [Added] Number of gNBs is now 1 (../src/amf/context.c:1185) amf | 08/18 08:11:42.807: [amf] INFO: gNB-N2[172.22.0.37] max_num_of_ostreams : 30 (../src/amf/amf-sm.c:780)

gNB 로그

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true WARN[0000] Found orphan containers ([amf upf smf webui pcf bsf udr nssf ausf udm scp mongo nrf metrics]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. [+] Running 1/1 ✔ Container srsgnb_zmq Started 0.0s avahi-daemon: unrecognized service Lower PHY in executor blocking mode.

--== srsRAN gNB (commit 1afd7240f) ==--

Connecting to AMF on 172.22.0.10:38412 Available radio types: uhd and zmq. Cell pci=1, bw=10 MHz, dl_arfcn=368500 (n3), dl_freq=1842.5 MHz, dl_ssb_arfcn=368410, ul_freq=1747.5 MHz

==== gNodeB started === Type to view trace


However, I am getting an error on the 5G UE as shown below.

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true [+] Running 1/1 ✘ srsue_5g_zmq Error 3.1s Error response from daemon: pull access denied for docker_srslte, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

We are looking into this to resolve it, but wanted to get back to you with the results first.

herlesupreeth commented 10 months ago

I think you didnt build the image for srsUE (srsRAN and srsLTE are two different repo)

docker build --no-cache --force-rm -t docker_srslte .

icea-conf commented 10 months ago

Based on your comment, I built the srslte image with the steps below and ran gNB.

build srslte image

$ cd srslte $ docker build --no-cache --force-rm -t docker_srslte .

Run srsue_5g_zmq

$ cd srsran $ docker-compose -f srsue_5g_zmq.yaml up -d && docker attach srsue_5g_zmq

Everything is operating fine. That's great!

AMF logs

amf | 08/18 08:42:27.700: [amf] INFO: gNB-N2 accepted[172.22.0.37]:38498 in ng-path module (../src/amf/ngap-sctp.c:113) amf | 08/18 08:42:27.701: [amf] INFO: gNB-N2 accepted[172.22.0.37] in master_sm module (../src/amf/amf-sm.c:741) amf | 08/18 08:42:27.701: [amf] INFO: [Added] Number of gNBs is now 1 (../src/amf/context.c:1185) amf | 08/18 08:42:27.701: [amf] INFO: gNB-N2[172.22.0.37] max_num_of_ostreams : 30 (../src/amf/amf-sm.c:780) amf | 08/18 08:42:38.220: [amf] INFO: InitialUEMessage (../src/amf/ngap-handler.c:401) amf | 08/18 08:42:38.220: [amf] INFO: [Added] Number of gNB-UEs is now 1 (../src/amf/context.c:2517) amf | 08/18 08:42:38.220: [amf] INFO: RAN_UE_NGAP_ID[0] AMF_UE_NGAP_ID[1] TAC[1] CellID[0x19b0] (../src/amf/ngap-handler.c:562) amf | 08/18 08:42:38.221: [amf] INFO: [suci-0-001-01-0000-0-0-1234567895] Unknown UE by SUCI (../src/amf/context.c:1783) amf | 08/18 08:42:38.221: [amf] INFO: [Added] Number of AMF-UEs is now 1 (../src/amf/context.c:1570) amf | 08/18 08:42:38.221: [gmm] INFO: Registration request (../src/amf/gmm-sm.c:1061) amf | 08/18 08:42:38.221: [gmm] INFO: [suci-0-001-01-0000-0-0-1234567895] SUCI (../src/amf/gmm-handler.c:152) scp | 08/18 08:42:38.224: [sbi] WARNING: [a9d94626-3ddd-41ee-ad14-21b7ffe4abf3] (NF-discover) NF has already been added (../lib/sbi/nnrf-handler.c:833) scp | 08/18 08:42:38.224: [sbi] WARNING: NF EndPoint updated [172.22.0.11:80] (../lib/sbi/context.c:1623) scp | 08/18 08:42:38.224: [sbi] WARNING: NF EndPoint updated [172.22.0.11:7777] (../lib/sbi/context.c:1532) scp | 08/18 08:42:38.224: [sbi] INFO: [a9d94626-3ddd-41ee-ad14-21b7ffe4abf3] (NF-discover) NF Profile updated (../lib/sbi/nnrf-handler.c:856) udr | 08/18 08:42:38.227: [dbi] INFO: [imsi-001011234567895] Cannot find IMSI in DB (../lib/dbi/subscription.c:56) udr | 08/18 08:42:38.227: [udr] WARNING: [imsi-001011234567895] Cannot find SUPI in DB (../src/udr/nudr-handler.c:68) udm | 08/18 08:42:38.229: [udm] WARNING: [suci-0-001-01-0000-0-0-1234567895] HTTP response error [404] (../src/udm/nudr-handler.c:86) ausf | 08/18 08:42:38.229: [ausf] WARNING: [suci-0-001-01-0000-0-0-1234567895] Cannot find SUPI [404] (../src/ausf/ue-sm.c:155) amf | 08/18 08:42:38.230: [gmm] WARNING: [suci-0-001-01-0000-0-0-1234567895] Cannot find SUCI [404] (../src/amf/gmm-sm.c:1552) amf | 08/18 08:42:38.230: [amf] WARNING: [suci-0-001-01-0000-0-0-1234567895] Registration reject [11] (../src/amf/nas-path.c:219) amf | 08/18 08:42:38.235: [amf] INFO: UE Context Release [Action:3] (../src/amf/ngap-handler.c:1677) amf | 08/18 08:42:38.235: [amf] INFO: RAN_UE_NGAP_ID[0] AMF_UE_NGAP_ID[1] (../src/amf/ngap-handler.c:1678) amf | 08/18 08:42:38.235: [amf] INFO: SUCI[suci-0-001-01-0000-0-0-1234567895] (../src/amf/ngap-handler.c:1681) amf | 08/18 08:42:38.235: [amf] INFO: [Removed] Number of gNB-UEs is now 0 (../src/amf/context.c:2524) amf | 08/18 08:42:38.235: [amf] INFO: [Removed] Number of AMF-UEs is now 0 (../src/amf/context.c:1663)

gNB logs

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true WARN[0000] Found orphan containers ([srsue_5g_zmq amf upf smf webui pcf bsf udr nssf ausf udm scp mongo nrf metrics]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. [+] Running 1/1 ✔ Container srsgnb_zmq Started 0.0s Lower PHY in executor blocking mode.

--== srsRAN gNB (commit 1afd7240f) ==--

Connecting to AMF on 172.22.0.10:38412 Available radio types: uhd and zmq. Cell pci=1, bw=10 MHz, dl_arfcn=368500 (n3), dl_freq=1842.5 MHz, dl_ssb_arfcn=368410, ul_freq=1747.5 MHz

==== gNodeB started === Type to view trace t

5G UE logs

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true WARN[0000] Found orphan containers ([amf srsgnb_zmq upf smf webui pcf bsf udr nssf ausf udm scp mongo nrf metrics]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. [+] Running 1/0 ✔ Container srsue_5g_zmq Created 0.0s Attaching to srsue_5g_zmq srsue_5g_zmq | Configuring component: 'ue_5g_zmq' srsue_5g_zmq | Removing stale PID file /var/run/dbus/pid. srsue_5g_zmq | Starting system message bus dbus
srsue_5g_zmq | srsue_5g_zmq |
srsue_5g_zmq | srsue_5g_zmq | [ OK ] srsue_5g_zmq | avahi-daemon: unrecognized service srsue_5g_zmq | Deploying component: 'ue_5g_zmq' srsue_5g_zmq | Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_soapy.so libsrsran_rf_zmq.so srsue_5g_zmq | Inactive RF plugins: srsue_5g_zmq | Couldn't open , trying /root/.config/srsran/ue.conf srsue_5g_zmq | Couldn't open /root/.config/srsran/ue.conf either, trying /etc/srsran/ue.conf srsue_5g_zmq | Reading configuration file /etc/srsran/ue.conf... srsue_5g_zmq | srsue_5g_zmq | Built in Release mode using commit fa56836b1 on branch HEAD. srsue_5g_zmq | srsue_5g_zmq | Opening 1 channels in RF device=zmq with args=tx_port=tcp://172.22.0.34:2001,rx_port=tcp://172.22.0.37:2000,id=ue,base_srate=11.52e6 srsue_5g_zmq | Supported RF device list: UHD soapy zmq file srsue_5g_zmq | CHx base_srate=11.52e6 srsue_5g_zmq | CHx id=ue srsue_5g_zmq | Current sample rate is 1.92 MHz with a base rate of 11.52 MHz (x6 decimation) srsue_5g_zmq | CH0 rx_port=tcp://172.22.0.37:2000 srsue_5g_zmq | CH0 tx_port=tcp://172.22.0.34:2001 srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Waiting PHY to initialize ... srsue_5g_zmq | done! srsue_5g_zmq | Attaching UE... srsue_5g_zmq | Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=1294 srsue_5g_zmq | Random Access Complete. c-rnti=0x4601, ta=0 srsue_5g_zmq | RRC Connected


At here, why do we need to build the srslte image?

One more thing, when I shut down the 5G Core, the gNB and 5G UE are still connected.

Similarly, if i shut down the gNB, the 5G UE is still connected.

==== gNodeB started === Type to view trace t

Typing "t" does not trace any information about the 5G UE.

icea-conf commented 10 months ago

Oh,,, I forgot to register the 5G UE in the Web UI.

I'll try again and let you know!

icea-conf commented 10 months ago

I registered the following information in the Web UI.


image

It looks like I'm doing something wrong with my settings, can you help?

5G UE logs

srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Waiting PHY to initialize ... srsue_5g_zmq | done! srsue_5g_zmq | Attaching UE...

herlesupreeth commented 10 months ago

At here, why do we need to build the srslte image?

Because gNB is built from https://github.com/srsran/srsRAN_Project, which does not contain 5G UE code, rather its in this repo - https://github.com/srsran/srsRAN_4G.

It looks like I'm doing something wrong with my settings, can you help?

Did you change anything in UE SIM configuration?? Let me try it at my end and see.

herlesupreeth commented 10 months ago

I think its a bug in open5gs - https://github.com/open5gs/open5gs/issues/2528

I will try to see what can be done

herlesupreeth commented 10 months ago

I have pushed fixes to the repo. Please full latest changes and rebuild open5gs image and give it a try

icea-conf commented 10 months ago

Yes, it runs up to the UE's RRC.

gNB logs

srsgnb_zmq | [ OK ] srsgnb_zmq | avahi-daemon: unrecognized service srsgnb_zmq | Lower PHY in executor blocking mode. srsgnb_zmq | srsgnb_zmq | --== srsRAN gNB (commit 1afd7240f) ==-- srsgnb_zmq | srsgnb_zmq | Connecting to AMF on 172.22.0.10:38412 srsgnb_zmq | Available radio types: uhd and zmq. srsgnb_zmq | Cell pci=1, bw=10 MHz, dl_arfcn=368500 (n3), dl_freq=1842.5 MHz, dl_ssb_arfcn=368410, ul_freq=1747.5 MHz srsgnb_zmq | srsgnb_zmq | ==== gNodeB started === srsgnb_zmq | Type to view trace

UE logs

srsue_5g_zmq | CHx base_srate=11.52e6 srsue_5g_zmq | CHx id=ue srsue_5g_zmq | Current sample rate is 1.92 MHz with a base rate of 11.52 MHz (x6 decimation) srsue_5g_zmq | CH0 rx_port=tcp://172.22.0.37:2000 srsue_5g_zmq | CH0 tx_port=tcp://172.22.0.34:2001 srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Waiting PHY to initialize ... srsue_5g_zmq | done! srsue_5g_zmq | Attaching UE... srsue_5g_zmq | Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=334 srsue_5g_zmq | Random Access Complete. c-rnti=0x4601, ta=0 srsue_5g_zmq | RRC Connected

Is it not possible to use the "t" option in ZMQ?

Thank you.

herlesupreeth commented 10 months ago

It should be possible to get the IP for PDU session as well. Can post the logs of AMF please??

icea-conf commented 10 months ago

Post AMF logs here.

It looks like the gNB and UE are not registered properly.

amf | 08/20 04:23:26.038: [amf] INFO: InitialUEMessage (../src/amf/ngap-handler.c:372) amf | 08/20 04:23:26.038: [amf] INFO: [Added] Number of gNB-UEs is now 1 (../src/amf/context.c:2510) amf | 08/20 04:23:26.038: [amf] INFO: RAN_UE_NGAP_ID[0] AMF_UE_NGAP_ID[1] TAC[1] CellID[0x19b0] (../src/amf/ngap-handler.c:533) amf | 08/20 04:23:26.038: [amf] INFO: [suci-0-001-01-0000-0-0-1234567895] Unknown UE by SUCI (../src/amf/context.c:1776) amf | 08/20 04:23:26.038: [amf] INFO: [Added] Number of AMF-UEs is now 1 (../src/amf/context.c:1563) amf | 08/20 04:23:26.038: [gmm] INFO: Registration request (../src/amf/gmm-sm.c:1061) amf | 08/20 04:23:26.038: [gmm] INFO: [suci-0-001-01-0000-0-0-1234567895] SUCI (../src/amf/gmm-handler.c:152) scp | 08/20 04:23:26.043: [sbi] WARNING: [f348649e-3f4b-41ee-a973-4b37ec398e32] (NF-discover) NF has already been added (../lib/sbi/nnrf-handler.c:833) amf | 08/20 04:23:26.089: [gmm] WARNING: Authentication failure(MAC failure) (../src/amf/gmm-sm.c:1424) amf | 08/20 04:23:26.089: [amf] WARNING: [suci-0-001-01-0000-0-0-1234567895] Authentication reject (../src/amf/nas-path.c:538) amf | 08/20 04:23:26.090: [amf] INFO: UE Context Release [Action:3] (../src/amf/ngap-handler.c:1648) amf | 08/20 04:23:26.090: [amf] INFO: RAN_UE_NGAP_ID[0] AMF_UE_NGAP_ID[1] (../src/amf/ngap-handler.c:1649) amf | 08/20 04:23:26.090: [amf] INFO: SUCI[suci-0-001-01-0000-0-0-1234567895] (../src/amf/ngap-handler.c:1652) amf | 08/20 04:23:26.090: [amf] INFO: [Removed] Number of gNB-UEs is now 0 (../src/amf/context.c:2517) amf | 08/20 04:23:26.090: [amf] INFO: [Removed] Number of AMF-UEs is now 0 (../src/amf/context.c:1656)

herlesupreeth commented 10 months ago

amf | 08/20 04:23:26.089: [gmm] WARNING: Authentication failure(MAC failure) (../src/amf/gmm-sm.c:1424) amf | 08/20 04:23:26.089: [amf] WARNING: [suci-0-001-01-0000-0-0-1234567895] Authentication reject (../src/amf/nas-path.c:538)

Looks like something is wrong in SIM details entered in open5gs WebUI

icea-conf commented 10 months ago

UE1_IMEI=356938035643803 UE1_IMEISV=4370816125816151 UE1_IMSI=001011234567895 UE1_KI=8baf473f2f8fd09487cccbd7097c6862 UE1_OP=11111111111111111111111111111111 UE1_AMF=8000

image

Is the information in the .env SIM information for UERANSIM?

herlesupreeth commented 10 months ago

You are providing UE1_OP=11111111111111111111111111111111 value in OPc field in WebUI of open5gs. Its wrong. Change the field type to OP.

icea-conf commented 10 months ago

Yes, you're right!

The logs show that the gNB and UE are working normally.

gNB logs

--== srsRAN gNB (commit 1afd7240f) ==--

Connecting to AMF on 172.22.0.10:38412 Available radio types: uhd and zmq. Cell pci=1, bw=10 MHz, dl_arfcn=368500 (n3), dl_freq=1842.5 MHz, dl_ssb_arfcn=368410, ul_freq=1747.5 MHz

==== gNodeB started === Type to view trace t

' -----------------DL----------------|------------------UL-------------------- pci rnti cqi ri mcs brate ok nok (%) | pusch mcs brate ok nok (%) bsr 1 4601 15 1 0 0 0 0 0% | n/a 0 0 0 0 0% 0.0 1 4601 15 1 0 0 0 0 0% | n/a 0 0 0 0 0% 0.0 1 4601 15 1 0 0 0 0 0% | n/a 0 0 0 0 0% 0.0 1 4601 15 1 0 0 0 0 0% | n/a 0 0 0 0 0% 0.0 1 4601 15 1 0 0 0 0 0% | n/a 0 0 0 0 0% 0.0

UE logs

srsue_5g_zmq | Supported RF device list: UHD soapy zmq file srsue_5g_zmq | CHx base_srate=11.52e6 srsue_5g_zmq | CHx id=ue srsue_5g_zmq | Current sample rate is 1.92 MHz with a base rate of 11.52 MHz (x6 decimation) srsue_5g_zmq | CH0 rx_port=tcp://172.22.0.37:2000 srsue_5g_zmq | CH0 tx_port=tcp://172.22.0.34:2001 srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) srsue_5g_zmq | Waiting PHY to initialize ... srsue_5g_zmq | done! srsue_5g_zmq | Attaching UE... srsue_5g_zmq | Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=334 srsue_5g_zmq | Random Access Complete. c-rnti=0x4601, ta=0 srsue_5g_zmq | RRC Connected srsue_5g_zmq | PDU Session Establishment successful. IP: 192.168.100.100 srsue_5g_zmq | RRC NR reconfiguration successful.


For others, we share the UE information that needs to be registered in the Web UI.

IMSI = 001011234567895 Subscriber Key = 8baf473f2f8fd09487cccbd7097c6862 Authentication Management Field = 8000 USIM Type(OP) = 11111111111111111111111111111111111111111111111111111111111111


One more thing, I'm curious that when I shut down the gNB, no logs appear on the UE. Is this because a PDU session was already established?

herlesupreeth commented 10 months ago

One more thing, I'm curious that when I shut down the gNB, no logs appear on the UE. Is this because a PDU session was already established?

I am not sure why this is the case. But I am guessing UE is not aware that it lost connected with gNB

ChoB100 commented 10 months ago

I checked a few things in docker_open5GS.

UL/DL testing

Access the srsue_5g_zmq container and ping test the Data Network utilizing the GTP tunnel (tun_srsue).

$ docker exec -it srsue_5g_zmq $ ping -I tun_srsue 8.8.8.8

The UL/DL log for the gNB looks like this

image

image

However, in the UE container, the packet loss is 100%.

Does the DN test over the GTP tunnel work?

Where can I see the ogstuns specified in upf.yaml?

gNB relationship with AMF/SMF/UPF

After running the gNB and UE, I stopped AMF, SMF, and UPF.

$ docker stop amf $ docker stop smf $ docker stop upf

Nothing happens to the gNB and UE.

Does the gNB connect well with AMF or UE?

herlesupreeth commented 10 months ago

It works just fine for me.

root@888adafec265:/# ip a    
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: tun_srsue: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500
    link/none 
    inet 192.168.100.3/24 scope global tun_srsue
       valid_lft forever preferred_lft forever
40: eth0@if41: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:16:00:22 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.22.0.34/24 brd 172.22.0.255 scope global eth0
       valid_lft forever preferred_lft forever
root@888adafec265:/# ping -I tun_srsue 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.100.3 tun_srsue: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=46.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=45.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=114 time=58.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=114 time=69.1 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=114 time=35.0 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
rtt min/avg/max/mdev = 34.986/51.001/69.147/11.781 ms
           -----------------DL----------------|------------------UL--------------------
 pci rnti  cqi  ri  mcs  brate   ok  nok  (%) | pusch  mcs  brate   ok  nok  (%)    bsr
   1 4601   15   1    0      0    0    0   0% |   n/a    0      0    0    0   0%    0.0
   1 4601   15   1    0      0    0    0   0% |   n/a    0      0    0    0   0%    0.0
   1 4601   15   1    0      0    0    0   0% |   n/a    0      0    0    0   0%    0.0
   1 4601   15   1   27   1.8k    2    1  33% |  65.5   27    16k    6    0   0%    0.0
   1 4601   15   1   28   1.8k    2    0   0% |  65.5   27    11k    4    0   0%    0.0
   1 4601   15   1   27   1.8k    2    1  33% |  65.5   27    16k    6    0   0%    0.0
   1 4601   15   1   28   1.8k    2    0   0% |  65.5   27    11k    4    0   0%    0.0
   1 4601   15   1   28   1.8k    2    0   0% |  65.5   27    11k    4    0   0%    0.0
   1 4601   15   1    0      0    0    0   0% |   n/a    0      0    0    0   0%    0.0
   1 4601   15   1    0      0    0    0   0% |   n/a    0      0    0    0   0%    0.0
   1 4601   15   1    0      0    0    0   0% |   n/a    0      0    0    0   0%    0.0

One thing I noticed is that, in my first run I had same issue as you had but the host machine was not put in performance mode resulting in depleting of HARQs in gNB due to delay etc. After putting host machine in performance mode as follows all was working fine.

sudo cpupower frequency-set -g performance

ChoB100 commented 8 months ago

Sorry, I was so late.

I moved the configuration to my server for experimentation.

After the sudo cpupower frequency-set -g performancecommand, gNB is working fine, as you said.

image

However, the pack loss from UE to external internet is 100%.

image

Is there any setting for the UE to access the internet?

herlesupreeth commented 8 months ago

I would suggest to re-compile the srsran docker image as I think the fix for this issue has been pushed to the srsRAN_Project repo. i.e. execute below steps

cd ../srsran docker build --no-cache --force-rm -t docker_srsran .

ChoB100 commented 8 months ago

I recompiled the srsran docker image, tested it and it's the same situation (100% packet loss).

Do I need to make any additional settings in the WebUI?

image

herlesupreeth commented 8 months ago

I dont think there are any more settings needed in webui (you could try changing from Ipv4v6 to Ipv4).

can you send me the srsran gnb logs with mac, rrc and phy logs in debug?

herlesupreeth commented 8 months ago

Wait..: did you change the subnet used for internet APN?? Or are you not using this repo?? I see UE is assigned IP of 10.45.0.x rather than 192.168.100.x

ChoB100 commented 8 months ago

Oops, I must have forgotten the IPv4 value from an old setup.

If I fix the IPv4 address as shown below, it should work fine.

image

Everything is working fine. I think it's okay to close this issue.