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

[Ingest Manager] Enroll of agent call fails with 400 - at this route: /api/ingest_manager/fleet/agents/enroll #70726

Closed
EricDavisX opened this issue Jul 3, 2020 · 5 comments · Fixed by #70796
Assignees
Labels
impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@EricDavisX
Copy link
Contributor

darwin / macOS error is here, linux was found by Manu and our Agent / Ingest Manager e2e test we're writing:

2020-07-03T11:05:01.724-0400 DEBUG map[file.line:178 file.name:kibana/client.go] Request method: POST, path: /api/ingest_manager/fleet/agents/enroll {"ecs.version": "1.5.0"}
fail to enroll: fail to execute request to Kibana: Status code: 400, Kibana returned an error: Bad Request, message: Agent version is not compatible with kibana version

Kibana version:
latest 8.0 SNAPSHOT deploy to cloud-staging as of 11AM.

Browser version:
chrome on macOS

Describe the bug:
enroll call on the host as instructed by Ingest Manager UI fails with 400 response.

Steps to reproduce:

  1. install snapshot of 8.0
  2. enable fleet and capture enroll command
  3. try command, and see above error

Expected behavior:
it should work. then you can run agent. as it is now, it gets a 400 and Agent does not show up in the Kibana Ingest Manager UI

Screenshots (if relevant):

@EricDavisX EricDavisX added impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Ingest Management:beta1 labels Jul 3, 2020
@EricDavisX
Copy link
Contributor Author

EricDavisX commented Jul 3, 2020

I don't have ability to run source code currently to verify if its already fixed in master / 8.0 line, just fyi.

BUT, I did have an older Kibana from 2 days back and I used the latest 8.0 snapshot agent and it worked - so I think the bug is Kibana side (or at least not in the Agent).

@EricDavisX
Copy link
Contributor Author

I expect this with this PR being merged 3 hours ago as of now, that the coming nightly snapshot will have to work as it would be hard to test unenroll without first enrolling - so maybe we're all good. can't be sure tho. #70031

@mdelapenya
Copy link
Contributor

mdelapenya commented Jul 3, 2020

Steps to reproduce in Docker:

  1. Run docker-compose up -d from the attached project (See test.tar.gz)
  2. docker-compose exec -T centos curl -L -O https://snapshots.elastic.co/8.0.0-4c9cb790/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz (This is the snapshot from a few days ago)
    • I also tried with today's URL: https://snapshots.elastic.co/8.0.0-3d724649/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
  3. docker-compose exec -T centos tar xzvf elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
  4. docker-compose exec -T centos ln -s /elastic-agent-8.0.0-SNAPSHOT-linux-x86_64/elastic-agent /usr/local/bin/elastic-agent
  5. Initialise Fleet from Kibana UI
  6. Create a token in Kibana UI => $TOKEN (user: elastic, password: changeme).
  7. docker-compose exec -T centos elastic-agent enroll http://kibana:5601 $TOKEN -f

Expected behavior: kibana is able to enroll the agent
Actual behavior: kibana is NOT able to enroll the agent, with following message in the output:

The Elastic Agent is currently in Experimental and should not be used in production
2020-07-03T15:28:27Z DEBUG client.go:178 Request method: POST, path: /api/ingest_manager/fleet/agents/enroll
fail to enroll: fail to execute request to Kibana: Status code: 400, Kibana returned an error: Bad Request, message: Agent version is not compatible with kibana version

@EricDavisX
Copy link
Contributor Author

John was kind enough to post that the API has been updated, see this: #70339

  • I don't however see the UI side work for that API change, if there was intended to be any. If the UI side work to update the displayed enrollment command is not done we can use this ticket or link whatever feature work exists for it. If its not supposed to need a UI side change then I'm not sure why this is broken.

@EricDavisX
Copy link
Contributor Author

we believe this is fixed and will be picked up in next successful snapshot build completed from here:
https://internal-ci.elastic.co/view/All/job/elastic+release-manager+master+unified-snapshot/513/

@jen-huang jen-huang added the Team:Fleet Team label for Observability Data Collection Fleet team label Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants