Hi everyone,
After having setup a fresh install of Openziti , I thought I would givet Zrok a bash but have hit a wall.
I have followed the self hosting guide on
Self-Hosting Guide for Linux | Zrok
but when running zrok admin bootstrap /etc/ctrl.yml , I see that a new identity public gets added
however the script seems to fail.
.
[ 0.007] INFO zrok/controller/store.Open: database connected
[ 0.058] INFO zrok/controller/store.(*Store).migrate: applied 13 migrations
[ 0.058] INFO zrok/controller.Bootstrap: connecting to the ziti edge management api
[ 0.559] INFO zrok/controller.Bootstrap: creating identity for public frontend access
panic: error enrolling ‘public’ identity: json: cannot unmarshal array into Go struct field EnrollmentClaims.aud of type string
goroutine 1 [running]:
github.com/openziti/zrok/controller.Bootstrap (0x0, 0xc000000004?)
/home/runner/work/zrok/zrok/controller/bootstrap.go:53 +0x61f
main.(*adminBootstrap).run(0xc0004f4070, 0x0?, {0xc0004f4ef0?, 0x0?, 0x0?})
/home/runner/work/zrok/zrok/cmd/zrok/adminBootstrap.go:39 +0xa5
github.com/spf13/cobra.(*Command).execute (0xc000004c00, {0xc0004f4ec0, 0x1, 0x1})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x3189940)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
/home/runner/work/zrok/zrok/cmd/zrok/main.go:98 +0x25
any ideas of what I may be doing wrong?
thanks
This is actually a bug in the current release. It looks like an incompatibility between the current OpenZiti version, and the OpenZiti SDK version used in zrok.
I’m not exactly sure which version of OpenZiti breaks zrok… so I’m not sure which version you could fall back to.
And just updating the OpenZiti SDK results in a different issue. So it might take me a couple of days to work out what’s going on.
Created an issue for it, and it’s on our radar:
opened 04:03PM - 18 Aug 23 UTC
defect
The bootstrap (and possibly other functions) are broken with the latest OpenZiti… `v0.30.0`.
```
[ 0.040] INFO zrok/controller.Bootstrap: creating identity for controller ziti access
panic: error enrolling 'ctrl' identity: json: cannot unmarshal array into Go struct field EnrollmentClaims.aud of type string
goroutine 1 [running]:
github.com/openziti/zrok/controller.Bootstrap(0x0, 0x0, 0xc000000004?)
/home/runner/work/zrok/zrok/controller/bootstrap.go:48 +0x75f
main.(*adminBootstrap).run(0xc00012d160, 0x0?, {0xc00012db20?, 0x0?, 0x0?})
/home/runner/work/zrok/zrok/cmd/zrok/adminBootstrap.go:41 +0xa7
github.com/spf13/cobra.(*Command).execute(0xc000004f00, {0xc00012daf0, 0x1, 0x1})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x317e940)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
/home/runner/work/zrok/zrok/cmd/zrok/main.go:98 +0x25
```
Updating to the latest `sdk-golang` results in a different error:
```
[ 0.034] INFO zrok/controller.Bootstrap: creating identity for public frontend access
panic: error creating 'public' identity: [POST /identities][400] createIdentityBadRequest &{Error:0xc000524540 Meta:0xc00034c080}
goroutine 1 [running]:
github.com/openziti/zrok/controller.Bootstrap(0x0, 0xc000000004?)
/home/michael/Repos/nf/zrok/controller/bootstrap.go:53 +0x5f9
main.(*adminBootstrap).run(0xc000654830, 0x0?, {0xc000655520?, 0x0?, 0x0?})
/home/michael/Repos/nf/zrok/cmd/zrok/adminBootstrap.go:39 +0xa5
github.com/spf13/cobra.(*Command).execute(0xc00036c900, {0xc0006554f0, 0x1, 0x1})
/home/michael/local/zrok/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x863
github.com/spf13/cobra.(*Command).ExecuteC(0x44d9c00)
/home/michael/local/zrok/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
/home/michael/local/zrok/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
/home/michael/Repos/nf/zrok/cmd/zrok/main.go:98 +0x1a
```
zrok v0.4.5 has been released today. This release corrects this issue.
FEATURE: New health check endpoint (/health), which verifies that the underlying SQL store and metrics repository (InfluxDB, if configured) are operating correctly (#372)
FIX: zrok admin bootstrap ...
Thanks Michael will give zrok v0.4.5 a shot