You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting the tunnel using command line ziti-edge-tunnel run --identity-dir /opt/openziti/etc/identities --verbose 4 --dns-ip-range 100.64.0.1/24, the identity json files created by ziti-edge-tunnel enroll are correctly loaded.
The relevant logs are
(2555)[ 0.046] DEBUG ziti-sdk:config.c:58 ziti_load_config() trying to load config from file[/opt/openziti/etc/identities/wan-client.json]
(2555)[ 0.046] INFO tunnel-cbs:ziti_tunnel_ctrl.c:907 load_ziti_async() attempting to load ziti instance[/opt/openziti/etc/identities/wan-client.json]
(2555)[ 0.046] INFO tunnel-cbs:ziti_tunnel_ctrl.c:914 load_ziti_async() loading ziti instance[/opt/openziti/etc/identities/wan-client.json]
(2555)[ 0.046] INFO ziti-edge-tunnel:ziti-edge-tunnel.c:1136 load_id_cb() identity[/opt/openziti/etc/identities/wan-client.json] loaded
However, when starting the tunnel using systemd systemctl start ziti-edge-tunnel.service, the identity json files seem to be recognized as enroll JWT tokens.
root@openziti-wan-client:~# cat /opt/openziti/etc/ziti-edge-tunnel.env
# all enrollment tokens named *.jwt are consumed and replaced with identity JSON files to be loaded at startup
ZITI_IDENTITY_DIR='/opt/openziti/etc/identities'
# reserved dynamic IP range for proxied services
ZITI_DNS_IP_RANGE='100.64.0.1/10'
# the log level specified in /var/lib/ziti/config.json has higher precedence than this env var; delete or modify that
# file or set via IPC "ziti-edge-tunnel set_log_level --loglevel DEBUG"
ZITI_VERBOSE=4
I was able to reproduce this issue with ziti-edge-tunnel v1.0.3, and I was also able to work around it by ensuring that the files in the identity directory are readable by the ziti user that the systemd unit uses to run ziti-edge-tunnel.
Apparently the code that checks if the identity file was able to be successfully opened is not working as expected. I'll dig into this further, but wanted to provide the potential workaround in the meantime.
If not practical to handle gracefully or correct within the ambient capabilities granted by systemd to ZET, an alternative is a privileged timer unit to correct owners and modes.
and I was also able to work around it by ensuring that the files in the identity directory are readable by the ziti user that the systemd unit uses to run ziti-edge-tunnel.
Thank you for the workaround! I didn't realize it was a permission issue.
Issue
When starting the tunnel using command line
ziti-edge-tunnel run --identity-dir /opt/openziti/etc/identities --verbose 4 --dns-ip-range 100.64.0.1/24
, the identity json files created byziti-edge-tunnel enroll
are correctly loaded.The relevant logs are
The DNS query succeeded
However, when starting the tunnel using systemd
systemctl start ziti-edge-tunnel.service
, the identity json files seem to be recognized as enroll JWT tokens.journalctl -xeu ziti-edge-tunnel
showsAnd indeed the DNS query fails
Expected Behavior
Starting the tunnel with default systemd service file should behave the same as starting using command line.
Additional Information
Shipped systemd service file
env file
identity json file
The text was updated successfully, but these errors were encountered: