Ziti-Router Deployment Error

Hi I'm trying to stand up an edge-router in an isolated, disconnected environment hosted on an esxi host running vms. I have the controller deployed already in a separate VM and created the identity for the edge-router. I am trying to deploy the edge-router in a separate VM on the same host that I already confirmed can ping the controller hosted VM. After moving over the router-associated jwt enrollment token into the separate router-VM and running through the deployment steps, your bootstrap bash script fails for my instance and outputs a malformed token as the cause for the failure in the tmp file. Can anyone help me determine a path forward for this? Not sure how to remediate.

I'll dump the full contents of the tmp file in this post:

INFO: config file exists in /var/lib/private/ziti-router/config.yml
{"cause":"token is malformed: token contains an invalid number of segments","file":"github.com/openziti/ziti/router/enroll/enroll.go:98","func":"github.com/openziti/ziti/router/enroll.(*RestEnroller).Enroll","level":"fatal","msg":"failed to parse JWT","time":"2025-01-27T16:43:40.010Z"}
DEBUG: using config file: /var/lib/private/ziti-router/config.yml
DEBUG: preparing working directory: /var/lib/private/ziti-router
DEBUG: ZITI_ENROLL_TOKEN is defined in /opt/openziti/etc/router/bootstrap.env
DEBUG: using config: /var/lib/private/ziti-router/config.yml

Hi @elibrown333, welcome to the community and to OpenZiti (and zrok/BrowZer)!

A malformed token is strange. It makes me think the token was perhaps corrupt or just empty? We probably need more details. With the controller running, you're able to authenticate using the ziti CLI, right?

Have you inspected the token to make sure it's not corrupt? You're doing this all immediately too right, you didn't say pause in between making the controller and trying to enroll a router?

It's often helpful for us to see the full output of a command. Sometimes we can see abnormalities that aren't obvious if you don't look at these logs all the time...

Also if you can supply the full command you ran, and any relevant details, that's often useful too. One final thing, the controller has an "advertise" address, you're sure this new VM is able to connect to the controller, right? I would expect a totally different error, but if it can't connect, that might be why/how the .jwt ends up empty/malformed...

Those are some thoughts

2 Likes