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

Stale configchunks make the agent fail #1995

Open
jantekb opened this issue Nov 11, 2024 · 0 comments
Open

Stale configchunks make the agent fail #1995

jantekb opened this issue Nov 11, 2024 · 0 comments

Comments

@jantekb
Copy link

jantekb commented Nov 11, 2024

If one creates a VM image from a machine that had AMA installed (1.33.1) with a particular data collection rule for sending text logs to Log Analytics,

then the resulting new instances from the source image will silently fail to publish logs going forward. This is due to stale config chunks sitting in /etc/opt/microsoft/azuremonitoragent/config-cache/configchunks which have tokenEndpointUri that contains the name of the source VM image.

None of the log files under /var/opt/microsoft/azuremonitoragent/log indicate this error, unless the repeated, but cryptic:

2024-11-11T13:50:30.1561510Z: [/__w/1/s/external/WindowsAgent/src/shared/mcsmanager/lib/src/RefreshGigToken.cpp:243,RefreshGigToken]
2024-11-11T13:50:30.1767310Z: [/__w/1/s/external/WindowsAgent/src/shared/mcsmanager/lib/src/RefreshGigToken.cpp:243,RefreshGigToken]
2024-11-11T13:51:30.2037210Z: [/__w/1/s/external/WindowsAgent/src/shared/mcsmanager/lib/src/RefreshGigToken.cpp:243,RefreshGigToken]

messages are connected to this problem (I don't know, these log lines are not very meaningful to me).

I would have expected that AMA over time refreshes the config-cache or cleans it up upon reboot, but apparently the only way to work this around now is 1) stopping the service 2) manually cleaning the config chunk json files 3) restarting the service.

I think AMA should be able to recover from this scenario on it's own.

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

1 participant