startController is not working.

Could you please tell me about it?
It did not work after reading the instructions and typing the starter router command.
It did not work even if I changed the variables in the env file and read them in with the source command.
What is the cause?

Hi @schinatsu, welcome to the community. the startController function is just a small helper that does these commands:

function startController {
  # shellcheck disable=SC2034
  "${ZITI_BIN_DIR-}/ziti-controller" run "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_CONTROLLER_RAWNAME}.yaml" &> "${log_file}" &
  echo -e "ziti-controller started as process id: $ZITI_EXPRESS_CONTROLLER_PID. log located at: $(BLUE "${log_file}")"

You can see, it’s just running this single command:

"${ZITI_BIN_DIR-}/ziti-controller" run "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_CONTROLLER_RAWNAME}.yaml" &> "${log_file}"

some things to check:

  • can you run “${ZITI_BIN_DIR-}/ziti-controller”? Does that executable execute properly?
  • is there a file located at “${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_CONTROLLER_RAWNAME}.yaml”?
  • the log file it redirects to is located at “${log_file}”. Is there any error in that file?

Can you look to see if a log was created, and if there’s anything in the log that looks like an error?

You could try to just run the ziti-controller binary with the yaml as a parameter. For example, on my local computer that looks like this:

$ /home/cd/.ziti/quickstart/sg3/ziti-bin/ziti-v0.26.11/ziti-controller run /home/cd/.ziti/quickstart/sg3/sg3.yaml