aligungr / UERANSIM

Open source 5G UE and RAN (gNodeB) implementation.
GNU General Public License v3.0
793 stars 322 forks source link

SCTP could not connect #302

Open Hebert007306 opened 3 years ago

Hebert007306 commented 3 years ago

Hi,

A lot of thanks for bringing this nice setup online. And the UERANSIM helped me a lot. However,I met some problems.When I run the gNb and UE , the gNb SCTP could not connect, and the UE PLMN search failed. Maybe my config file exists some problems but I still could not find it. image image

And this is my config file. MY config open5gs.zip

It took me a long time, so I am asking for your help. Looking forward to your reply.

Thanks a lot, Hebert

aligungr commented 3 years ago

Hi Hebert


UE PLMN search failure and other errors should be trivial. Let's look for the SCTP connection refused error first.


SCTP could not connect: Connection refused error usually happens when your IP address 'might' be correct but the target machine actively (explicitly) refused to connect. This happens when:

  1. AMF is not running in the target machine
  2. AMF is running but it's listening a different interface
  3. AMF is running but it's listening a different port number.

By the way, I checked your config files and I could not notifce a mistake. Please make sure that there is not a human-driven error, such as running with the wrong config file, or pointing the wrong machine etc...


Please check this situation, and then I'll ask you the following to share with me:

  1. Two PCAP files captured from RAN's machine and AMF's machine while you receive SCTP connection refuse.
  2. Run cat /proc/net/sctp/eps command while AMF is running, and check if it's listening the correct IP and port number.
  3. Use this tool to check any SCTP connection can be successfully established between RAN's machine and AMF's machine. Just try to send and receive a random SCTP message with any random port number. (UERANSIM and core network should 'not' be running while testing this)

bertl4398 commented 3 years ago

Hi! I am not able to establish the SCTP connection as well, although I get a connection timeout error.

I should mention that I have a Docker Compose setup of the Open5Gs core, everything seems to be running fine, I can also connect with the sctp_test tool as mentioned in the previous comment and also with a different Java SCTP client, but it doesn't work with UERANSIM.

Can I provide you with some traces or logs to look into this?

Thanks and greetings!

aligungr commented 3 years ago

@bertl4398

Followings may be helpful to share:

  1. Two PCAP files from gNB and AMF's machine
  2. Logs of gNB and AMF
  3. Config files of gNB and AMF
  4. IF config information

Regards

bertl4398 commented 3 years ago

thanks @aligungr for the fast reply .. strange enough, I wanted to capture the pcap and had to install additional packages (iproute2 and tshark) into my Ubuntu containers running the Open5Gs components .. after the installation my UERANSIM container could successfully connect as gNB to the AMF. I don't know what is going on, but my guess is that the missing iproute2 package was causing the problem, however probably not solving @Hebert007306 problem.

thanks again and greetings!

Hebert007306 commented 2 years ago

Hi,@aligungr I'm sorry to reply to you just now, because I have been away from this field for a while, but recently I was doing an MEC migration experiment and wanted to build my test environment with Free5gc+UERANSIM. When building the 5G ULCL test environment, I encountered new problems. I spent a lot of time but still haven't solved them and sorry to trouble you. I have published them in the new issues(https://github.com/aligungr/UERANSIM/issues/571). As this experiment is very important for my graduation design, I really hope you can take a moment to have a look. Thank you very much.

FatimaaIsmail27 commented 7 months ago

hi @Hebert007306 I'm having the same exact problem and I'M TOTALLY stuck as I tried everything, did you manage to solve it ? Thank you.