Docker Compose for Oracle Linux: could not read configuration file [/persistent/ziti-edge-controller.yaml

I am getting this error when starting up a fresh version of the Docker Compose… I made sure I deleted everything.

Any tips on how to debug this one?

I was reading though the documentation and noticed the following entry for Void Linux… though not sure if this is relevant for Oracle Linux

 security_opt:
      - seccomp:unconfined

 [   3.794]   FATAL edge/controller/subcmd.configureController: {error=[unable to load identity (open /openziti/pki/ziti-controller-intermediate/keys/ziti-controller-server.key: no such file or directory)]} could not read configuration file [/persistent/ziti-edge-controller.yaml]
docker-ziti-console-1                    | TLS initialized on port: 8443
docker-ziti-console-1                    | Ziti Server running on port 1408
docker-ziti-controller-1                 | [   0.999]   ERROR ziti/ziti/controller.run: {error=[unable to load identity (open /openziti/pki/ziti-controller-intermediate/keys/ziti-controller-server.key: no such file or directory)] version=[v0.27.2] revision=[7de87562b20d] os=[linux] arch=[amd64] build-date=[2023-01-04T20:13:07Z] go-version=[go1.19.4]} error starting ziti-controller
docker-ziti-controller-1                 | panic: unable to load identity (open /openziti/pki/ziti-controller-intermediate/keys/ziti-controller-server.key: no such file or directory)
docker-ziti-controller-1                 | 
docker-ziti-controller-1                 | goroutine 1 [running]:
docker-ziti-controller-1                 | github.com/openziti/ziti/ziti/controller.run(0xc0008f8300?, {0xc0008eb0e0, 0x1, 0x1?})
docker-ziti-controller-1                 | 	github.com/openziti/ziti/ziti/controller/run.go:56 +0xc6a
docker-ziti-controller-1                 | github.com/spf13/cobra.(*Command).execute(0xc0008f8300, {0xc0008eb0b0, 0x1, 0x1})
docker-ziti-controller-1                 | 	github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
docker-ziti-controller-1                 | github.com/spf13/cobra.(*Command).ExecuteC(0xc0008f8000)
docker-ziti-controller-1                 | 	github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
docker-ziti-controller-1                 | github.com/spf13/cobra.(*Command).Execute(...)
docker-ziti-controller-1                 | 	github.com/spf13/cobra@v1.6.1/command.go:968
docker-ziti-controller-1                 | github.com/openziti/ziti/ziti/controller.Execute()
docker-ziti-controller-1                 | 	github.com/openziti/ziti/ziti/controller/root.go:74 +0x1e
docker-ziti-controller-1                 | main.main()
docker-ziti-controller-1                 | 	github.com/openziti/ziti/ziti-controller/main.go:47 +0x17

PS.. I just tried again with this entry .. which did not change anything.

I also tried using the su user… same result.

Any tips… I am keen to get this working again

When I did a bit of looking around… I believe I had some old files in the following folder

/var/lib/docker/volumes/docker_ziti-fs/_data

So… I did a more thorough restart of the docker environment… and restarted it.

However… this time I received the following errors…

I took a look through the latest env file which is missing these entries… I will add them back and hopefully I will be back up and running

WARN[0000] The "ZITI_EDGE_CONTROLLER_PORT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ZITI_EDGE_CONTROLLER_PORT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ZITI_CTRL_PORT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ZITI_CTRL_PORT" variable is not set. Defaulting to a blank string.

Seems as if it did the trick…

I needed to use the following to remove the old stuff that was creating the problem

removecontainers() {
    docker stop $(docker ps -aq)
    docker rm $(docker ps -aq)
}

armageddon() {
    removecontainers
    docker network prune -f
    docker rmi -f $(docker images --filter dangling=true -qa)
    docker volume rm $(docker volume ls --filter dangling=true -q)
    docker rmi -f $(docker images -qa)
}

Well done for getting this solved! Looking at the logs, I gather you used docker-compose on this host awhile ago, and then just come back to it, updated the docker-compose and ran into this trap?!. I am thinking this because of

in particular, this part /openziti/. A few months ago, there was a breaking change for the docker-compose environment, and a rejig of locations. /openziti no longers exists, and it is now /persistent. This was done for a couple of reasons, but the major one was because updating the container DID NOT update the binary components (well it did in the container, but they were referencing the old one in the /openziti volume.

For completeness, Geoff put instructions here: Bump on openziti docker images please - #10 by gberl002 on how to migrate.

@TheLumberjack think we should update the documentation with reference to this change to help anyone else who might come across this.

So, in your case, removing the docker volume (docker volume rm ziti-fs) would have most likely resolved the problem (meant starting from fresh), or having the article available could have meant fixing up without having to start at ground zero.

Either way, great job!