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

[Agent] Installed Windows 7 Agent shows no logs in Kibana (data is in Discover though) and shows host log error: agent events contains events with different agent id from currently authorized agent #24327

Closed
EricDavisX opened this issue Mar 3, 2021 · 11 comments · Fixed by #24387
Assignees
Labels
Team:Elastic-Agent Label for the Agent team v7.12.0

Comments

@EricDavisX
Copy link
Contributor

This is a 7.12 BC3 stack deploy to cloud with the BC3 Agent on a Win7 VM

Agent shows as 'healthy' but no logs show in the Agent details, presumably due to the mis-match somewhere of the Agent ID. With recent changes on Install in Beats (and none on Kibana side that seem to relate) I assume it is a Beats Agent bug.

The first error in the log ends up being repeated, over an over, stacking up the # of actions that are not dispatched, the first was:

{"log.level":"error","@timestamp":"2021-03-03T14:03:54.788-0500","log.origin":{"file.name":"application/fleet_gateway.go","file.line":185},"message":"failed to dispatch actions, error: acknowledge 1 actions '[action_id: 59c47640-7c44-11eb-b1f6-1755d2a3f765, type: POLICY_CHANGE]' for elastic-agent 'cbad3b28-720c-4bdf-8d58-988047ae540e' failed: Status code: 400, Kibana returned an error: Bad Request, message: agent events contains events with different agent id from currently authorized agent","ecs.version":"1.6.0"}

Full Logs zip attached along with state.yml (changed to .txt for git inclusion)
state.yml.txt
7.12-bc3-win-7-logs.zip

The Agent does seem to be sending data to ES and functioning, perhaps with just some default set policy.

@EricDavisX EricDavisX added v7.12.0 Team:Elastic-Agent Label for the Agent team labels Mar 3, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@EricDavisX EricDavisX changed the title [Agent] Install Agent shows no logs in Kibana (data shows in Discover though) and shows log error: agent events contains events with different agent id from currently authorized agent [Agent] Installed Agent shows no logs in Kibana (data is in Discover though) and shows host log error: agent events contains events with different agent id from currently authorized agent Mar 3, 2021
@EricDavisX
Copy link
Contributor Author

@ph let us add this to 7.12 triage set. We are now a few urgent issues deep, can we get Michal some assistance in reviewing?

@EricDavisX EricDavisX changed the title [Agent] Installed Agent shows no logs in Kibana (data is in Discover though) and shows host log error: agent events contains events with different agent id from currently authorized agent [Agent] Installed Windows 7 Agent shows no logs in Kibana (data is in Discover though) and shows host log error: agent events contains events with different agent id from currently authorized agent Mar 3, 2021
@EricDavisX
Copy link
Contributor Author

EricDavisX commented Mar 3, 2021

Team, I got some second opinions from Sec Engg prod team - they have a BC3 server with many working hosts that do NOT have this problem. BUT indeed, the Win 7 x64 host they setup seems to be in the same state as mine, with the bug. So, it is real I guess, just *somehow specific to win 7. I've updated the short desc. I don't know if that should be a blocker for 7.12, but I'd still like to know what is up before moving on... and maybe have more opinions on other Win 7 host deployments.

UPDATE: The team Win 7 x86 box seems ok. This is really curious

@EricDavisX
Copy link
Contributor Author

Update 2: my original test case (call it: host1) is now showing logs and has Endpoint deployed. I can't explain it... I waited many minutes after changing the policy to see if it would have an impact before reporting this.

The policy change must have eventually worked?

The 2nd host we tested with Win 7 in the same state (host2) has logs that I captured here:

Win-7-v7.12.0-bc3-alternate-host-logs.zip

@michalpristas
Copy link
Contributor

could you grab another portion of logs from machine 1.
i'm wondering if there was a restart in between or how it got fixed by itself.
if you can get action_store/state.yml and all the yml files basically to see config it would be also great

@blakerouse
Copy link
Contributor

@michalpristas Does agent write the state.yml file even in standalone mode?

@EricDavisX
Copy link
Contributor Author

I grabbed the whole logs folder already - it is posted above in description: 7.12-bc3-win-7-logs.zip

@michalpristas
Copy link
Contributor

michalpristas commented Mar 4, 2021

@blakerouse i think it should not, there's not a real reason to do so. i'm thinking (seeing how windows fs behaves) that maybe something with fleet.yml file which even in standalone serves as a agent_id storage.

some race between standalone running service and enroll performed during install.

edit: either with some fs flush or race as nromally understood where service is a slow starter and performs write to fleet.yml after enroll. but in this case it should just reload.unless it hits the spot when standalone reads file figures out it is empty, generates ID and saves it. but in between enroll generated ID

@michalpristas
Copy link
Contributor

found the issue very weird

@dikshachauhan-qasource
Copy link

Hi @EricDavisX

We have revalidated windows 7 x64 machine on 7.12 BC3 build and below are our Observations:

Only with system integration in Agent policy:

  • Agent is in healthy state.
  • No Activity logs present
  • logs on discover tab are visible.
    image

Endpoint security and system integration in Agent policy:

  • Agent is in healthy state.
  • Activity logs present
  • logs on discover tab are visible.

image

Build details:

BUILD 39134
COMMIT 08417cbd6c15e4c866651a7dcdfeded58845206d
Artifact link: https://staging.elastic.co/7.12.0-96914cb5/summary-7.12.0.html

Agent logs with only system integration:
elastic-agent-json.log

@michalpristas
Copy link
Contributor

@dikshachauhan-qasource this is what i see locally as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team v7.12.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants