MongoDB Error when running NRF

I was trying to run free5gc using ./run.sh but I was getting several errors. After digging into the logs I found out that NRF was no running properly.

When I run the NRF using ./bin/nrf I get the following error:

time=“2021-02-15T19:27:02+01:00” level=fatal msg="(BadValue) $or must be an array" category=MonDB component=LIB

I have tried reinstalling free5gc from scratch but I still get the same error. I attach a fail containing the logs os trying to run just NRF (./bin/nrf) and the whole core (./run.sh).

free5gc.txt (185.1 KB)

Thank you in advanced.

Hi Cristina

What version of free5GC are you using?

I had the same issue with free5GC v3.0.5 due to a mistake in the SMF config (it’s just an example).

So, can you run NFs individually starting by the NRF to identify what is the NF registration that causes the problem.

Moreover, I see in your logs that the AMF failed to start.
time=“2021-02-15T19:17:22+01:00” level=error msg=“Failed to listen: address already in use” category=NGAP component=AMF

Are you cleaning correctly your envirnment?

Do ps -aux to be sure that no NF is already running before running all the NFs

Hi @raoufkh,

I am facing similar issue. NRF pod keeps failing with below error:

INFO[2022-02-28T13:05:08Z]/go/src/free5gc/src/nrf/service/init.go:79 free5gc/src/nrf/service.(*NRF).Initialize() Log level is set to [info] level NRF=init
INFO[2022-02-28T13:05:08Z]/go/src/free5gc/src/nrf/service/init.go:104 free5gc/src/nrf/service.(*NRF).Start() Server started NRF=init
INFO[2022-02-28T13:05:08Z]/go/src/free5gc/src/nrf/context/nrf_context.go:20 free5gc/src/nrf/context.InitNrfContext() nrfconfig Info: Version[1.0.0] Description[NRF initial local configuration] NRF=init
INFO[2022-02-28T13:05:08Z]/go/src/free5gc/src/nrf/service/init.go:117 free5gc/src/nrf/service.(*NRF).Start() nrf-endpoints:29510 NRF=init
INFO[2022-02-28T13:06:42Z]/go/src/free5gc/src/nrf/management/api_management.go:695 free5gc/src/nrf/management.setLocationHeader() urilist update NRF=ManagementLog
FATA[2022-02-28T13:06:42Z]/go/src/free5gc/lib/MongoDBLibrary/api_mongoDB.go:53 free5gc/lib/MongoDBLibrary.RestfulAPIGetMany() (BadValue) $or must be an array MongoDB=MongoDB

#########

In SMF, we see the below error.

2022-02-28T12:46:38Z [INFO][SMF][Consumer] SMF register to NRF Error[Put “http://nrf:29510/nnrf-nfm/v1/nf-instances/e2fb9e4b-964b-4348-8d0d-6057be775b5c”: unexpected EOF]
2022-02-28T12:48:51Z [INFO][SMF][Consumer] SMF register to NRF Error[Put “http://nrf:29510/nnrf-nfm/v1/nf-instances/e2fb9e4b-964b-4348-8d0d-6057be775b5c”: dial tcp 10.152.183.81:29510: connect: connection timed out]

Mongodb has no error and showing below tables

use free5gc
switched to db free5gc
show collections
NfProfile
urilist

#######
smf, nrf and upf config files and uerouting.yaml is are attached. Could you help finding out the cause. There seems to be no error in formatting of these files. An “unexpected EOF” generally points to a malformed config file.

uerouting.yaml.txt (776 Bytes)

nrfcfg.conf.txt (345 Bytes) smfcfg.conf.txt (832 Bytes) upfcfg.conf.txt (475 Bytes)

This issue is resolved after using previous version of free5gc (3.0.3). But currently ngap communication establishment between gnb and amf is not working.