srsran / srsRAN_Project

Open source O-RAN 5G CU/DU solution from Software Radio Systems (SRS) https://docs.srsran.com/projects/project
https://www.srsran.com
GNU Affero General Public License v3.0
523 stars 178 forks source link

AMF connection established, but NGAP failed (NGSetupFailure) #907

Closed meong3000 closed 1 week ago

meong3000 commented 3 weeks ago

Issue Description

AMF connection established, but gnb not started & the "t" command for tracing not working

Setup Details

Core: Open5GS RAN: srsRAN Core & RAN on different PC (both Ubuntu 22.04) connected via ethernet USRP b205i mini Driver: UHD 4.7

Expected Behavior

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

Actual Behaviour

image

Log file

image

There are no "gnb started"

Steps to reproduce the problem

Config file:

u_cp:
  amf:
    addr: 192.168.1.1
    port: 38412
    bind_addr: 192.168.1.4 #ip gnb
    sctp_rto_initial: 120                 # Optional INT. Sets the initial retransmission timeout when creating the SCTP connection.
    sctp_rto_min: 120                     # Optional INT. Sets the minimum retransmission timeout for the SCTP connection.
    sctp_rto_max: 500                     # Optional INT. Sets the maximum retransmission timeout for the SCTP connection.
   # sctp_initial_max_attempts: 3          # Optional INT. Sets the maximum retransmission attempts for the initial SCTP connection.
    sctp_max_init_timeo: 500              # Optional INT. Sets the maximum retransmission timeout for the initial SCTP connection.
    sctp_nodelay: false 
#   n2_bind_addr: 192.168.1.2
    supported_tracking_areas:
      - tac: 7
        plmn_list:
          - plmn: "00101"
            tai_slice_support_list:
              - sst: 1

ru_sdr:
  device_driver: uhd
  device_args: type=b200
  clock: default
  srate: 11.52 #23.04
  tx_gain: 75 #80
  rx_gain: 75 #40

cell_cfg:
  dl_arfcn: 368500
  band: 3
  channel_bandwidth_MHz: 10
  common_scs: 15
  plmn: "00101"
  tac: 7
  pdcch:
    dedicated:
      ss2_type: common
      dci_format_0_1_and_1_1: false
    #common:
     # ss0_index: 0
      #coreset0_index: 12
  prach:
    prach_config_index: 1

log:
  filename: /tmp/gnb.log
  all_level: info

pcap:
  mac_enable: enable
  mac_filename: /tmp/gnb_mac.pcap
  ngap_enable: enable
  ngap_filename: /tmp/gnb_ngap.pcap

Additional Information

I'm using the conf file for the srsUE (from the srsRAN documentation), i only want to test the gnB, so i have not used the srsUE in any way

pgawlowicz commented 3 weeks ago

The console trace is displayed only if you have at least one UE connected.

isaahmd commented 3 weeks ago

kelas mas meong

isaahmd commented 3 weeks ago

The console trace is displayed only if you have at least one UE connected.

Is there a correlation between NGAP failure and UE? in this case Rx PDU: NGSetupFailure

pgawlowicz commented 3 weeks ago

@meong3000 could you share your Open5GS config and logs and ngap pcap file?

meong3000 commented 3 weeks ago

@meong3000 could you share your Open5GS config and logs and ngap pcap file?

AMF config

logger:
  file:
    path: /var/log/open5gs/amf.log
#  level: info   # fatal|error|warn|info(default)|debug|trace

global:
  max:
    ue: 1024  # The number of UE can be increased depending on memory size.
#    peer: 64

amf:
  sbi:
    server:
      - address: 127.0.0.5
        port: 7777
    client:
#      nrf:
#        - uri: http://127.0.0.10:7777
      scp:
        - uri: http://127.0.0.200:7777
  ngap:
    server:
      - address: 192.168.1.1
  metrics:
    server:
      - address: 127.0.0.5
        port: 9090
  guami:
    - plmn_id:
        mcc: 001
        mnc: 01
      amf_id:
        region: 2
        set: 1
  tai:
    - plmn_id:
        mcc: 001
        mnc: 01
      tac: 7
  plmn_support:
    - plmn_id:
        mcc: 001
        mnc: 01
      s_nssai:
        - sst: 1
          sd: 000001
  security:
    integrity_order : [ NIA2, NIA1, NIA0 ]
    ciphering_order : [ NEA0, NEA1, NEA2 ]
  network_name:
    full: Open5GS
    short: Next
  amf_name: open5gs-amf0
  time:
#    t3502:
#      value: 720   # 12 minutes * 60 = 720 seconds
    t3512:
      value: 540    # 9 minutes * 60 = 540 seconds

Log file

10/31 16:47:06.666: [app] INFO: Configuration: '/etc/open5gs/amf.yaml' (../lib/app/ogs-init.c:133)
10/31 16:47:06.666: [app] INFO: File Logging: '/var/log/open5gs/amf.log' (../lib/app/ogs-init.c:136)
10/31 16:47:06.668: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.200:7777] (../lib/sbi/context.c:474)
10/31 16:47:06.668: [metrics] INFO: metrics_server() [http://127.0.0.5]:9090 (../lib/metrics/prometheus/context.c:299)
10/31 16:47:06.668: [sbi] INFO: NF Service [namf-comm] (../lib/sbi/context.c:1829)
10/31 16:47:06.669: [sbi] INFO: nghttp2_server() [http://127.0.0.5]:7777 (../lib/sbi/nghttp2-server.c:424)
10/31 16:47:06.669: [amf] INFO: ngap_server() [192.168.1.1]:38412 (../src/amf/ngap-sctp.c:61)
10/31 16:47:06.669: [sctp] INFO: AMF initialize...done (../src/amf/app.c:33)
10/31 16:47:06.670: [sbi] INFO: [171b7422-976d-41ef-960e-53d40e9e0b5d] NF registered [Heartbeat:10s] (../lib/sbi/nf-sm.c:208)
10/31 16:47:06.671: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.10:7777] (../lib/sbi/nnrf-handler.c:949)
10/31 16:47:06.671: [sbi] INFO: [171bdcd2-976d-41ef-bff4-a5e24b7d8e24] Subscription created until 2024-11-01T16:47:06.670630+07:00 [duration:86400000000,validity:86400.000000,patch:43200.000000] (../lib/sbi/nnrf-handler.c:868)
10/31 16:47:06.671: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.10:7777] (../lib/sbi/nnrf-handler.c:949)
10/31 16:47:06.671: [sbi] INFO: [171be038-976d-41ef-bff4-a5e24b7d8e24] Subscription created until 2024-11-01T16:47:06.670712+07:00 [duration:86400000000,validity:86400.000000,patch:43200.000000] (../lib/sbi/nnrf-handler.c:868)
10/31 16:47:06.671: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.10:7777] (../lib/sbi/nnrf-handler.c:949)
10/31 16:47:06.671: [sbi] INFO: [171be466-976d-41ef-bff4-a5e24b7d8e24] Subscription created until 2024-11-01T16:47:06.670821+07:00 [duration:86400000000,validity:86400.000000,patch:43200.000000] (../lib/sbi/nnrf-handler.c:868)
10/31 16:47:06.671: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.10:7777] (../lib/sbi/nnrf-handler.c:949)
10/31 16:47:06.671: [sbi] INFO: [171be75e-976d-41ef-bff4-a5e24b7d8e24] Subscription created until 2024-11-01T16:47:06.670894+07:00 [duration:86400000000,validity:86400.000000,patch:43200.000000] (../lib/sbi/nnrf-handler.c:868)
10/31 16:47:06.671: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.10:7777] (../lib/sbi/nnrf-handler.c:949)
10/31 16:47:06.671: [sbi] INFO: [171beb46-976d-41ef-bff4-a5e24b7d8e24] Subscription created until 2024-11-01T16:47:06.670994+07:00 [duration:86400000000,validity:86400.000000,patch:43200.000000] (../lib/sbi/nnrf-handler.c:868)
10/31 16:47:06.671: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.10:7777] (../lib/sbi/nnrf-handler.c:949)
10/31 16:47:06.671: [sbi] INFO: [171bee3e-976d-41ef-bff4-a5e24b7d8e24] Subscription created until 2024-11-01T16:47:06.671069+07:00 [duration:86400000000,validity:86400.000000,patch:43200.000000] (../lib/sbi/nnrf-handler.c:868)
10/31 16:47:06.671: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.10:7777] (../lib/sbi/nnrf-handler.c:949)
10/31 16:47:06.671: [sbi] INFO: [171bef9c-976d-41ef-bff4-a5e24b7d8e24] Subscription created until 2024-11-01T16:47:06.671105+07:00 [duration:86400000000,validity:86400.000000,patch:43200.000000] (../lib/sbi/nnrf-handler.c:868)
10/31 16:47:06.734: [sbi] INFO: [17204e16-976d-41ef-8a59-836686e02f39] (NRF-notify) NF registered (../lib/sbi/nnrf-handler.c:1133)
10/31 16:47:06.734: [sbi] INFO: [17204e16-976d-41ef-8a59-836686e02f39] (NRF-notify) NF Profile updated [type:SMF] (../lib/sbi/nnrf-handler.c:1147)
10/31 16:47:06.734: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.4:80] (../lib/sbi/context.c:2195)
10/31 16:47:06.734: [sbi] INFO: NF EndPoint(addr) setup [127.0.0.4:7777] (../lib/sbi/context.c:1934)
pgawlowicz commented 3 weeks ago

could you try to connect gnb to amf? and share the logs and ngap pcap

meong3000 commented 2 weeks ago

could you try to connect gnb to amf? and share the logs and ngap pcap

Hi, i tried it again and it's still giving the same output, the ngap pcap is also blank

meong3000 commented 1 week ago

could you try to connect gnb to amf? and share the logs and ngap pcap

update: the problem is now resolved, there was a mismatch on the amf & gnb configuration file about the service differentiator parameter