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

bug: Could not copy config file [/var/lib/ziti/config.json] #823

Open
mjtrangoni opened this issue Mar 7, 2024 · 3 comments
Open

bug: Could not copy config file [/var/lib/ziti/config.json] #823

mjtrangoni opened this issue Mar 7, 2024 · 3 comments

Comments

@mjtrangoni
Copy link
Contributor

Hi @qrkourier @scareything,

I am starting to upgrade the ziti-edge-tunnel image to the latest version via helm (0.22.23), and it seems that the new livenessProbe implemented here via command ziti-edge-tunnel tunnel_status is logging some errors and warnings every minute!

See,

(7)[2024-03-07T08:18:22.276Z]    INFO ziti-edge-tunnel:ziti-edge-tunnel.c:644 on_cmd() received cmd <{"Command":"Status"}
>
(7)[2024-03-07T08:18:22.276Z]    INFO ziti-edge-tunnel:ziti-edge-tunnel.c:227 on_command_resp() resp[1,len=9422] = {"Success":true,"Data":{"Active":true,"Duration":298949,"StartTime":"2024-03-07T08:13:23.327855Z","Identities":[{"Name":"name","Identifier":"/ziti-edge-tunnel/ziti-edge-tunnel-identity.json","FingerPrint":"/ziti-edge-tunnel/ziti-edge-tunnel-identity","Active":true,"Loaded":true,"Config":{"ztAPI":"URL"},"ControllerVersion":"v0.31.0","IdFileStatus":true,"MfaEnabled":false,"MfaNeeded":false,"Services":
...
["tcp"],"Addresses":[{"IsHost":true,"HostName":"hostname","Prefix":0}],"AllowedSour
(7)[2024-03-07T08:18:22.276Z]   ERROR ziti-edge-tunnel:instance-config.c:136 save_tunnel_status_to_file() Could not copy config file [/var/lib/ziti/config.json] to backup config file, the config might not exists at the moment
(7)[2024-03-07T08:18:22.276Z]   ERROR ziti-edge-tunnel:instance-config.c:142 save_tunnel_status_to_file() Could not open config file /var/lib/ziti/config.json to store the tunnel status data
(7)[2024-03-07T08:18:22.276Z]    WARN ziti-edge-tunnel:ziti-edge-tunnel.c:629 on_cmd() received from client - EOF. Closing connection.
(7)[2024-03-07T08:18:22.276Z]    WARN ziti-edge-tunnel:ziti-edge-tunnel.c:641 on_cmd() IPC client connection closed, count: 0

IMHO, the ERROR should be handled by the tunnel gracefully, so that it does not get triggered at all.
And the resulting warning messages at the end could also be saved if possible.

I look forward to hearing your thoughts. Thank you!

@qrkourier
Copy link
Member

relevant issues about unexpected log level precedence, relating to config.json file:

Shawn noted that the config.json file is only important for Windows, and that we should ignore it on Linux. I'd be OK with that since the only time I need to think about it on Linux is when I'm deleting it work around the log level precedence issue.

Shawn wrote in #461 (comment)

As of now this notion of a "config file" should not be processed by ziti-edge-tunnel on Linux.

@mjtrangoni
Copy link
Contributor Author

IMHO, log level works as expected. The issue here is more about the error log which should not be triggered running in a container. If this is a windows thing, maybe it helps handling this case for != windows.

@mjtrangoni
Copy link
Contributor Author

@scareything any news on this? Due to the livenessProbe this issue logs two errors every minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants