Error While Running ./run.sh

Hello
When I am trying to run the free5gc it shows an error in nrf

FATA[2020-06-17T12:01:25+05:30]/src/nrf/service/init.go:132 free5gc/src/nrf/service.(*NRF).Start() HTTP server setup failed: %+v listen tcp 127.0.0.1:29510: bind: address already in use NRF=init

I have attached the terminal response in text file

please help me to resolve this error
run.sh.txt (50.3 KB)

It seems that the address is already allocated.
You can please try to confirm the availability of the address before running the program.

which file i should check to know the address is used or not
please help

And the same error repeats for UDM,AUSF,PCF.

You can please try the commands below to check:

  1. The listened TCP process
ss -lntp
  1. UDP listened port
ss -lnup

Dear,
When I run these commands i got the output but all the Ip addresses are unique only but still showing
address has been used

~/go/src/free5gc$ ss -lnup
ss -lnup
State Recv-Q Send-Q Local Address:Port Peer Address:Port
UNCONN 0 0 10.200.200.1:8805 0.0.0.0:* users:((“smf”,pid=3356,fd=29))
UNCONN 0 0 0.0.0.0:59347 0.0.0.0:*
UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:*
UNCONN 0 0 0.0.0.0:68 0.0.0.0:*
UNCONN 0 0 0.0.0.0:631 0.0.0.0:*
UNCONN 0 0 224.0.0.251:5353 0.0.0.0:* users:((“chrome”,pid=2207,fd=39))
UNCONN 0 0 224.0.0.251:5353 0.0.0.0:* users:((“chrome”,pid=2168,fd=103))
UNCONN 0 0 0.0.0.0:5353 0.0.0.0:*
UNCONN 0 0 [::]:34146 [::]:*
UNCONN 0 0 [::]:5353 [::]:*
crrao-aimscs@crrao:~/go/src/free5gc$ ss -lntp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.1:29531 0.0.0.0:* users:((“nssf”,pid=3360,fd=28))
LISTEN 0 128 127.0.0.1:29502 0.0.0.0:* users:((“smf”,pid=3356,fd=30))
LISTEN 0 128 127.0.0.1:29503 0.0.0.0:* users:((“udm”,pid=3359,fd=29))
LISTEN 0 128 127.0.0.1:29504 0.0.0.0:* users:((“udr”,pid=3357,fd=31))
LISTEN 0 128 127.0.0.1:29507 0.0.0.0:* users:((“pcf”,pid=3358,fd=31))
LISTEN 0 128 127.0.0.1:29510 0.0.0.0:* users:((“nrf”,pid=3354,fd=30))
LISTEN 0 128 127.0.0.1:27017 0.0.0.0:*
LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:*
LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
LISTEN 0 128 *:29509 : users:((“ausf”,pid=3361,fd=28))

Whenever you want to rerun the NFs after a crashing, you need to kill the process for each NF, e.g use kill command to kill amf

Dear,
How to kill " amf " ??
I tried using command “~/go/src/free5gc $ sudo kill -l amf”
the terminal showed the output
HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT
CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH POLL PWR SYS

and i have re-run again sudo ./run.sh but the error still exits
please help

Dear ,
@endrigoshi
Thank you !!
Problem 1:
I have killed the ports and re-run again but i am getting an error that
ERRO[2020-06-22T09:23:31+05:30]/src/smf/pfcp/udp/udp.go:34 free5gc/src/smf/pfcp/udp.Run() Failed to listen: listen udp 10.200.200.1:8805: bind: cannot assign requested address SMF=pfcp

SMF is not getting picked up.

Problem 2:
When I Try to run test.registration
./test.sh TestRegistration
INFO[2020-06-22T09:22:19+05:30] /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/src/upf_init.c:164 UpfInit() Config: /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/build/config/upfcfg.test.yaml UPF=Util
INFO[2020-06-22T09:22:19+05:30] Set log level: info UPF=Util
INFO[2020-06-22T09:22:19+05:30] /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/src/up/up_path.c:40 UpRouteInit() APN routes added, main routing table: UPF=Util
INFO[2020-06-22T09:22:19+05:30] /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/lib/knet/src/route.c:202 KnetPrintRoutes() DstIp Gateway Iface Priority RtProto Type UPF=Util
INFO[2020-06-22T09:22:19+05:30] /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 10.200.200.0 /24 0.0.0.0 veth1 0 kernel unicast UPF=Util
INFO[2020-06-22T09:22:19+05:30] /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 60.60.0.0 /24 0.0.0.0 upfgtp0 0 static unicast UPF=Util
mongodb.go:5:2: cannot find package “free5gc/lib/MongoDBLibrary” in any of:
/usr/local/go/src/free5gc/lib/MongoDBLibrary (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/MongoDBLibrary (from $GOPATH)
ranUe.go:7:2: cannot find package “free5gc/lib/UeauCommon” in any of:
/usr/local/go/src/free5gc/lib/UeauCommon (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/UeauCommon (from $GOPATH)
ranUe.go:8:2: cannot find package “free5gc/lib/milenage” in any of:
/usr/local/go/src/free5gc/lib/milenage (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/milenage (from $GOPATH)
decode.go:4:2: cannot find package “free5gc/lib/nas” in any of:
/usr/local/go/src/free5gc/lib/nas (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/nas (from $GOPATH)
packet.go:5:2: cannot find package “free5gc/lib/nas/nasMessage” in any of:
/usr/local/go/src/free5gc/lib/nas/nasMessage (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/nas/nasMessage (from $GOPATH)
packet.go:8:2: cannot find package “free5gc/lib/ngap” in any of:
/usr/local/go/src/free5gc/lib/ngap (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/ngap (from $GOPATH)
decode.go:5:2: cannot find package “free5gc/lib/ngap/ngapType” in any of:
/usr/local/go/src/free5gc/lib/ngap/ngapType (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/ngap/ngapType (from $GOPATH)
mongodb.go:6:2: cannot find package “free5gc/lib/openapi/models” in any of:
/usr/local/go/src/free5gc/lib/openapi/models (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/lib/openapi/models (from $GOPATH)
packet.go:9:2: cannot find package “free5gc/src/test/ngapTestpacket” in any of:
/usr/local/go/src/free5gc/src/test/ngapTestpacket (from $GOROOT)
/home/crrao-aimscs/go/src/free5gc/src/test/ngapTestpacket (from $GOPATH)
security.go:8:2: cannot find package “github.com/aead/cmac” in any of:
/usr/local/go/src/github.com/aead/cmac (from $GOROOT)
/home/crrao-aimscs/go/src/github.com/aead/cmac (from $GOPATH)
mongodb.go:8:2: cannot find package “go.mongodb.org/mongo-driver/bson” in any of:
/usr/local/go/src/go.mongodb.org/mongo-driver/bson (from $GOROOT)
/home/crrao-aimscs/go/src/go.mongodb.org/mongo-driver/bson (from $GOPATH)
INFO[2020-06-22T09:22:22+05:30] /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/src/up/up_path.c:52 UpRouteTerminate() Removing APN routes UPF=Util
INFO[2020-06-22T09:22:22+05:30] /home/crrao-aimscs/.gvm/pkgsets/go1.12/global/src/free5gc/src/upf/src/upf_init.c:297 PacketReceiverThread() Packet receiver thread terminated UPF=Util
ls: cannot access ‘*sslkey.log’: No such file or directory

It is not able to find the mongodb. and sslkey
How to rectify this ?? (I have run the mongodb using “sudo systemctl start mongodb”)

Where do you place free5gc and how’s your go env?