LABORA-INF-UFG / paper-MACAK-2022

Untrusted non-3GPP access Wi-Fi use case is a proof-of-concept (PoC) of 5G core access network in which Wi-Fi technology is employed.
Apache License 2.0
10 stars 1 forks source link

N3iwf fail to start #7

Closed Sivanesh1992 closed 8 months ago

Sivanesh1992 commented 9 months ago

hi i am not able to start n3iwf getting below error please help me.

h:my5G-core$ sudo ./bin/n3iwf [sudo] password for sivanesh: 2023-12-04T12:04:14+05:30 [INFO][N3IWF][App] n3iwf 2023-12-04T12:04:14+05:30 [INFO][N3IWF][App] N3IWF version:
version: vSBrT2020-21-gf90d034 build time: 2023-11-30T11:12:12Z commit hash: 1ccc4178 commit time: 2020-09-28T21:05:03Z go version: go1.21.4 linux/amd64 CommonConfig file: config/free5GC.conf 2023-12-04T12:04:14+05:30 [INFO][NAS][Message] set log level : info 2023-12-04T12:04:14+05:30 [INFO][NAS][Message] set report call : true 2023-12-04T12:04:14+05:30 [INFO][LIB][FSM] set log level : info 2023-12-04T12:04:14+05:30 [INFO][LIB][FSM] set report call : true 2023-12-04T12:04:14+05:30 [INFO][LIB][NGAP] set log level : info 2023-12-04T12:04:14+05:30 [INFO][LIB][NGAP] set report call : true 2023-12-04T12:04:14+05:30 [INFO][OAPI][NamfComm] set log level : info 2023-12-04T12:04:14+05:30 [INFO][OAPI][NamfComm] set report call : true 2023-12-04T12:04:14+05:30 [INFO][OAPI][NamfEvent] set log level : info 2023-12-04T12:04:14+05:30 [INFO][OAPI][NamfEvent] set report call : true 2023-12-04T12:04:14+05:30 [INFO][OAPI][NsmfPDUSess] set log level : info 2023-12-04T12:04:14+05:30 [INFO][OAPI][NsmfPDUSess] set report call : true 2023-12-04T12:04:14+05:30 [INFO][OAPI][NudrDataRepo] set log level : info 2023-12-04T12:04:14+05:30 [INFO][OAPI][NudrDataRepo] set report call : true 2023-12-04T12:04:14+05:30 [INFO][LIB][OAPI] set log level : info 2023-12-04T12:04:14+05:30 [INFO][LIB][OAPI] set report call : true 2023-12-04T12:04:14+05:30 [INFO][LIB][Aper] set log level : info 2023-12-04T12:04:14+05:30 [INFO][LIB][Aper] set report call : true 2023-12-04T12:04:14+05:30 [INFO][CommonTest][Comm] set log level : info 2023-12-04T12:04:14+05:30 [INFO][CommonTest][Comm] set report call : true 2023-12-04T12:04:14+05:30 [INFO][N3IWF][Init] Successfully initialize configuration config/n3iwfcfg.conf 2023-12-04T12:04:14+05:30 [INFO][N3IWF][Init] Log level is set to [info] level 2023-12-04T12:04:14+05:30 [INFO][N3IWF][Init] Server started (/home/sivanesh/my5G-core/src/n3iwf/service/init.go:100 free5gc/src/n3iwf/service.(N3IWF).Start) 2023-12-04T12:04:14+05:30 [WARN][N3IWF][Context] No private key file path specified, load default key file... (/home/sivanesh/my5G-core/src/n3iwf/util/initContext.go:115 free5gc/src/n3iwf/util.InitN3IWFContext) 2023-12-04T12:04:14+05:30 [WARN][N3IWF][Context] Parse PKCS8 private key failed: x509: failed to parse private key (use ParsePKCS1PrivateKey instead for this key format) (/home/sivanesh/my5G-core/src/n3iwf/util/initContext.go:133 free5gc/src/n3iwf/util.InitN3IWFContext) 2023-12-04T12:04:14+05:30 [INFO][N3IWF][Context] Parse using PKCS1... (/home/sivanesh/my5G-core/src/n3iwf/util/initContext.go:134 free5gc/src/n3iwf/util.InitN3IWFContext) 2023-12-04T12:04:14+05:30 [WARN][N3IWF][Context] No certificate authority file path specified, load default CA certificate... (/home/sivanesh/my5G-core/src/n3iwf/util/initContext.go:156 free5gc/src/n3iwf/util.InitN3IWFContext) 2023-12-04T12:04:14+05:30 [WARN][N3IWF][Context] No certificate file path specified, load default certificate... (/home/sivanesh/my5G-core/src/n3iwf/util/initContext.go:195 free5gc/src/n3iwf/util.InitN3IWFContext) 2023-12-04T12:04:14+05:30 [INFO][N3IWF][NGAP] [N3IWF] Send NG Setup Request (/home/sivanesh/my5G-core/src/n3iwf/ngap/message/send.go:31 free5gc/src/n3iwf/ngap/message.SendNGSetupRequest) 2023-12-04T12:04:14+05:30 [INFO][N3IWF][Init] NGAP service running. (/home/sivanesh/my5G-core/src/n3iwf/service/init.go:114 free5gc/src/n3iwf/service.(N3IWF).Start) 2023-12-04T12:04:14+05:30 [INFO][N3IWF][Init] NAS TCP server successfully started. (/home/sivanesh/my5G-core/src/n3iwf/service/init.go:123 free5gc/src/n3iwf/service.(N3IWF).Start) 2023-12-04T12:04:14+05:30 [INFO][N3IWF][Init] Listening NWu user plane traffic (/home/sivanesh/my5G-core/src/n3iwf/service/init.go:131 free5gc/src/n3iwf/service.(N3IWF).Start) *2023-12-04T12:04:14+05:30 [ERRO][N3IWF][IKE] Listen UDP failed: listen udp 192.168.127.1:500: bind: address already in use (/home/sivanesh/my5G-core/src/n3iwf/ike/service/service.go:60 free5gc/src/n3iwf/ike/service.listenAndServe) 2023-12-04T12:04:14+05:30 [ERRO][N3IWF][IKE] listenAndServe failed (/home/sivanesh/my5G-core/src/n3iwf/ike/service/service.go:42 free5gc/src/n3iwf/ike/service.Run) 2023-12-04T12:04:14+05:30 [ERRO][N3IWF][Init] Start IKE service failed: IKE service run failed (/home/sivanesh/my5G-core/src/n3iwf/service/init.go:137 free5gc/src/n3iwf/service.(N3IWF).Start)**

