Hi,
I installed the openziti (without GUI) via express install. But whenever I reboot the system the variable unset.
For example below gives blank output
echo ${ZITI_CTRL_EDGE_ADVERTISED_ADDRESS}:${ZITI_CTRL_EDGE_ADVERTISED_PORT}
echo “${ZITI_BIN_DIR-}/ziti” edge list edge-routers
echo $ZITI_BIN_DIR
Kindly suggest a way to keep the variables intact even after reboot.
When you reboot the system, if you want to make use of the environment variables you just need to source the file the quickstart leaves behind containing all these environment variables.
That file is almost always located at $HOME/.ziti/quickstart/$(hostname -s)/$(hostname -s).env
So just source $HOME/.ziti/quickstart/$(hostname -s)/$(hostname -s).env and you’ll be able to see those variables.
Thank you very much for the quick response, very appreciated.
Yes I sourced it. Before reboot i can start stop controller and router and can show output “${ZITI_BIN_DIR-}/ziti” edge list edge-routers, zitiLogin, …
After sourcing, this is the output
root@ub22:/home/sk# echo ${ZITI_CTRL_EDGE_ADVERTISED_ADDRESS}:${ZITI_CTRL_EDGE_ADVERTISED_PORT}
ub22:1280
root@ub22:/home/sk# startController
startController: command not found
root@ub22:/home/sk# startRouter
startRouter: command not found
root@ub22:/home/sk# /root/.ziti/quickstart/ub22/ziti-bin/ziti-v0.29.0/ziti edge list identities
RESTY 2023/08/07 13:10:58 ERROR Get "https://ub22:1280/edge/management/v1/identities": dial tcp IP:1280: connect: connection refused, Attempt 1
RESTY 2023/08/07 13:10:58 ERROR Get "https://ub22:1280/edge/management/v1/identities": dial tcp IP:1280: connect: connection refused, Attempt 2
error: unable to list entities at https://ub22:1280/edge/management/v1/identities in Ziti Controller at https://ub22:1280/edge/management/v1. Error: Get "https://ub22:1280/edge/management/v1/identities": dial tcp IP:1280: connect: connection refused
root@ub22:/home/sk# "${ZITI_BIN_DIR-}/ziti" edge list edge-routers
RESTY 2023/08/07 13:11:05 ERROR Get "https://ub22:1280/edge/management/v1/edge-routers": dial tcp IP:1280: connect: connection refused, Attempt 1
RESTY 2023/08/07 13:11:05 ERROR Get "https://ub22:1280/edge/management/v1/edge-routers": dial tcp IP:1280: connect: error: unable to list entities at https://ub22:1280/edge/management/v1/edge-routers in Ziti Controller at https://ub22:1280/edge/management/v1. Error: Get "https://ub22:1280/edge/management/v1/edge-routers": dial tcp IP:1280: connect: connection refused
root@ub22:/home/sk#
root@ub22:/home/sk# zitiLogin
[ 0.001] INFO ziti/ziti/cmd/helpers.StandardErrorMessage: Connection error: Get https://ub22:1280/.well-known/est/cacerts: dial tcp IP:1280: connect: connection refused
The connection to the server ub22:1280 was refused - did you specify the right host or port?