The idea behind my project is to create a self-hosted, multi-tenant service access and sharing platform powered by OpenZiti. It wraps the OpenZiti controller in an easy-to-use UI, allowing users to create and share services between accounts.
Each user can have multiple identities, which correspond directly to Ziti identities. Sharing a service grants all the recipient’s identities a role on the OpenZiti controller, allowing them to dial the service owned and controlled by another user.
The service owner should be able to enable or disable a service at any time via a UI button, which will remove the dial role for that service from all identities. In the future, I plan to implement fine-grained control over each identity’s access to services by dynamically adding or removing dial roles.
For more information on my project, see tunnl.app.
Issue description
When my edge tunneler (ZDE for macOS) has the role allowing it to dial a service, it works as expected. However, after:
-
Dialing the service at least once on my Mac,
-
Removing the dial attribute from the identity,
-
Waiting until the service dial disappears from the services list in ZDE for macOS,
-
Adding the dial attribute back to the identity,
-
Waiting until the service dial reappears in the services list in ZDE for macOS,
attempting to dial the service again using the same intercept configuration fails.
Once I restart the edge tunneler, the service can be dialed successfully again.
From the logs, after the service dial role is re-added and appears in the ZDE for macOS UI, it seems the tunneler detects that I’m trying to dial an OpenZiti service, but the connection attempt fails.
Here’s the section I was watching, full logs are at https://pastebin.com/raw/7UvWNZUJ
(7729)\[2025-08-09T17:15:17.603Z\] DEBUG ziti-sdk:connect.c:550 process_connect() conn0.16/cGVlFfMM/Connecting starting Dial connection for service\[portfolio-o2ni0n0dwfkk-UTLcGAGlOnMO\] with session\[cme4ildtx18ezp20lqapv9m3p\]
(7729)\[2025-08-09T17:15:17.603Z\] DEBUG ziti-sdk:connect.c:409 ziti_connect() conn0.16/cGVlFfMM/Connecting selected ch\[tunnl-tester-edge-router@tls://er1.ziti.mesh.ahop.dev:443\] for best latency(58 ms)
(7729)\[2025-08-09T17:15:17.603Z\] TRACE ziti-sdk:connect.c:1123 ziti_channel_start_connection() conn0.16/cGVlFfMM/Connecting ch\[0\] => Edge Connect request token\[f0b33bc8-6276-45cb-afaa-31071fcebe84\]
(7729)\[2025-08-09T17:15:17.603Z\] DEBUG ziti-sdk:channel.c:238 ziti_channel_add_receiver() ch\[0\] added receiver\[16\]
(7729)\[2025-08-09T17:15:17.603Z\] TRACE ziti-sdk:channel.c:435 ziti_channel_send_message() ch\[0\] => ct\[ConnectType\] seq\[45\] len\[36\]
(7729)\[2025-08-09T17:15:17.603Z\] TRACE ziti-sdk:channel.c:405 on_channel_send() ch\[0\] write delay = 0.000d q=1 qs=347
(7729)\[2025-08-09T17:15:17.603Z\] TRACE tunnel-sdk:ziti_tunnel.c:516 check_lwip_timeouts() next wake in 65 millis
(7729)\[2025-08-09T17:15:17.669Z\] TRACE tunnel-sdk:ziti_tunnel.c:516 check_lwip_timeouts() next wake in 250 millis
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:937 on_channel_data() ch\[0\] on_data \[len=129\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:615 process_inbound() ch\[0\] <= ct\[StateClosedType\] seq\[48\] len\[14\] hdrs\[24\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:625 process_inbound() ch\[0\] completing msg seq\[48\] body+hrds=14+24, in_offset=0, want=38, got=38
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:639 process_inbound() ch\[0\] message is complete seq\[48\] ct\[StateClosedType\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:message.c:91 parse_hdrs() parsing headers len\[24\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:message.c:104 parse_hdrs() hdr\[0\] id\[1000\] len\[4\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:message.c:104 parse_hdrs() hdr\[1\] id\[1001\] len\[4\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:connect.c:810 flush_connection() conn0.16/cGVlFfMM/Connecting starting flusher
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:615 process_inbound() ch\[0\] <= ct\[StateClosedType\] seq\[49\] len\[15\] hdrs\[36\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:625 process_inbound() ch\[0\] completing msg seq\[49\] body+hrds=15+36, in_offset=0, want=51, got=51
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:639 process_inbound() ch\[0\] message is complete seq\[49\] ct\[StateClosedType\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:message.c:91 parse_hdrs() parsing headers len\[36\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:message.c:104 parse_hdrs() hdr\[0\] id\[1000\] len\[4\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:message.c:104 parse_hdrs() hdr\[1\] id\[1001\] len\[4\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:message.c:104 parse_hdrs() hdr\[2\] id\[1\] len\[4\]
(7729)\[2025-08-09T17:15:17.749Z\] ERROR ziti-sdk:connect.c:1070 connect_reply_cb() conn0.16/cGVlFfMM/Connecting failed to connect, reason=invalid session
(7729)\[2025-08-09T17:15:17.749Z\] VERBOSE ziti-sdk:connect.c:129 conn_set_state() conn0.16/cGVlFfMM/Connecting transitioning Connecting => Disconnected
(7729)\[2025-08-09T17:15:17.749Z\] DEBUG ziti-sdk:connect.c:323 complete_conn_req() conn0.16/cGVlFfMM/Disconnected Disconnected failed: connection is closed
(7729)\[2025-08-09T17:15:17.749Z\] VERBOSE ziti-sdk:connect.c:129 conn_set_state() conn0.16/cGVlFfMM/Disconnected transitioning Disconnected => Disconnected
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:461 ziti_channel_send() ch\[0\] => ct\[StateClosedType\] seq\[46\] len\[0\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:435 ziti_channel_send_message() ch\[0\] => ct\[StateClosedType\] seq\[46\] len\[0\]
(7729)\[2025-08-09T17:15:17.749Z\] TRACE ziti-sdk:channel.c:405 on_channel_send() ch\[0\] write delay = 0.000d q=1 qs=32
(7729)\[2025-08-09T17:15:17.749Z\] VERBOSE tunnel-cbs:ziti_tunnel_cbs.c:93 on_ziti_connect() on_ziti_connect status: -24
(7729)\[2025-08-09T17:15:17.749Z\] ERROR tunnel-cbs:ziti_tunnel_cbs.c:103 on_ziti_connect() ziti dial failed: connection is closed
(7729)\[2025-08-09T17:15:17.749Z\] VERBOSE ziti-sdk:connect.c:129 conn_set_state() conn0.16/cGVlFfMM/Disconnected transitioning Disconnected => Closed
To answer your questions directly
- I did an in depth investigation into the issue on ZDE for macOS
- My Ziti Desktop Edge Config has the settings
IPv4 Address: 203.0.113.0
Subnet Mask: 255.255.255.0
MTU: 1500
DNS Server: 203.0.113.1
No Override Fallback DNS
Yes to Intercept DNS by Matching Domains
- As of Aug 9th I see no updates available in the App Store for MacOS
- v1.5.4 installed with the quickstart script
- Standalone
- I added and removed the identities dial attribute via the management API, your example of using
#dialers is correct.
- While having the issue
ziti edge policy-advisor identities returns
OKAY : macbook-pro-zOdT8gFblUq7 (1) -> portfolio-o2ni0n0dwfkk-UTLcGAGlOnMO (1) Common Routers: (1/1) Dial: Y Bind: Y
- I tried waiting for 60s and I still had the issue.
- After further investigation it seems the edge tunneler is identifying when a DNS lookup is for a Ziti intercept, but fails to connect to the service. It may have something to do with
Connecting failed to connect, reason=invalid session.
- The log does show the service was authorized.