Capif registration failure for Network App

Creating a new topic to highlight this issue.

Goal:
Trying to register and onboard Capif for our NetApp.

Issue:
Registration fails when running the prepare.sh script:

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘capifcore’, port=8080): Max retries exceeded with url: /register (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f2a35c3e9b0>: Failed to establish a new connection: [Errno -2] Name or service not known’))

Steps to reproduce:

  1. Start from scratch: clone Capif repo, run ./run.sh. All services are now running.
  2. Get last NEF emulator version, build and start it. Nef correctly registered into Capif.
  3. Set prepare.sh end of line characters to Unix style (otherwise, it will be skipped or produce errors on Windows).
  4. Add capifcore as extra_hosts in the docker-compose file of the NetApp
  5. Build and run the NetApp container (docker-compose up --build -d). This triggers the prepare.sh script and the error described above.

Hypothesis:
The capifcore is not correctly set, thus the connection cannot be established.

What I have tried

  1. Using extra_hosts to setup capifcore with host-gateway (like in the dummy-netapp)
  2. Same, but with direct ip (172.18.0.1, based on docker inspection to have an idea of potential ip. Also tried with 172.17.0.1 as initially written in prepare.sh script)
  3. Trying to complete /etc/hosts directly (not possible, read-only file system error).

Setup:
Windows 10, Git-for-Windows bash
Last NEF emulator version
Last Capif version
evolved5g SDK version 0.8.3

NetApp Dockerfile:
image

NetApp docker-compose file:

.env file:
image

prepare.sh script:

I have been stuck on this error for quite a while now, thank you in advance for your help.

I was able to make some progress. If I launch the prepare.sh script only with the CMD command in the Dockerfile, the registration is now successfull:

Dockerfile:
image

The thing is that with such configuration I’m not launching the NetApp itself (commented python main.py line) and as far as I understood there can be only 1 CMD command to be executed (others are ignored).

I will continue to investigate, but at least the Capif and onboarding can work on Windows.

Edit: I’m not sure if just relaunching the netApp container (this time to start the NetApp instead of running prepare.sh) is the way to go or if it removes/replaces some elements. I’m able to get a token but creating a Locationsubscriber instance fails because some files seems missing in the capif_onboarding folder.