CAPIF 409 Conflict when onboarding Network App to CAPIF

My dockerfile looks like this:

and prepare.sh doesn’t seem to be working.

When using the command manually, sometimes it works but sometimes I get the following error and have to wipe CAPIF completely using the clean services script and then use sudo ./run.sh again.

SDK tools 0.8.7
NEF and CAPIF current latest versions (cloned from github)

409 CONFLICT means that the netapp is already registered so removing it from the database (http://0.0.0.0:8082/db/capif/user) under capif → user makes the command evolved5g register-and-onboard-to-capif --config_file_full_path="/app/capif_registration.json" functional again.

The problem that the prepare.sh script is not executed from the Dockerfile remained. The command CMD ["sh", "prepare.sh"] only runs if it is the last command, so no ENTRYPOINT can be specified after.

Instead, I appended python3 -u NetApp-v3.py in a new line in the prepare.sh script which worked.

Hi Yiannis,

Just for the record to complement your answer above: sometimes deleting the NetApp entry in the capif database is not enough. You can also try to remove the invoker as well.

Also: to avoid the issue about the CMD command as last, there is also the possibility to proceed like the Dummy-NetApp does:

  • Only run the CMD command in your Dockerfile
  • Manually enter into the NetApp container (see terminal_to_py_netapp script)
  • Once inside the container, start your NetApp (Something like python main.py yourOptionsHere…).

I have tested both suggestions above on Windows, it works fine.