herlesupreeth / docker_open5gs

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

User specified IP address is supported only when connecting to networks with user configured subnets #66

Closed 4rdi28 closed 2 years ago

4rdi28 commented 2 years ago

Hi,

I am really new to all this, meaning open5gs, srsRAN, kamailio and docker. I've tried to get this setup working, as also described in https://open5gs.org/open5gs/docs/tutorial/03-VoLTE-dockerized/. However, when trying to bring the docker-compose up, it tells me that i have some IP configuration error across multiple components:

error

Here are my network interfaces:

interfaces

Here is my .env file (I only changed MCC, MNC and DOCKER_HOST_IP):

env

I run everything from a Linux Ubuntu 20.04.3 VM with the same host system as well.

As of right now I'm a little confused where i have to make the configuration changes for the components. Can someone confirm if the changes to the configuration of the whole setup are primarily done via the .env file?

And regarding the IP issue, is my DOCKER_HOST_IP correct? or am I getting this error for another reason?

Sorry for the bunch of questions, I'm trying to get used to all of this, but it's a lot at once.

Thank you in advance!

herlesupreeth commented 2 years ago

And regarding the IP issue, is my DOCKER_HOST_IP correct? or am I getting this error for another reason?

The problem lies in the commented out IP in .env file above

rather than commenting out as follows (for e.g.)

DOCKER_HOST_IP=10.0.2.15 # 192.168.1.223

do as follows:

DOCKER_HOST_IP=10.0.2.15
#DOCKER_HOST_IP=192.168.1.223

the same for other variables with commented out default values

As of right now I'm a little confused where i have to make the configuration changes for the components. Can someone confirm if the changes to the configuration of the whole setup are primarily done via the .env file?

The only changes required are in .env only if you are running srsRAN eNB, open5gs EPC + kamailio IMS all in one machine

Hope it helps

4rdi28 commented 2 years ago

Thank you for responding!

I deleted the commented out parts, but unfortunately I'm still getting the same error messages. I suspect that since I'm really new to docker (I first used it when I published the first post two days ago), I might have made a mistake during the setup and build process. I proceeded as follows:

  1. I cloned the github repository, and built docker_open5gs and docker_kamailio as described in the readme of this repo, I skipped UERANSIM since I only plan using open5gs, kamailio and srsenb.
  2. I made the adjustments to the .env file as shown above, but this time i completely left out the commented-out parts and just saved the actual values for my setup
  3. I followed the steps under "Build and Run using docker compose" until the command docker-compose up outputs me the same error as mentioned above.

Is there something I'm missing out, possibly something that is related to general interaction/use of docker and docker-compose? I configured the .env file before building the docker-compose. When I make adjustments to the .env file do I have to rebuild the docker-compose in principle?

herlesupreeth commented 2 years ago

Before you run docker-compose up please execute following commands and then run it

docker-compose down docker system prune -f

4rdi28 commented 2 years ago

Thank you! That fixed it.