Borjis131 / docker-open5gs

Open5GS 5G Core Docker images and Docker compose deployments
GNU Affero General Public License v3.0
20 stars 11 forks source link

Open5GS initialization failed. Aborted #6

Closed r00tb33 closed 8 months ago

r00tb33 commented 9 months ago

Hi @Borjis131 ,

I've built the basic deployment and the docker images are up and running but I am facing the following errors for all the core components...

$ docker-compose -f compose-files/basic/docker-compose.yaml --env-file=/home/amit/docker-open5gs/.env up
WARNING: Some services (amf, ausf, bsf, nrf, nssf, pcf, smf, udm, udr, upf) use the 'configs' key, which will be ignored. Compose does not support 'configs' configuration - use `docker stack deploy` to deploy to a swarm.
WARNING: Volume open5gs_db_data: label "org.open5gs.mongodb_version" has changed. It may need to be recreated.
WARNING: Volume open5gs_db_config: label "org.open5gs.mongodb_version" has changed. It may need to be recreated.
Starting db   ... done
Starting nrf ... done
Starting upf ... done
Starting ausf ... done
Starting amf  ... done
Starting bsf  ... done
Starting nssf ... done
Starting udm  ... done
Starting smf  ... done
Starting udr  ... done
Starting pcf  ... done
Attaching to upf, nrf, db, ausf, amf, nssf, pcf, bsf, udm, udr, smf
ausf    | 10/12 10:54:31.028: [app] FATAL: cannot open file `/open5gs/config/ausf.yaml` (../lib/app/ogs-init.c:171)
ausf    | 10/12 10:54:31.028: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:30.550+00:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
bsf     | 10/12 10:54:32.027: [app] FATAL: cannot open file `/open5gs/config/bsf.yaml` (../lib/app/ogs-init.c:171)
bsf     | 10/12 10:54:32.027: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:30.551+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
amf     | 10/12 10:54:31.209: [app] FATAL: cannot open file `/open5gs/config/amf.yaml` (../lib/app/ogs-init.c:171)
amf     | 10/12 10:54:31.209: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:30.551+00:00"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"bad57dde1560"}}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"6.0.10","gitVersion":"8e4b5670df9b9fe814e57cb5f3f8ee9407237b5a","openSSLVersion":"OpenSSL 3.0.2 15 Mar 2022","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2204","distarch":"x86_64","target_arch":"x86_64"}}}}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"22.04"}}}
db      | {"t":{"$date":"2023-10-12T10:54:30.552+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"0.0.0.0","port":27017}}}}
ausf exited with code 255
nrf     | 10/12 10:54:30.500: [app] FATAL: cannot open file `/open5gs/config/nrf.yaml` (../lib/app/ogs-init.c:171)
nrf     | 10/12 10:54:30.500: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
nssf    | 10/12 10:54:31.387: [app] FATAL: cannot open file `/open5gs/config/nssf.yaml` (../lib/app/ogs-init.c:171)
nssf    | 10/12 10:54:31.387: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:30.553+00:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}}
db      | {"t":{"$date":"2023-10-12T10:54:30.553+00:00"},"s":"I",  "c":"STORAGE",  "id":22297,   "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]}
db      | {"t":{"$date":"2023-10-12T10:54:30.553+00:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=15477M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
nrf exited with code 255
db      | {"t":{"$date":"2023-10-12T10:54:31.126+00:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":573}}
db      | {"t":{"$date":"2023-10-12T10:54:31.126+00:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
amf exited with code 255
bsf exited with code 255
nssf exited with code 255
db      | {"t":{"$date":"2023-10-12T10:54:31.139+00:00"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
db      | {"t":{"$date":"2023-10-12T10:54:31.139+00:00"},"s":"W",  "c":"CONTROL",  "id":5123300, "ctx":"initandlisten","msg":"vm.max_map_count is too low","attr":{"currentValue":65530,"recommendedMinimum":1677720,"maxConns":838860},"tags":["startupWarnings"]}
pcf     | 10/12 10:54:31.665: [app] FATAL: cannot open file `/open5gs/config/pcf.yaml` (../lib/app/ogs-init.c:171)
pcf     | 10/12 10:54:31.665: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:31.140+00:00"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":17,"maxWireVersion":17},"outgoing":{"minWireVersion":17,"maxWireVersion":17},"isInternalClient":true}}}
db      | {"t":{"$date":"2023-10-12T10:54:31.140+00:00"},"s":"I",  "c":"REPL",     "id":5853300, "ctx":"initandlisten","msg":"current featureCompatibilityVersion value","attr":{"featureCompatibilityVersion":"6.0","context":"startup"}}
db      | {"t":{"$date":"2023-10-12T10:54:31.140+00:00"},"s":"I",  "c":"STORAGE",  "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"}
smf     | 10/12 10:54:33.407: [app] FATAL: cannot open file `/open5gs/config/smf.yaml` (../lib/app/ogs-init.c:171)
smf     | 10/12 10:54:33.407: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:31.141+00:00"},"s":"I",  "c":"CONTROL",  "id":20536,   "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
db      | {"t":{"$date":"2023-10-12T10:54:31.141+00:00"},"s":"I",  "c":"FTDC",     "id":20625,   "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}}
udm     | 10/12 10:54:32.402: [app] FATAL: cannot open file `/open5gs/config/udm.yaml` (../lib/app/ogs-init.c:171)
udm     | 10/12 10:54:32.402: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
udr     | 10/12 10:54:32.725: [app] FATAL: cannot open file `/open5gs/config/udr.yaml` (../lib/app/ogs-init.c:171)
udr     | 10/12 10:54:32.725: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:31.142+00:00"},"s":"I",  "c":"REPL",     "id":6015317, "ctx":"initandlisten","msg":"Setting new configuration state","attr":{"newState":"ConfigReplicationDisabled","oldState":"ConfigPreStart"}}
db      | {"t":{"$date":"2023-10-12T10:54:31.142+00:00"},"s":"I",  "c":"STORAGE",  "id":22262,   "ctx":"initandlisten","msg":"Timestamp monitor starting"}
udm exited with code 255
upf     | Error: open /open5gs/config/upf.yaml: no such file or directory
upf     | 10/12 10:54:30.479: [app] FATAL: cannot open file `/open5gs/config/upf.yaml` (../lib/app/ogs-init.c:171)
upf     | 10/12 10:54:30.479: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
db      | {"t":{"$date":"2023-10-12T10:54:31.143+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
db      | {"t":{"$date":"2023-10-12T10:54:31.143+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}}
db      | {"t":{"$date":"2023-10-12T10:54:31.143+00:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
upf exited with code 255
smf exited with code 255
pcf exited with code 255
udr exited with code 255
udr exited with code 255
pcf exited with code 255
udr     | 10/12 10:54:37.670: [app] FATAL: cannot open file `/open5gs/config/udr.yaml` (../lib/app/ogs-init.c:171)
udr     | 10/12 10:54:37.670: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
udr exited with code 255
pcf exited with code 255
udr     | 10/12 10:54:41.191: [app] FATAL: cannot open file `/open5gs/config/udr.yaml` (../lib/app/ogs-init.c:171)
udr     | 10/12 10:54:41.191: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:210)
udr exited with code 255
pcf exited with code 255
udr exited with code 255
^CGracefully stopping... (press Ctrl+C again to force)
Stopping pcf  ... done
Stopping udr  ... done
Stopping db   ... done

Why are the "yaml" files not readable?

Also, I've the above "yaml" files in docker-open5gs/configs/basic/*.yaml location.

I am not able to figure out why the binaries are looking for the config in other location.

Pls suggest how to proceed ahead!!

Thanks.

Borjis131 commented 8 months ago

Hi,

Because for whatever reason it seems not to like the configs section in the docker-compose.yaml file. So it is not mounting the volumes with the YAML files.

This issue is related to the other one you posted days ago. Could you please tell me which docker and docker compose version are you using?

r00tb33 commented 8 months ago

Hi @Borjis131 ,

Docker : Docker version 20.10.17, build 100c701

Docker-compose : docker-compose version 1.28.5, build c4eb3a1f

Thanks for the response!!

Borjis131 commented 8 months ago

Thanks @r00tb33, I am unable to test it now but I will reply as soon as I try it.

Borjis131 commented 8 months ago

Hi @r00tb33,

The issue is that you are using the docker-compose binary instead of the docker compose. Those two are different versions of compose and the docker-compose one is deprecated, you can see a bit of explanation here.

If you want to continue using this version, you need to adapt the existing docker-compose.yaml files to this format.

I am using the docker engine version 24.0.3 with the docker compose plugin version v2.19.1.

If you want to update your environment, uninstall docker and docker-compose and then install a newer docker version with the docker compose plugin.

Hope it helps!

r00tb33 commented 8 months ago

Thanks it worked with compose plugin.