I’m new to using OpenZiti and this whole zero trust concep. I have a MeteorJS application that I want it to be under a OpenZiti docker compose configuration and be able to later connect to Redis and MongoDB, that’s the plan.
But ziti.init does not console.error anything. It just hangs in the await and does nothing else. The file it's found and it exists, the container has the right network.
I know OpenZiti is not only creating an identity and that's it, but I wanted to start from somewhere fist and start learning and creating the necessary configs along the way.
PD: This is the docker service config for the development mode, which will connect to my host Redis and MongoDB instances (they will not be in a docker container), in the production configuration it will connect to these services that are hosted externally, for both scenarios I will need Tunnelers, right?
If you let it sit there for a few minutes, does anymore output come out? Can you somehow ensure / prove the node container can connect to the controller using the hostname and port: ziti-edge-controller:1280?
Nope, I let it for a good while and nothing else came back.
An yes, the app container can see the controller container, I made a curl from the app container to https://ziti-edge-controller:1280/edge/client/v1 and got a response instantly
However, if I edit the identity file and I change the port i never get the "ZITI INITIALIZED" message. I do however get continued output every 15s like I would expect:
$ ZITI_LOG=4 node index.js
(node:210833) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///tmp/ziti-node-test/index.js is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /tmp/ziti-node-test/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(210833)[ 0.000] INFO ziti-sdk:utils.c:198 ziti_log_set_level() set log level: root=4/DEBUG
(210833)[ 0.000] INFO ziti-sdk:utils.c:167 ziti_log_init() Ziti C SDK version 1.4.4 @g9a16a32(HEAD) starting at (2025-08-20T17:47:00.158)
(210833)[ 0.034] INFO ziti-sdk:ziti.c:519 ziti_start_internal() ztx[0] enabling Ziti Context
(210833)[ 0.034] INFO ziti-sdk:ziti.c:536 ziti_start_internal() ztx[0] using tlsuv[v0.33.6/OpenSSL 3.0.16 11 Feb 2025]
(210833)[ 0.034] INFO ziti-sdk:ziti_ctrl.c:626 ziti_ctrl_init() ctrl[(null):] using https://ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441/edge/client/v1
(210833)[ 0.034] DEBUG ziti-sdk:ziti_ctrl.c:640 ziti_ctrl_init() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] ziti controller client initialized
(210833)[ 0.034] INFO ziti-sdk:ziti.c:614 ztx_init_controller() ztx[0] Loading ziti context with controller[https://ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441/edge/client/v1]
(210833)[ 0.034] DEBUG ziti-sdk:ziti.c:545 ziti_start_internal() ztx[0] using metrics interval: 6
(210833)[ 0.034] DEBUG ziti-sdk:ziti.c:218 ziti_set_unauthenticated() ztx[0] setting auth_state[0] to 0
(210833)[ 0.034] DEBUG ziti-sdk:ziti_ctrl.c:379 ziti_ctrl_clear_api_session() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] clearing api session token for ziti_controller
(210833)[ 0.034] DEBUG ziti-sdk:ziti_ctrl.c:1065 ctrl_paging_req() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] starting paging request GET[/external-jwt-signers]
(210833)[ 15.044] WARN ziti-sdk:ziti_ctrl.c:177 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] request failed: -110(connection timed out)
(210833)[ 15.044] WARN ziti-sdk:ziti_ctrl.c:335 internal_version_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] CONTROLLER_UNAVAILABLE(connection timed out)
(210833)[ 15.044] WARN ziti-sdk:ziti.c:1924 version_pre_auth_cb() ztx[0] failed to get controller version: CONTROLLER_UNAVAILABLE/connection timed out
(210833)[ 15.044] WARN ziti-sdk:ziti_ctrl.c:177 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] request failed: -110(connection timed out)
(210833)[ 15.044] INFO ziti-sdk:ziti_ctrl.c:180 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] attempting to switch endpoint
(210833)[ 15.044] WARN ziti-sdk:ziti_ctrl.c:599 ctrl_next_ep() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] no controllers are online
(210833)[ 15.044] WARN ziti-sdk:ziti.c:655 ext_jwt_singers_cb() ztx[0] failed to get external auth providers: connection timed out
(210833)[ 20.050] DEBUG ziti-sdk:ziti_ctrl.c:1065 ctrl_paging_req() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] starting paging request GET[/external-jwt-signers]
(210833)[ 35.064] WARN ziti-sdk:ziti_ctrl.c:177 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] request failed: -110(connection timed out)
(210833)[ 35.064] WARN ziti-sdk:ziti_ctrl.c:335 internal_version_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] CONTROLLER_UNAVAILABLE(connection timed out)
(210833)[ 35.064] WARN ziti-sdk:ziti.c:1924 version_pre_auth_cb() ztx[0] failed to get controller version: CONTROLLER_UNAVAILABLE/connection timed out
(210833)[ 35.064] WARN ziti-sdk:ziti_ctrl.c:177 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] request failed: -110(connection timed out)
(210833)[ 35.064] INFO ziti-sdk:ziti_ctrl.c:180 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] attempting to switch endpoint
(210833)[ 35.064] WARN ziti-sdk:ziti_ctrl.c:599 ctrl_next_ep() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] no controllers are online
(210833)[ 35.064] WARN ziti-sdk:ziti.c:655 ext_jwt_singers_cb() ztx[0] failed to get external auth providers: connection timed out
(210833)[ 40.066] DEBUG ziti-sdk:ziti_ctrl.c:1065 ctrl_paging_req() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] starting paging request GET[/external-jwt-signers]
(210833)[ 55.084] WARN ziti-sdk:ziti_ctrl.c:177 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] request failed: -110(connection timed out)
(210833)[ 55.084] WARN ziti-sdk:ziti_ctrl.c:335 internal_version_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] CONTROLLER_UNAVAILABLE(connection timed out)
(210833)[ 55.084] WARN ziti-sdk:ziti.c:1924 version_pre_auth_cb() ztx[0] failed to get controller version: CONTROLLER_UNAVAILABLE/connection timed out
(210833)[ 55.084] WARN ziti-sdk:ziti_ctrl.c:177 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] request failed: -110(connection timed out)
(210833)[ 55.084] INFO ziti-sdk:ziti_ctrl.c:180 ctrl_resp_cb() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] attempting to switch endpoint
(210833)[ 55.084] WARN ziti-sdk:ziti_ctrl.c:599 ctrl_next_ep() ctrl[ec2-3-18-113-172.us-east-2.compute.amazonaws.com:28441] no controllers are online
(210833)[ 55.084] WARN ziti-sdk:ziti.c:655 ext_jwt_singers_cb() ztx[0] failed to get external auth providers: connection timed out
Changing the hostname to be unresolvable has the same behavior as changing the port although the logs happen every 5s in that case (which I find interesting)...
I even went so far as to deny Dial and allow Bind access to the service for the identity, but it doesn't freeze... So far, I can't reproduce whatever you have done. The only difference I am not using docker. I can (and will) try with a docker container but I would expect the same results.