Sivanesh1992 commented 9 months ago

in AMF log i am getting below error:

e$ 2023-12-05T17:23:35+05:30 [INFO][AMF][App] amf 2023-12-05T17:23:35+05:30 [INFO][AMF][App] AMF version:
version: vSBrT2020-21-gf90d034 build time: 2023-12-05T11:30:12Z commit hash: be39ddb6 commit time: 2020-10-26T16:33:08Z go version: go1.21.4 linux/amd64 CommonConfig file: config/free5GC.conf 2023-12-05T17:23:35+05:30 [INFO][NAS][Message] set log level : info 2023-12-05T17:23:35+05:30 [INFO][NAS][Message] set report call : true 2023-12-05T17:23:35+05:30 [INFO][LIB][FSM] set log level : info 2023-12-05T17:23:35+05:30 [INFO][LIB][FSM] set report call : true 2023-12-05T17:23:35+05:30 [INFO][LIB][NGAP] set log level : info 2023-12-05T17:23:35+05:30 [INFO][LIB][NGAP] set report call : true 2023-12-05T17:23:35+05:30 [INFO][OAPI][NamfComm] set log level : info 2023-12-05T17:23:35+05:30 [INFO][OAPI][NamfComm] set report call : true 2023-12-05T17:23:35+05:30 [INFO][OAPI][NamfEvent] set log level : info 2023-12-05T17:23:35+05:30 [INFO][OAPI][NamfEvent] set report call : true 2023-12-05T17:23:35+05:30 [INFO][OAPI][NsmfPDUSess] set log level : info 2023-12-05T17:23:35+05:30 [INFO][OAPI][NsmfPDUSess] set report call : true 2023-12-05T17:23:35+05:30 [INFO][OAPI][NudrDataRepo] set log level : info 2023-12-05T17:23:35+05:30 [INFO][OAPI][NudrDataRepo] set report call : true 2023-12-05T17:23:35+05:30 [INFO][LIB][OAPI] set log level : info 2023-12-05T17:23:35+05:30 [INFO][LIB][OAPI] set report call : true 2023-12-05T17:23:35+05:30 [INFO][LIB][Aper] set log level : info 2023-12-05T17:23:35+05:30 [INFO][LIB][Aper] set report call : true 2023-12-05T17:23:35+05:30 [INFO][CommonTest][Comm] set log level : info 2023-12-05T17:23:35+05:30 [INFO][CommonTest][Comm] set report call : true 2023-12-05T17:23:35+05:30 [INFO][AMF][Init] Successfully initialize configuration config/amfcfg.conf 2023-12-05T17:23:35+05:30 [INFO][AMF][Init] Log level is set to [info] level 2023-12-05T17:23:35+05:30 [INFO][AMF][Init] Server started (/home/sivanesh/my5G-core/src/amf/service/amf_init.go:115 free5gc/src/amf/service.(*AMF).Start) [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

[GIN-debug] GET /namf-callback/v1/ --> free5gc/src/amf/httpcallback.Index (4 handlers) [GIN-debug] POST /namf-callback/v1/smContextStatus/:guti/:pduSessionId --> free5gc/src/amf/httpcallback.HTTPSmContextStatusNotify (4 handlers) [GIN-debug] POST /namf-callback/v1/am-policy/:polAssoId/update --> free5gc/src/amf/httpcallback.HTTPAmPolicyControlUpdateNotifyUpdate (4 handlers) [GIN-debug] POST /namf-callback/v1/am-policy/:polAssoId/terminate --> free5gc/src/amf/httpcallback.HTTPAmPolicyControlUpdateNotifyTerminate (4 handlers) [GIN-debug] POST /namf-callback/v1/n1-message-notify --> free5gc/src/amf/httpcallback.HTTPN1MessageNotify (4 handlers) [GIN-debug] GET /namf-oam/v1/ --> free5gc/src/amf/oam.Index (4 handlers) [GIN-debug] GET /namf-oam/v1/registered-ue-context --> free5gc/src/amf/oam.HTTPRegisteredUEContext (4 handlers) [GIN-debug] GET /namf-oam/v1/registered-ue-context/:supi --> free5gc/src/amf/oam.HTTPRegisteredUEContext (4 handlers) [GIN-debug] GET /namf-comm/v1/ --> free5gc/src/amf/communication.Index (4 handlers) [GIN-debug] PUT /namf-comm/v1/subscriptions/:subscriptionId --> free5gc/src/amf/communication.HTTPAMFStatusChangeSubscribeModify (4 handlers) [GIN-debug] DELETE /namf-comm/v1/subscriptions/:subscriptionId --> free5gc/src/amf/communication.HTTPAMFStatusChangeUnSubscribe (4 handlers) [GIN-debug] PUT /namf-comm/v1/ue-contexts/:ueContextId --> free5gc/src/amf/communication.HTTPCreateUEContext (4 handlers) [GIN-debug] POST /namf-comm/v1/ue-contexts/:ueContextId/assign-ebi --> free5gc/src/amf/communication.HTTPEBIAssignment (4 handlers) [GIN-debug] POST /namf-comm/v1/ue-contexts/:ueContextId/transfer-update --> free5gc/src/amf/communication.HTTPRegistrationStatusUpdate (4 handlers) [GIN-debug] POST /namf-comm/v1/ue-contexts/:ueContextId/release --> free5gc/src/amf/communication.HTTPReleaseUEContext (4 handlers) [GIN-debug] POST /namf-comm/v1/ue-contexts/:ueContextId/transfer --> free5gc/src/amf/communication.HTTPUEContextTransfer (4 handlers) [GIN-debug] DELETE /namf-comm/v1/ue-contexts/:ueContextId/n1-n2-messages/subscriptions/:subscriptionId --> free5gc/src/amf/communication.HTTPN1N2MessageUnSubscribe (4 handlers) [GIN-debug] POST /namf-comm/v1/ue-contexts/:ueContextId/n1-n2-messages --> free5gc/src/amf/communication.HTTPN1N2MessageTransfer (4 handlers) [GIN-debug] GET /namf-comm/v1/ue-contexts/:ueContextId/n1-n2-messages/:n1N2MessageId --> free5gc/src/amf/communication.HTTPN1N2MessageTransferStatus (4 handlers) [GIN-debug] POST /namf-comm/v1/ue-contexts/:ueContextId/n1-n2-messages/subscriptions --> free5gc/src/amf/communication.HTTPN1N2MessageSubscribe (4 handlers) [GIN-debug] DELETE /namf-comm/v1/non-ue-n2-messages/subscriptions/:n2NotifySubscriptionId --> free5gc/src/amf/communication.HTTPNonUeN2InfoUnSubscribe (4 handlers) [GIN-debug] POST /namf-comm/v1/non-ue-n2-messages/transfer --> free5gc/src/amf/communication.HTTPNonUeN2MessageTransfer (4 handlers) [GIN-debug] POST /namf-comm/v1/non-ue-n2-messages/subscriptions --> free5gc/src/amf/communication.HTTPNonUeN2InfoSubscribe (4 handlers) [GIN-debug] POST /namf-comm/v1/subscriptions --> free5gc/src/amf/communication.HTTPAMFStatusChangeSubscribe (4 handlers) [GIN-debug] GET /namf-evts/v1/ --> free5gc/src/amf/eventexposure.Index (4 handlers) [GIN-debug] DELETE /namf-evts/v1/subscriptions/:subscriptionId --> free5gc/src/amf/eventexposure.HTTPDeleteSubscription (4 handlers) [GIN-debug] PATCH /namf-evts/v1/subscriptions/:subscriptionId --> free5gc/src/amf/eventexposure.HTTPModifySubscription (4 handlers) [GIN-debug] POST /namf-evts/v1/subscriptions --> free5gc/src/amf/eventexposure.HTTPCreateSubscription (4 handlers) [GIN-debug] GET /namf-mt/v1/ --> free5gc/src/amf/mt.Index (4 handlers) [GIN-debug] GET /namf-mt/v1/ue-contexts/:ueContextId --> free5gc/src/amf/mt.HTTPProvideDomainSelectionInfo (4 handlers) [GIN-debug] POST /namf-mt/v1/ue-contexts/:ueContextId/ue-reachind --> free5gc/src/amf/mt.HTTPEnableUeReachability (4 handlers) [GIN-debug] GET /namf-loc/v1/ --> free5gc/src/amf/location.Index (4 handlers) [GIN-debug] POST /namf-loc/v1/:ueContextId/provide-loc-info --> free5gc/src/amf/location.HTTPProvideLocationInfo (4 handlers) [GIN-debug] POST /namf-loc/v1/:ueContextId/provide-pos-info --> free5gc/src/amf/location.HTTPProvidePositioningInfo (4 handlers) 2023-12-05T17:23:35+05:30 [INFO][AMF][Util] amfconfig Info: Version[1.0.0] Description[AMF initial local configuration] (/home/sivanesh/my5G-core/src/amf/util/init_context.go:18 free5gc/src/amf/util.InitAmfContext) 2023-12-05T17:23:35+05:30 [INFO][AMF][NGAP] Listen on 172.16.0.1:38412 (/home/sivanesh/my5G-core/src/amf/ngap/service/service.go:51 free5gc/src/amf/ngap/service.listenAndServe) 2023-12-05T17:23:43+05:30 [INFO][AMF][NGAP] [AMF] SCTP Accept from: 172.16.0.1/60.60.0.1/192.168.2.189/172.17.0.1/10.1.1.2/10.1.1.3/10.1.1.4/10.1.1.5/10.1.1.6/10.1.1.7/10.1.1.8/10.1.1.9/10.1.1.10/10.1.1.11/172.16.0.2/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1/10.1.2.1:43532 (/home/sivanesh/my5G-core/src/amf/ngap/service/service.go:103 free5gc/src/amf/ngap/service.listenAndServe) 2023-12-05T17:23:45+05:30 [INFO][AMF][NGAP] [AMF] SCTP Accept from: 172.16.0.1/60.60.0.1/192.168.2.189/172.17.0.1/10.1.1.2/10.1.1.3/10.1.1.4/10.1.1.5/10.1.1.6/10.1.1.7/10.1.1.8/10.1.1.9/10.1.1.10/10.1.1.11/172.16.0.2/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1/10.1.2.1:58748 (/home/sivanesh/my5G-core/src/amf/ngap/service/service.go:103 free5gc/src/amf/ngap/service.listenAndServe) 2023-12-05T17:23:45+05:30 [INFO][AMF][NGAP] Create a new NG connection for: 172.16.0.1/60.60.0.1/192.168.2.189/172.17.0.1/10.1.1.2/10.1.1.3/10.1.1.4/10.1.1.5/10.1.1.6/10.1.1.7/10.1.1.8/10.1.1.9/10.1.1.10/10.1.1.11/172.16.0.2/10.200.200.1/10.200.200.2/192.168.127.1/10.0.0.1/10.1.2.1:58748 (/home/sivanesh/my5G-core/src/amf/ngap/dispatcher.go:25 free5gc/src/amf/ngap.Dispatch) 2023-12-05T17:23:45+05:30 [INFO][AMF][NGAP] [AMF] NG Setup request (/home/sivanesh/my5G-core/src/amf/ngap/handler.go:49 free5gc/src/amf/ngap.HandleNGSetupRequest) 2023-12-05T17:23:45+05:30 [INFO][AMF][NGAP] [AMF] Send NG-Setup response (/home/sivanesh/my5G-core/src/amf/ngap/message/send.go:83 free5gc/src/amf/ngap/message.SendNGSetupResponse) **panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x9b6885]

goroutine 14 [running]:** free5gc/src/amf/ngap/message.SendToRan(0xc0000ae0e0, {0xc0000a9280, 0x35, 0x40}) /home/sivanesh/my5G-core/src/amf/ngap/message/send.go:34 +0x65 free5gc/src/amf/ngap/message.SendNGSetupResponse(0xb3f1a0?) /home/sivanesh/my5G-core/src/amf/ngap/message/send.go:90 +0xd8 free5gc/src/amf/ngap.HandleNGSetupRequest(0xc0000ae0e0, 0x3e?) /home/sivanesh/my5G-core/src/amf/ngap/handler.go:147 +0x935 free5gc/src/amf/ngap.Dispatch({0xd17478?, 0xc0002b09b0}, {0xc0000c0000, 0x3e, 0x2000}) /home/sivanesh/my5G-core/src/amf/ngap/dispatcher.go:50 +0x285 free5gc/src/amf/ngap/service.handleConnection(0x0?, 0x2000, 0xc3e150) /home/sivanesh/my5G-core/src/amf/ngap/service/service.go:161 +0x155 free5gc/src/amf/ngap/service.listenAndServe.func1() /home/sivanesh/my5G-core/src/amf/ngap/service/service.go:107 +0x31 created by free5gc/src/amf/ngap/service.listenAndServe in goroutine 6 /home/sivanesh/my5G-core/src/amf/ngap/service/service.go:106 +0x593