herlesupreeth / docker_open5gs

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

IMS register fail for pcrf error log "AAASendMessage(): Can't find a suitable connected peer in the routing table" #325

Open lglhust opened 4 months ago

lglhust commented 4 months ago

Dear herlesupreeth, I made a test :Several volte mobile accessed into eNB, some of them made call and hung up periodically . After some time, ims registrations all failed. I found pcscf error log below periodically when try to ims register : 2024-05-28T13:32:30.952258+08:00 spid-YL-CLU6L-V1 pcscf[13401]: ERROR: {1 750211591 REGISTER 750211591_1277609064@172.60.5.12} cdp [routing.c:296]: get_routing_peer(): get_routing_peer(): No connected DefaultRoute peer found for app_id 16777236 and vendor id 10415. 2024-05-28T13:32:30.952346+08:00 spid-YL-CLU6L-V1 pcscf[13401]: ERROR: {1 750211591 REGISTER 750211591_1277609064@172.60.5.12} cdp [diameter_comm.c:144]: AAASendMessage(): AAASendMessage(): Can't find a suitable connected peer in the routing table.

And the RX reconnection appeared periodically ,which could be found in packet capture: 2024-05-28T13:32:49.595500+08:00 spid-YL-CLU6L-V1 pcscf[13372]: INFO: cdp [receiver.c:1006]: peer_connect(): peer_connect(): Trying to connect to 127.0.0.9 port 3868 2024-05-28T13:32:49.595621+08:00 spid-YL-CLU6L-V1 pcscf[13372]: INFO: cdp [receiver.c:1106]: peer_connect(): peer_connect(): Peer pcrf.epc.mnc009.mcc460.3gppnetwork.org:3868 connected

PCRF error log periodically : [diam] ERROR: pid:PSM/pcscf.ims.mnc009.mcc460.3gppnetwork.org in fd_p_ce_handle_newCER@p_ce.c:1138: pcscf.ims.mnc009.mcc460.3gppnetwork.org: Rejecting new connection attempt while our state machine is in state 'STATE_SUSPECT'

image image image image

After 100 trying of registration, no procedure continued for failing to send AAR to PCRF. I restart only pcrf but no works.

lglhust commented 4 months ago

The log and capture are: ims-reg-fail.zip

herlesupreeth commented 4 months ago

05/28 11:17:49.893: [diam] ERROR: pid:PSM/pcscf.ims.mnc009.mcc460.3gppnetwork.org in fd_p_ce_handle_newCER@p_ce.c:1138: pcscf.ims.mnc009.mcc460.3gppnetwork.org: Rejecting new connection attempt while our state machine is in state 'STATE_OPEN' ((null):0) 05/28 11:18:13.500: [diam] ERROR: pid:PSM/pcscf.ims.mnc009.mcc460.3gppnetwork.org in fd_psm_change_state@p_psm.c:287: 'STATE_OPEN' -> 'STATE_SUSPECT' 'pcscf.ims.mnc009.mcc460.3gppnetwork.org' ((null):0)

It looks like there are multiple P-CSCF with same Host IP, Origin Realm + Host trying to attempt to connect to PCRF

After which PCRF blocks connection attempts from P-CSCF

05/28 11:18:19.896: [diam] ERROR: pid:PSM/pcscf.ims.mnc009.mcc460.3gppnetwork.org in fd_p_ce_handle_newCER@p_ce.c:1138: pcscf.ims.mnc009.mcc460.3gppnetwork.org: Rejecting new connection attempt while our state machine is in state 'STATE_SUSPECT' ((null):0)

btw, if you not using docker_open5gs, i would suggest to open the issue in open5gs repo

lglhust commented 4 months ago

Thanks. When the error occurred, i saw there was only one pcscf. I will paste it in open5gs repo later.

Another question, i found several core dumps of PCSCF and could find the error code line with gdb bt, but not capturing the corresponding pcscf debug logs . Should I paste them here , or to the kamailio repo ?

herlesupreeth commented 4 months ago

Another question, i found several core dumps of PCSCF and could find the error code line with gdb bt, but not capturing the corresponding pcscf debug logs . Should I paste them here , or to the kamailio repo ?

I would suggest to paste here and also in kamailio repo. If you paste them here I can check whether I can fix it or not and push the fix upstream

lglhust commented 4 months ago

image image image image image

For the last one, NULL pointer, some codes calling AAACreateAVP() are lack of protection. But i have no idea about how null pointer is formed.

Thanks.