-
Notifications
You must be signed in to change notification settings - Fork 155
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
Error uninstalling agent: [...] missing matching binary for [...] #4167
Comments
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
Have you been able to reproduce this on Windows by using the zip installer and not the MSI one? |
I have not, the CI is just using the MSI installer, I have not used the Zip recently |
We've never seen this failure in CI without the MSI. The error is coming from the uninstall logic in elastic-agent/internal/pkg/agent/install/uninstall.go Lines 71 to 84 in 4b404b1
Specifically it is coming from elastic-agent/internal/pkg/agent/install/uninstall.go Lines 198 to 201 in 4b404b1
This leads us to elastic-agent/pkg/component/load.go Lines 109 to 119 in 4b404b1
This error means that The exact same function call that returns this error is made right when the agent starts up, so we must have had elastic-agent/internal/pkg/agent/application/application.go Lines 66 to 70 in 4b404b1
|
Alternatively the agent was never installed or is not running correctly and uninstall is failing with the same error. |
A little earlier in the buidlkite logs I see an
|
Do our tests check that |
The tests use a garbage fleet url and enrollment token and then start the agent service and verify that the agent creates a log and that fleet enrollment fails with Does fleet enrollment happen after verifying components? There is a bug at the moment where the name of the test does not print before the test starts (will fix this in a PR today) but there are several tests which purposefully fail the installation to verify it fails when we expect it to fail. This has occurred once in CI, I'll see if I can reproduce outside of CI. |
elastic-agent/internal/pkg/agent/cmd/run.go Lines 196 to 201 in 4b404b1
Loading inputs happens when elastic-agent/internal/pkg/agent/cmd/run.go Lines 286 to 290 in 4b404b1
|
You mean that a not properly installed agent can not be properly uninstalled? Shall we really fail the uninstall if an .exe that is supposed to be removed is not present anymore? |
I don't think we should, this is not a great flow for our users. I would rather be more tolerant when we are uninstalling the Agent but about it but if I remember well, we are using the same part of the code in both the installation and the uninstallation. |
Yes the uninstall ideally would tolerate this, but also there should not be a code path anywhere in the agent or MSI that leads to the apm-server binary file being removed from disk unexpectedly. Let's focus on figuring out what happened there first. This is the first time I have ever seen this error, and it correlates exactly with the introduction of our MSI, which is certainly suspicious. |
thou shalt not fail |
Hello, Just curious, could this happen on 8.12.1 as well? I'm having some issues to uninstall an Agent on Windows that for some reason ended up on a broken install and now we cannot uninstall it nor install again. I have a support ticket open, but I'm still waiting for some feedback from support. |
I suppose it is possible, because we never actually found the root cause for this problem and therefore there was no fix for it. Likely instead of fixing it we should just consider this non-fatal as suggested in #4167 (comment) but we haven't done that yet. The error here requires that the contents of the |
For confirmed bugs, please report:
CI is occasionally failing.
Agent installed on Windows via MSI with
--delay-enroll --url=https://placeholder:443 --enrollment-token=token
and then uninstalled with-f
Fails to uninstall and prints
| **Error: error uninstalling agent: error uninstalling components: failed to detect inputs and outputs: missing matching binary for C:\Program Files\Elastic\Agent\data\elastic-agent-9c40d6\components\apm-server.spec.yml**
More log context:
Example CI Failure: https://buildkite.com/elastic/elastic-stack-installers/builds/3671#018d5f93-affb-4019-a534-b53fcf8fe1e9
It would be nice to figure out why this is failing but second best would be making this not fatally prevent uninstallation
The text was updated successfully, but these errors were encountered: