-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
AMF-No N1N2MessageTransferReqData #3058
Comments
When building the MIME Multipart Media Encapsulation format within an SBI message in the NF of a third-party product, Open5GS does not parse properly if it contains a Preamble CRLF. For example, ``` TCP/HTTP2 Stream: Data, Stream ID: 1, Length 841 MIME Multipart Media Encapsulation, Type: multipart/related, Boundary: "gc0pJq08jU534c" --->Preamble: 0d0a First boundary: --gc0pJq08jU534c\r\n Encapsulated multipart part: (application/json) Boundary: \r\n--gc0pJq08jU534c\r\n Encapsulated multipart part: (application/vnd.3gpp.5gnas) Boundary: \r\n--gc0pJq08jU534c\r\n Encapsulated multipart part: (application/vnd.3gpp.ngap) Last Boundary: \r\n--gc0pJq08jU534c--\r\n ```
When building the MIME Multipart Media Encapsulation format within an SBI message in the NF of a third-party product, Open5GS does not parse properly if it contains a Preamble CRLF. For example, ``` TCP/HTTP2 Stream: Data, Stream ID: 1, Length 841 MIME Multipart Media Encapsulation, Type: multipart/related, Boundary: "gc0pJq08jU534c" --->Preamble: 0d0a First boundary: --gc0pJq08jU534c\r\n Encapsulated multipart part: (application/json) Boundary: \r\n--gc0pJq08jU534c\r\n Encapsulated multipart part: (application/vnd.3gpp.5gnas) Boundary: \r\n--gc0pJq08jU534c\r\n Encapsulated multipart part: (application/vnd.3gpp.ngap) Last Boundary: \r\n--gc0pJq08jU534c--\r\n ```
I initially mislabeled this as a Discussion. After checking, it is indeed an Open5GS Issue. So I fixed it and pushed it to the main branch. Since you are integrating with third-party products, there may be more issues. Please continue to ask on this issue board if you see any problems. Thank you so much for sharing this issue. |
Thanks a lot @acetcom for your great support much appreciated ! Sending SM Cause[INVALID_PTI_VALUE] for PSI[1] any advice please? UE log: [2024-03-17 20:09:41.743] [nas] [info] UE switches to state [MM-DEREGISTERED/PLMN-SEARCH] AMF log 03/17 20:32:50.583: [amf] INFO: gNB-N2 accepted[10.80.1.2]:46494 in ng-path module (../src/amf/ngap-sctp.c:114) |
The PDUSessionResourceSetupResponse over packets 45 and 46 is being delivered to the SMF, but the third-party SMF thinks there's something wrong with the packets from Open5GS, so it doesn't send a response, and it disconnects the session after 5 seconds. The simplest way to solve this problem is to capture the HTTP2 packets with pcap and share them with me when the third-party SMF is working properly with thrird-party AMF. Is that possible by any chance? Thanks a lot! |
amf-smf-woking_.zip |
The amf-smf-working.zip contains both HTTP, NGAP, and PFCP, but the open5GS_new_source.zip you tested with Open5GS only has HTTP2 packets. Could you please include NGAP and PFCP and share it with me? Thanks a lot! |
Hi @acetcom please find attached the requested pcap |
First of all, not_working_ngap-http2_pfcp.zip has a late PFCP Establishment Request/Response, so I compared it to amf_smf_working.zip and found that the sscModes are set differently. I decided to try to match them first, so I created a new branch, issues3058. You can build open5gs using the issue3058 branch as shown below.
I don't know if it's possible to fix this without help from the SMF vendor, but if you can help, I'll keep trying to match it with a working sample pcap. Thanks a lot! |
Hi @acetcom Also I will share this pcap with our support team ,I hope they can help with what the SMF doesnt like and why it releases the session after few secs . BR, |
I have confirmed that the issues3058 branch that I fixed is reflected in pcap, however, it is not working properly and the PFCP Establishment Request/Response is happening late. I'm hoping tech support can give me some hints. Thanks a lot! |
Hi @acetcom Some feedback from our support team: This means the future nsmf-pdusession requests should be sent to port 66522 for this session. So do you think we can send it to the right port ? BR, |
This is the first time I've learned that Open5GS had such a problem, thank you very much for sharing this issue. I've fixed this issue right away and applied it to the i3058 branch.
Let me know how it goes once you test it. Thanks again! |
hi @acetcom Thanks for your support! I have tried the below steps to apply the new branch ..just to be sure: $ git clone https://github.com/open5gs/open5gs I dont see now the post message from AMF to SMF nsmf-pdu-session [root@open5gs bin]# ./open5gs-amfd 03/28 14:47:22.728: [app] INFO: Configuration: '/root/hamam/open5gs/install/etc/open5gs/amf.yaml' (../lib/app/ogs-init.c:130) attached the pcap for this test |
Hi @acetcom Sorry for bothering you , kindly any update regarding the last mail? Thanks again! BR, |
This is a must fix issue and is well on my to-do list. However, I ran into a number of issues when I tried to do it all at once. I'm working through them now, and hope to see them by the end of the week. |
Hi @acetcom Thanks again! |
The routine for handling Resource URIs in Open5GS was not properly implemented. I first applied the patch to the i3058 branch for SMF only. Please check if it works well when using third-party SMF. If it works, I will fix all other NFs in the same way. Thank you so much for raigin this issue. |
Hi @acetcom Thanks a lot for all your efforts! I was following these steps: Could you please advise? [root@open5gs open5gs-batch-i3058]# cd open5gs/ meson.build:18:0: ERROR: prefix value 'pwd/install' must be an absolute path A full log can be found at /root/open5gs-batch-i3058/open5gs/build/meson-logs/meson-log.txt BR |
meson build --prefix=pwd/install pwd is incorrect.
|
Hi @acetcom I see now the right port is sending from AMF in nsmf-pdusession message to the SMF Just another question for completeness , when I stop the UE from UERANSIM ,I don't see release and the session will stay in the SMF? BR, |
A friend in the community was trying to connect an SMF made by another manufacturer with an SBI interface and found a big problem with Open5GS. All of the code in the part that generates the Resource URI from HTTP.location is invalid. For example, suppose we create a Resource URI with SMContext as below. {apiRoot}/nsmf-pdusession/<apiVersion>/sm-contexts/{smContextRef} In this case, Open5GS extracted the {smContextRef} part of the HTTP.location and appended it to the beginning {apiRoot}/nsmf-pdusession/<apiVersion>/sm-contexts/. This implementation may not work properly if the apiRoot changes. Consider a different port number as shown below. <HTTP.location> 127.0.0.4:9999/nsmf-pdusession/v1/sm-contexts/1 The SMF may send an apiRoot to the AMF with a changed port number, in which case the AMF must honor it. Therefore, instead of extracting only the smContextRef from HTTP.location, we modified it to use the whole thing to create a Resource URI. We modified all NFs that use HTTP.location in the same way, not just SMFs.
A friend in the community was trying to connect an SMF made by another manufacturer with an SBI interface and found a big problem with Open5GS. All of the code in the part that generates the Resource URI from HTTP.location is invalid. For example, suppose we create a Resource URI with SMContext as below. {apiRoot}/nsmf-pdusession/<apiVersion>/sm-contexts/{smContextRef} In this case, Open5GS extracted the {smContextRef} part of the HTTP.location and appended it to the beginning {apiRoot}/nsmf-pdusession/<apiVersion>/sm-contexts/. This implementation may not work properly if the apiRoot changes. Consider a different port number as shown below. <HTTP.location> 127.0.0.4:9999/nsmf-pdusession/v1/sm-contexts/1 The SMF may send an apiRoot to the AMF with a changed port number, in which case the AMF must honor it. Therefore, instead of extracting only the smContextRef from HTTP.location, we modified it to use the whole thing to create a Resource URI. We modified all NFs that use HTTP.location in the same way, not just SMFs.
If you stop UERANSIM as is, it will not send the release to Core, so the pcap you attached is working fine now. I've pushed all the fixes to the main branch, so the i3058 branch no longer exists. Please let me know if you have any other issues. Thanks a lot! |
Hi @acetcom It's working fine using the main branch, thanks a lot for all help ! much appreciated! BR, |
This issue has been closed automatically due to lack of activity. This has been done to try and reduce the amount of noise. Please do not comment any further. The Open5GS Team may choose to re-open this issue if necessary. |
Discussed in #3037
Originally posted by hamtakkey March 5, 2024
Hi ,
We have issue between our SMF and AMF(simulated by open5gs)
Could you please advise what could be the issue?
03/05 12:36:20.999: [amf] INFO: gNB-N2 accepted[10.80.1.2]:46713 in ng-path module (../src/amf/ngap-sctp.c:114)
03/05 12:36:20.999: [amf] INFO: gNB-N2 accepted[10.80.1.2] in master_sm module (../src/amf/amf-sm.c:742)
03/05 12:36:20.999: [amf] INFO: [Added] Number of gNBs is now 1 (../src/amf/context.c:1186)
03/05 12:36:20.999: [amf] INFO: gNB-N2[10.80.1.2] max_num_of_ostreams : 10 (../src/amf/amf-sm.c:781)
03/05 12:36:23.794: [amf] INFO: InitialUEMessage (../src/amf/ngap-handler.c:401)
03/05 12:36:23.794: [amf] INFO: [Added] Number of gNB-UEs is now 1 (../src/amf/context.c:2523)
03/05 12:36:23.794: [amf] INFO: RAN_UE_NGAP_ID[1] AMF_UE_NGAP_ID[1] TAC[2] CellID[0x10] (../src/amf/ngap-handler.c:565)
03/05 12:36:23.794: [amf] INFO: [suci-0-206-01-0000-0-0-5500000000] Unknown UE by SUCI (../src/amf/context.c:1789)
03/05 12:36:23.794: [amf] INFO: [Added] Number of AMF-UEs is now 1 (../src/amf/context.c:1571)
03/05 12:36:23.794: [gmm] INFO: Registration request (../src/amf/gmm-sm.c:1061)
03/05 12:36:23.795: [gmm] INFO: [suci-0-206-01-0000-0-0-5500000000] SUCI (../src/amf/gmm-handler.c:157)
03/05 12:36:23.795: [sbi] WARNING: Try to discover [nausf-auth] (../lib/sbi/path.c:349)
03/05 12:36:23.796: [sbi] INFO: [39a65eaa-d420-41ee-ad82-dba1afe25726] (NF-discover) NF registered (../lib/sbi/nnrf-handler.c:829)
03/05 12:36:23.796: [sbi] INFO: [39a65eaa-d420-41ee-ad82-dba1afe25726] (NF-discover) NF Profile updated (../lib/sbi/nnrf-handler.c:856)
03/05 12:36:23.806: [sbi] WARNING: Try to discover [nudm-uecm] (../lib/sbi/path.c:349)
03/05 12:36:23.806: [sbi] INFO: [2d54369a-d420-41ee-9ba9-733dea68dd68] (NF-discover) NF registered (../lib/sbi/nnrf-handler.c:829)
03/05 12:36:23.806: [sbi] INFO: [2d54369a-d420-41ee-9ba9-733dea68dd68] (NF-discover) NF Profile updated (../lib/sbi/nnrf-handler.c:856)
03/05 12:36:23.808: [sbi] WARNING: Try to discover [nudm-sdm] (../lib/sbi/path.c:349)
03/05 12:36:23.809: [sbi] WARNING: [2d54369a-d420-41ee-9ba9-733dea68dd68] (NF-discover) NF has already been added (../lib/sbi/nnrf-handler.c:834)
03/05 12:36:23.809: [sbi] WARNING: NF EndPoint updated [10.70.1.2:80] (../lib/sbi/context.c:1623)
03/05 12:36:23.809: [sbi] WARNING: NF EndPoint updated [10.70.1.2:8080] (../lib/sbi/context.c:1532)
03/05 12:36:23.809: [sbi] INFO: [2d54369a-d420-41ee-9ba9-733dea68dd68] (NF-discover) NF Profile updated (../lib/sbi/nnrf-handler.c:856)
03/05 12:36:23.813: [sbi] WARNING: Try to discover [npcf-am-policy-control] (../lib/sbi/path.c:349)
03/05 12:36:23.813: [sbi] INFO: [b86fa94e-d425-41ee-b000-13be09742e59] (NF-discover) NF registered (../lib/sbi/nnrf-handler.c:829)
03/05 12:36:23.813: [sbi] INFO: [b86fa94e-d425-41ee-b000-13be09742e59] (NF-discover) NF Profile updated (../lib/sbi/nnrf-handler.c:856)
03/05 12:36:24.020: [gmm] INFO: [imsi-206015500000000] Registration complete (../src/amf/gmm-sm.c:1993)
03/05 12:36:24.020: [amf] INFO: [imsi-206015500000000] Configuration update command (../src/amf/nas-path.c:612)
03/05 12:36:24.020: [gmm] INFO: UTC [2024-03-05T12:36:24] Timezone[0]/DST[0] (../src/amf/gmm-build.c:562)
03/05 12:36:24.020: [gmm] INFO: LOCAL [2024-03-05T12:36:24] Timezone[0]/DST[0] (../src/amf/gmm-build.c:567)
03/05 12:36:24.020: [amf] INFO: [Added] Number of AMF-Sessions is now 1 (../src/amf/context.c:2544)
03/05 12:36:24.020: [gmm] INFO: UE SUPI[imsi-206015500000000] DNN[demo.nokia.mnc001.mcc206.gprs] S_NSSAI[SST:1 SD:0xabcdef] (../src/amf/gmm-handler.c:1248)
03/05 12:36:24.020: [sbi] WARNING: Try to discover [nnssf-nsselection] (../lib/sbi/path.c:349)
03/05 12:36:24.021: [sbi] INFO: [34bb4572-d420-41ee-ba67-47951a2ae442] (NF-discover) NF registered (../lib/sbi/nnrf-handler.c:829)
03/05 12:36:24.021: [sbi] INFO: [34bb4572-d420-41ee-ba67-47951a2ae442] (NF-discover) NF Profile updated (../lib/sbi/nnrf-handler.c:856)
03/05 12:36:24.022: [amf] WARNING: Try to discover [nsmf-pdusession] (../src/amf/sbi-path.c:314)
03/05 12:36:24.023: [sbi] INFO: [10a0a0a0-0084-4000-861a-1000079ad5d5] (NF-discover) NF registered (../lib/sbi/nnrf-handler.c:829)
03/05 12:36:24.023: [sbi] INFO: [10a0a0a0-0084-4000-861a-1000079ad5d5] (NF-discover) NF Profile updated (../lib/sbi/nnrf-handler.c:856)
03/05 12:36:24.204: [amf] ERROR: No N1N2MessageTransferReqData (../src/amf/namf-handler.c:64)
03/05 12:36:24.216: [amf] INFO: [imsi-206015500000000:1][0:0:RELEASED] /namf-callback/v1/{supi}/sm-context-status/{psi} (../src/amf/namf-handler.c:560)
03/05 12:36:40.809: [gmm] INFO: UE SUPI[imsi-206015500000000] DNN[demo.nokia.mnc001.mcc206.gprs] S_NSSAI[SST:1 SD:0xabcdef] (../src/amf/gmm-handler.c:1248)
03/05 12:36:50.811: [amf] ERROR: [1:0] Cannot receive SBI message (../src/amf/amf-sm.c:705)
03/05 12:36:50.811: [amf] WARNING: [suci-0-206-01-0000-0-0-5500000000] DL NAS transport (../src/amf/nas-path.c:1014)
03/05 12:36:50.999: [gmm] INFO: UE SUPI[imsi-206015500000000] DNN[demo.nokia.mnc001.mcc206.gprs] S_NSSAI[SST:1 SD:0xabcdef] (../src/amf/gmm-handler.c:1248)
03/05 12:36:51.811: [sbi] ERROR: Connection timer expired (../lib/sbi/client.c:533)
03/05 12:36:51.811: [sbi] WARNING: ogs_sbi_client_handler() failed [-3] (../lib/sbi/path.c:61)
03/05 12:37:01.003: [amf] ERROR: [1:0] Cannot receive SBI message (../src/amf/amf-sm.c:705)
03/05 12:37:01.003: [amf] WARNING: [suci-0-206-01-0000-0-0-5500000000] DL NAS transport (../src/amf/nas-path.c:1014)
03/05 12:37:01.226: [gmm] INFO: UE SUPI[imsi-206015500000000] DNN[demo.nokia.mnc001.mcc206.gprs] S_NSSAI[SST:1 SD:0xabcdef] (../src/amf/gmm-handler.c:1248)
03/05 12:37:02.000: [sbi] ERROR: Connection timer expired (../lib/sbi/client.c:533)
03/05 12:37:02.001: [sbi] WARNING: ogs_sbi_client_handler() failed [-3] (../lib/sbi/path.c:61)
The text was updated successfully, but these errors were encountered: