Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZET creates empty config file if enroll fails #554

Open
qrkourier opened this issue Nov 15, 2022 · 4 comments
Open

ZET creates empty config file if enroll fails #554

qrkourier opened this issue Nov 15, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@qrkourier
Copy link
Member

An empty config outfile prevents subsequent attempts to enroll from succeeding. This burdens the operator or script with first noticing that the outfile exists and is empty and removing the empty outfile before re-attempting to enroll. Conditions that may cause enrollment to fail include controller unavailable and invalid OTT.

❯ /opt/openziti/bin/ziti-edge-tunnel version
v0.20.9-local

❯ /opt/openziti/bin/ziti-edge-tunnel enroll --jwt /dev/null --identity /tmp/empty.json
(721628)[        0.000]    INFO ziti_log_set_level set log level: root=3
(721628)[        0.000]    INFO ziti-sdk:ziti_enroll.c:92 ziti_enroll() Ziti C SDK version 0.30.8 @ecfee7b(HEAD) starting enrollment at (2022-11-15T23:45:17.403)
(721628)[        0.000]   ERROR ziti-sdk:jwt.c:31 parse_jwt_content() jwt input lacks a dot
(721628)[        0.000]   ERROR ziti-sdk:ziti_enroll.c:131 ziti_enroll() /github/workspace/build/_deps/ziti-sdk-c-src/library/ziti_enroll.c:110 - load_jwt(opts->jwt, ecfg, &ecfg->zejh, &ecfg->zej) => -4 (JWT has invalid format)
(721628)[        0.000]   ERROR ziti-edge-tunnel:ziti-edge-tunnel.c:2007 enroll_cb() enrollment failed: enroll failed(-4)

❯ file /tmp/empty.json
/tmp/empty.json: empty
@qrkourier qrkourier added the bug Something isn't working label Nov 15, 2022
@NicFragale
Copy link

This has affected my operations a few times as well. Upvote to get it addressed...

@qrkourier
Copy link
Member Author

stale

@qrkourier
Copy link
Member Author

observed again today

@qrkourier qrkourier reopened this Nov 15, 2023
@qrkourier
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants