Hello everyone,
I was just trying to setup a HA cluster following this guide.
The problem is with initializing the controllers.
I run this command:
ziti agent controller init admin REDACTED MK
And I recieve this output:
Error: no processes found matching filter, use 'ziti agent list' to list candidates
Usage:
ziti agent controller init [flags]
Flags:
-a, --app-alias string Alias of host application to talk to (specified in host application)
-i, --app-id string Id of host application to talk to (like controller or router id)
-t, --app-type string Type of host application to talk to (like controller or router)
-h, --help help for init
-p, --pid uint32 Process ID of host application to talk to
-n, --process-name string Process name of host application to talk to
--tcp-addr string Type of host application to talk to (like controller or router)
--timeout duration Operation timeout (default 5s)
no processes found matching filter, use 'ziti agent list' to list candidates
Im not sure what I messed up here. Any help is highly appreciated.
Thanks for your quick reply!
Unfortunately, this yields the same output:
sudo -u ziti-controller ziti agent controller init admin REDACTED MK
Error: no processes found matching filter, use 'ziti agent list' to list candidates
Usage:
ziti agent controller init [flags]
Flags:
-a, --app-alias string Alias of host application to talk to (specified in host application)
-i, --app-id string Id of host application to talk to (like controller or router id)
-t, --app-type string Type of host application to talk to (like controller or router)
-h, --help help for init
-p, --pid uint32 Process ID of host application to talk to
-n, --process-name string Process name of host application to talk to
--tcp-addr string Type of host application to talk to (like controller or router)
--timeout duration Operation timeout (default 5s)
no processes found matching filter, use 'ziti agent list' to list candidates
Just to confirm, the controller is running? You should see something like this in the controller log:
[ 0.351] INFO ziti/controller/network.(*Network).Run: started
[ 1.986] WARNING github.com/hashicorp/raft.(*Raft).runFollower: no known peers, aborting election
[ 3.288] WARNING ziti/controller/server.(*Controller).checkEdgeInitialized: the Ziti Edge has not been initialized, no default admin exists. Please run 'ziti agent controller init' to configure the default admin'
The last message will be repeated on an interval until the controller is initialized.
Thank you. Do you see unable to start CLI agent in the log, by any chance? If it's there, it should include the error which prevented the CLI agent from starting. I'm wondering if maybe there's a permission issue?
I've not seen this issue before. We do have an option to place the named pipe somewhere else when starting the controller, but I'm noticing that we don't have a way to specify it when using the agent, which is a bug. I'll file an issue so I remember to fix that.
I just gave it a fresh start: This time I did not use the package repo and simply used the binary and my config files. It seems I tripped over the extra complexity of the systemd unit file, the entrypoint script and all that stuff.
It works now. Case closed.
Please let me know if this explanation is sufficient. It's about accessing the agent when running a sandboxed systemd service provided by the openziti-controller or openziti-router Linux packages.