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

Error: endpoint is installed by default and cannot be removed #105985

Closed
cavokz opened this issue Jul 16, 2021 · 14 comments · Fixed by #107929
Closed

Error: endpoint is installed by default and cannot be removed #105985

cavokz opened this issue Jul 16, 2021 · 14 comments · Fixed by #107929
Assignees
Labels
bug Fixes for quality problems that affect the customer experience OLM Sprint Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.15.0

Comments

@cavokz
Copy link
Contributor

cavokz commented Jul 16, 2021

Kibana version:

  • master
  • 7.14

Elasticsearch version:

  • master
  • 7.14

Server OS version:

  • Ubuntu 16.04

Browser version:

  • Cypress/Chrome 91
  • Firefox 89

Browser OS version:

  • MacOS 11.4

Original install method (e.g. download page, yum, from source, etc.):

  • snapshot tarball

Describe the bug:

  • Found these errors in the logs:
{"type":"log","@timestamp":"2021-07-12T20:47:01+00:00","tags":["error","plugins","fleet"],"pid":4721,"message":"uninstalling endpoint-0.19.1 after error installing"}
{"type":"log","@timestamp":"2021-07-12T20:47:02+00:00","tags":["error","plugins","fleet"],"pid":4721,"message":"failed to uninstall or rollback package after installation error Error: endpoint is installed by default and cannot be removed"}
{"type":"log","@timestamp":"2021-07-12T20:47:03+00:00","tags":["error","plugins","fleet"],"pid":4721,"message":"ResponseError: invalid_index_template_exception: [invalid_index_template_exception] Reason: index_template [logs-endpoint.alerts] invalid, cause [index template [logs-endpoint.alerts] specifies component templates [.fleet_component_template-1] that do not exist]\n    at onBody (/home/vagrant/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)\n    at IncomingMessage.onEnd (/home/vagrant/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)\n    at IncomingMessage.emit (events.js:387:35)\n    at endReadableNT (internal/streams/readable.js:1317:12)\n    at processTicksAndRejections (internal/process/task_queues.js:82:21) {\n  meta: {\n    body: { error: [Object], status: 400 },\n    statusCode: 400,\n    headers: {\n      'x-opaque-id': '8beaebaf-5fe0-43ba-a82e-850a37d4fc9e',\n      'x-elastic-product': 'Elasticsearch',\n      'content-type': 'application/json; charset=UTF-8',\n      'content-length': '489'\n    },\n    meta: {\n      context: null,\n      request: [Object],\n      name: 'elasticsearch-js',\n      connection: [Object],\n      attempts: 0,\n      aborted: false\n    }\n  }\n}"}

Steps to reproduce:

  1. Visit page app/security/alerts
  2. Check Kibana logs

Expected behavior:

  • No errors in the logs are found

Potential solution:

  • Check to see if Fleet is setup.
  • If Fleet is not setup, then don't try to install the package yet.
  • If Fleet is not setup, then call setup from the Security app

Additional context:

@cavokz cavokz added the bug Fixes for quality problems that affect the customer experience label Jul 16, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 16, 2021
@EricDavisX EricDavisX added the Team:Fleet Team label for Observability Data Collection Fleet team label Jul 16, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 16, 2021
@EricDavisX
Copy link
Contributor

I believe the spec is such that the Endpoint package cannot be uninstalled once it is installed, but it should not be installed by default. I think something is installing it (if you are using Endpoint, then that would explain it, of course).

@cavokz Dom, hi - can you expand on the setup for the problem here?

I am also unsure of what the following kibana setting does: agentIdVerificationEnabled

  • so i'm hesitant to suggest it is ok to turn it off, what expectations does it modify in the system?

I believe Dom is out on vacation, but @MadameSheema Glo knows the Cypress tests and can maybe speak to any questions we have.

@jen-huang jen-huang added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. and removed Team:Fleet Team label for Observability Data Collection Fleet team labels Jul 20, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@jen-huang
Copy link
Contributor

Hi @jonathan-buttner @kevinlog, can you help triaging this as this was trigged on visiting the Security app? I wonder if this has anything to do with the fact that the Security app attempts to upgrade the endpoint package on load?

@ferullo ferullo removed their assignment Jul 26, 2021
@ferullo
Copy link
Contributor

ferullo commented Jul 26, 2021

I unassigned myself because this looks like a purely server side issue. @kevinlog let me know if you disagree.

@kevinlog
Copy link
Contributor

@cavokz

It's expected that the Endpoint package cannot be uninstalled after it's installed. The package will be installed automatically if the user visits the Security app or adds the Endpoint integration in Fleet. Since you visited the Alerts tab, I would expect that the package is installed.

The error you're seeing regarding the alerts index is also a known issue right now until you generate alerts with the Endpoint. @peluja1012 @spong could speak more to that. Let us know if we can close this as a duplicate to some other related issue.

In addition, beyond those logs, are there any other errors in the UI? Does anything in the app become unusable?

@kevinlog kevinlog added the Team:Defend Workflows “EDR Workflows” sub-team of Security Solution label Jul 28, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt)

@paul-tavares
Copy link
Contributor

I came across this issue today as well. In my case, I was initializing my local dev. environment (so fresh ES + kibana just started). My Browser was already displaying the Endpoint page from Security Solution (from earlier in the day). Soon after Kibana started, I refreshed that browser page (never visited Fleet section of the UI) and that's when I noticed the error come out on the Kibana log.

In discussing with @kevinlog and @pzl, perhaps the issue here is that the check that Security Solution page does, anytime the app is loaded in the browser, to ensure the latest Endpoint Package is installed, might have been triggered prior to the Fleet setup being done. Will need to look into that further.

@cavokz
Copy link
Contributor Author

cavokz commented Aug 3, 2021

@EricDavisX
I ignore what the connection to option xpack.fleet.agentIdVerificationEnabled is and surely would not suggest to use it as a remedy. The cause-effect is anyway there, maybe @nchaulet could help to explain.

@kevinlog
I agree these are at least two different issues: package installation/upgrade and index template. Feel free to add links to any existing issue and close this as duplicate.

These errors show up as part of automated tests. The tests would pass if only a post test step would not grep for errors in the logs. Therefore as far as I can see the application works good enough.

@nchaulet
Copy link
Member

nchaulet commented Aug 3, 2021

Does the endpoint app call the fleet setup API? I think it's required to do that call before being able to upgrade a package

@jonathan-buttner
Copy link
Contributor

Does the endpoint app call the fleet setup API? I think it's required to do that call before being able to upgrade a package

No, the endpoint app only calls the package upgrade api. We have this code https://github.com/elastic/kibana/blob/master/x-pack/plugins/security_solution/public/app/home/setup.tsx#L37 but I don't think it's referenced anywhere.

@kevinlog
Copy link
Contributor

kevinlog commented Aug 4, 2021

@paul-tavares can you check with @jonathan-buttner about how critical this is ahead of FF? We should address the errors, but I want to know if we see any critical setup issues.

@kevinlog kevinlog added v7.15.0 and removed grooming labels Aug 4, 2021
@kevinlog kevinlog assigned paul-tavares and unassigned kevinlog Aug 4, 2021
@paul-tavares
Copy link
Contributor

Thanks @jonathan-buttner for that.
I'm going to look into fixing this for 7.15. My guess is that we'll need to ensure fleet is setup first before attempting to install/upgrade the endpoint package, so that component you reference may come back to life 😄 .

@muskangulati-qasource
Copy link

Bug Conversion

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience OLM Sprint Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.15.0
Projects
None yet
10 participants