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: failed to dispatch actions, error: acknowledge 12 actions #17389

Closed
mtojek opened this issue Apr 1, 2020 · 8 comments · Fixed by #18656
Closed

agent: failed to dispatch actions, error: acknowledge 12 actions #17389

mtojek opened this issue Apr 1, 2020 · 8 comments · Fixed by #18656
Labels
bug Ingest Management:alpha1 Group issues for ingest management alpha1

Comments

@mtojek
Copy link
Contributor

mtojek commented Apr 1, 2020

I got the agent re-enrolled, but couldn't manage to run it:

2020-04-01T12:13:10+02:00 INFO	stateresolver.go:47	New State ID is ZNxNzneq
2020-04-01T12:13:10+02:00 INFO	stateresolver.go:48	Converging state requires execution of 0 step(s)
2020-04-01T12:13:10+02:00 INFO	stateresolver.go:61	Updating internal state
2020-04-01T12:13:10+02:00 DEBUG	action_dispatcher.go:92	Successfully dispatched action: 'action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE'
2020-04-01T12:13:10+02:00 DEBUG	client.go:170	Request method: POST, path: /api/ingest_manager/fleet/agents/454f5dc0-7401-11ea-ab82-e145acb79802/acks
2020-04-01T12:13:10+02:00 ERROR	fleet_gateway.go:143	failed to dispatch actions, error: acknowledge 12 actions '[action_id: 8e5d0a3d-9c72-41fd-b1fd-51a053194a32, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE]' for agent '454f5dc0-7401-11ea-ab82-e145acb79802' failed: Status code: 400, Kibana returned an error: Bad Request, message: all actions should belong to current agent
	acknowledge 12 actions '[action_id: 8e5d0a3d-9c72-41fd-b1fd-51a053194a32, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE action_id: b8acb674-589e-489e-9005-2fcc06a2f4ec, type: CONFIG_CHANGE]' for agent '454f5dc0-7401-11ea-ab82-e145acb79802' failed: Status code: 400, Kibana returned an error: Bad Request, message: all actions should belong to current agent
2020-04-01T12:13:10+02:00 DEBUG	fleet_gateway.go:146	FleetGateway is sleeping, next update in 2s
2020-04-01T12:13:12+02:00 DEBUG	fleet_gateway.go:126	FleetGateway calling Checkin API

Dispatch actions got accumulated.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@ph
Copy link
Contributor

ph commented Apr 1, 2020

Taking a look

@ph ph added the bug label Apr 1, 2020
@nchaulet
Copy link
Member

nchaulet commented Apr 1, 2020

@ph I go a similar error when I renrolled an agent, I think is trying to ack actions from a previous enrollment it is possible?

@ph
Copy link
Contributor

ph commented Apr 2, 2020

Forgot to update this, I can reproduce it quite easily that issue. We save the last good action from fleet and replay it. When you reenroll we do not correctly clean the local state, so when the agent is up again you cannot restore the saved states.

@ph
Copy link
Contributor

ph commented Apr 7, 2020

I am close to have a fix for this, in the mean time delete the action_store.yml if you have this issue.

@ph
Copy link
Contributor

ph commented May 18, 2020

With the change with RPC this will change.

@EricDavisX
Copy link
Contributor

I don't see a referenced RPC change PR or any timeframe, can we confirm if we intend this to be fixed for Alpha? It seems it will be a high pain point, but maybe we can live with it if we must - if not fixed, can we get a few notes added to the below doc how we can manually rectify the agent locally?
https://docs.google.com/document/d/1_HhrkWlJVYNZo3L49iuvki7wWCQS72VUiogKQxLsuck/edit#heading=h.uftks4gnnbvm

@michalpristas
Copy link
Contributor

created a PR to get it fixed before RPC restruct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Ingest Management:alpha1 Group issues for ingest management alpha1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants