I don't think I'm understanding the question correctly. Are you asking if I'm encountering this error upon a fresh run of docker compose? If so, yes. I'm using the .env in the Docker Compose quick start and using the simplified-docker-compose yaml. Right after the response you quoted, I made sure to stop all containers, prune all containers, run sudo docker compose down -v and then sudo docker compose up. Experiencing the same issue in Vbox and Proxmox on Ubuntu Server 22.04.1 live server and I selected minimized install upon configuration. Also I'm using a fresh new vm in Vbox and attempted a fresh new vm on proxmox as well.
You can retain ZITI_INTERFACE=0.0.0.0 (the default for that particular Compose file). That controls which network interfaces will listen for port forwarding to the container, and 0.0.0.0 means to listen on all interfaces. It will still work the way you want if you set it to the VBox guest's main IP address, as long as that IP address is reachable from the parent host.
I followed your script on my Ubuntu box and did not encounter the same problem.
That error message is what I'd expect if this part of the controller container's entrypoint script is running at an unexpected time, i.e., after the default admin user has already been created by initializing the database.
if [ ! -f "${ZITI_HOME}/access-control.init" ]; then
: ...
# initialize the database with the admin user:
"${ZITI_BIN_DIR}/ziti" controller edge init "${ZITI_HOME}/${ZITI_CTRL_NAME}.yaml" -u "${ZITI_USER}" -p "${ZITI_PWD}"
The only thing you might try adding to that is --remove-orphans, but that wouldn't make a difference unless you used docker compose run or had modified the Compose file.
Thanks for clarifying that the problem is recurring after a fresh start on Ubuntu Jammy. That may give me enough direction to reproduce the issue. I'll give it a go.
I retained ZITI_INTERFACE=0.0.0.0. I changed that when I was testing on the very first vm I was using. When I used the new vm's, I retained the original .env and yaml. I'm not sure how I may have initialized the database. I created a brand new vm and the very first commands I ran were the two curls for the yaml and .env and the next was sudo docker compose up. I understand I may be doing something wrong but I don't know what that may be.
EDIT: Just saw your second response about the clarification. No worries! Also, correct. I did not use docker compose run or modified any files (.env or yaml after most recent tests).
Suppose your VBox guest's main IP address is 10.11.12.13 and you want to run the Ziti quickstart over there on the guest and use Ziti from the VBox host.
You need to set the advertised address so that your VBox host will know where to look for the Ziti controller and router.
For example,
EXTERNAL_DNS=ziti.10.11.12.13.sslip.io docker compose up --detach (or create an .env file with your variable[s]).
I used the sslip.io domain name (magic wildcard DNS) for this example to avoid hacking the hosts db, running a DNS server, or using a plain IP address, which would require some extra steps.
All-in-one. I should've started a separate thread for that idea to work them in parallel. Still happy to do that. Just let me know which way you're going.
Ah okay okay! Yea so far the all in one has been great! Running just fine but trying to currently find out why docker isn't mounting ./quickstart to my local filesystem. I can exec into the container and I'm assuming ./persistent in the container is what ./quickstart is supposed to be? But yea, I'd love to continue on the all-in-one path since this is working for me currently haha.
Seems like the one you linked isn't up to date with the one in the repo. Had to uncomment the line under the "store the quickstart..." comment in two places to get the mount to work properly with the config files, pki, etc etc
volumes:
# store the quickstart state in a named volume; this mount must align with the "quickstart" service's mount
- persistent:/persistent
# store the quickstart state on the Docker host in the same directory as this compose.yml file
# - ./persistent:/persistent
Seems like the one in the repo fixes this issue. Well, from the looks of it. I'll pull that one too and check it
This line and this line need to change to - ./${ZITI_HOME:-ziti_home}:/home/ziggy to properly mount on local fs. With the change being adding './' before '${ZITI_HOME:-ziti_home}'.
Apologies, covered in the doc linked. This command covers that: ZITI_HOME=./quickstart docker compose up
That's correct! Nice find about qualifying the relative (or absolute) path inside the ZITI_HOME var when overriding the container's internal storage with a Docker host path.