Hello,
I followed the Docker Compose Quick Start guide and I currently have the network setup correctly it seems. From there, I wanted to evolve it with the Your First Service - Zero Trust Host Access guide that seems almost natural from it, as you already have everything set up.
I found myself stuck in adding an identity to the Ziti Tunneler, so pretty much at the start of it. Basically, I just start up Docker Compose, exec into the Controller, did ZitiLogin and create a .jws enrollment token with the suggested command:
ziti edge create identity user http-client -a 'http-clients' -o http.client.jwt
From this point, on my host machine, which it is Ubuntu, I downloaded the tunneler doing:
curl -sSLf https://get.openziti.io/tun/scripts/install-ubuntu.bash | bash
sudo systemctl enable --now ziti-edge-tunnel.service
At this point, I just needed to load the token created from the controller and typed the command (where that .jws file it is the one generated from the Controller):
sudo ziti-edge-tunnel add --jwt http.client.jwt --identity httpServerConnection
But I got this error:
failed to connect: -111/connection refused
I then tried to run the above command again while the tunner it is running, and got another type of error:
received response <{"Success":false,"Error":"config directory not set","Code":500}>
I tried looking into the web, but the only thing I found, was the OpenZiti troubleshooting section, which, indeed has also this exact error listed, and explained it could happend when running the tunneler both as root and not, something that I think I did. So as it suggested, I deleted the ".ziti" folder and tried again, but it seems to not have worked, but I don't know, maybe I have missed something.
This, seems a really "easy" issue, as it should not be related to all the Docker Compose running and the network created, if I understood it correctly. The tunneler it is another application, running on my host machine, the only link it is that token, which at this point, maybe that's the problem?
Just because it could help, I leave the output of the Tunneler running:
sudo ziti-edge-tunnel run
(502004)[ 0.000] INFO ziti-sdk:utils.c:201 ziti_log_set_level() set log level: root=3/INFO
(502004)[ 0.000] INFO ziti-sdk:utils.c:170 ziti_log_init() Ziti C SDK version 0.36.11 @c9993c3(HEAD) starting at (2024-05-28T21:57:53.360)
RTNETLINK answers: File exists
(502004)[ 0.000] ERROR ziti-edge-tunnel:utils.c:31 run_command_va() cmd{ip route add 100.64.0.0/10 dev ziti1} failed: 512/0/Success
(502004)[ 0.000] INFO tunnel-sdk:ziti_tunnel.c:60 create_tunneler_ctx() Ziti Tunneler SDK (v0.22.29-local)
(502004)[ 0.000] INFO tunnel-cbs:ziti_dns.c:164 seed_dns() DNS configured with range 100.64.0.0 - 100.127.255.255 (4194302 ips)
(502004)[ 0.000] INFO ziti-edge-tunnel:ziti-edge-tunnel.c:1642 make_socket_path() effective group set to 'ziti' (gid=998)
(502004)[ 0.128] INFO ziti-edge-tunnel:resolvers.c:68 init_libsystemd() Initializing libsystemd
(502004)[ 0.138] INFO ziti-edge-tunnel:resolvers.c:356 try_libsystemd_resolver() systemd-resolved selected as DNS resolver manager
Thank in advance to everyone.