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

[Fleet] [Kibana] Integrations fail to upgrade or (un)/(re)-install when using multiple Kibana Spaces #161804

Closed
matthiasledergerber opened this issue Jul 12, 2023 · 7 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team Team:Integrations Team Label for Observability Integrations team

Comments

@matthiasledergerber
Copy link

matthiasledergerber commented Jul 12, 2023

Kibana version: 8.8.2
Elasticsearch version: 8.8.2
Server OS version: Debian 12
Browse: Edge
Original install method: apt

Describe the bug:
It seems as the bug started to occur around Elastic-Stack 8.8.0. Currently installed Elastic Integrations with Visualisations and Data Views cannot be upgraded due to existing objects with duplicated ids (?). A uninstall routine that starts automatically fails too and the integration stops to be usable at all. As soon as Kibana is restarted, all visualizations generate an Error that the data view cannot be found. This leads to unusable visualisations that are delivered with the integration. I've tried to reinstall the integrations, delete all objects like templates, data views, visualisations, pipelines, etc. by hand but as soon as Kibana restarts everything that comes from the integrations start to break again. The integrations were also completely removed before reinstalling but this doesn't work either. We initially had three Kibana instances but this report was done with one single instance. We have several Kibana Spaces.

Sometimes after cleaning up everything and trying to reinstall the integration again, the kibana.log still reports of ID issues. However, when tracing these IDs of the dashboards or visualizations mentioned, they cannot be found in any space of Kibana
After running the following command the integration was able to be installed despite the report of these gost-IDs

POST kbn:/api/fleet/epm/packages/windows/1.26.0
{"force":true,
  "ignore_constraints": true
}

Im summary

  • Integrations cannot be upgraded

  • Integrations cannot be reinstalled
    2023-07-12_21-54-21 (1)

  • Integrations cannot be installed
    2023-07-12_21-52-53 (1)

One guess is that this issue must have occurred from our upgrade path. We upgrade every 1-2 Versions since 7.x. Therefore it could be possible that this issue wasn't catched by the CI. However, it seems as also the latest build of 8.8.2 has this issue - in a new elastic stack.

Steps to reproduce:
I was partially able to reproduce this issue with elastic-stack on docker.

  1. Install Elatic-Stack 8.8.2
  2. Create two Kibana Spaces and per Kibana Space an Integration (i choose palo alto networks and cisco_asa) with multiple Integrations
  3. Now you should habe Space A with dashboards from palo alto networks and Space B with one dashboard with cisco_asa
  4. Restart the elastic-stack (or just Kibana)
  5. Go again to the Overview of the Dashboards, they are gone.
    image
  6. Try to reinstall the assets and get the error i also put into the logfile below
    image

I've tested this with 8.7.1 too. There is the same issue, However after the restart of Kibana i still had the Dashboards. In my production Cluster, such a try of a reinstall renders ALL other Dashboards in ALL Spaces that are out-of-the-box integration vom Elastic unusable (data view not found see screenshot below).

The important part is, this could be forced with a clean elastic stack installation. And one integration having this issue crashes all other predefined dashboards
image

Expected behavior:
The Integration should upgrade or reinstall without throwing errors of duplicated ID. It should automatically resolve the dependency error. Out-of-the-Box integrations should be usable.

Screenshots (if relevant):
Result for user in a production cluster when trying to reinstall the missing assets, it renders the other out-of-the-box dashboards useless. This also happens after just restarting Kibana:
image

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

As soon as i try to reinstall an integration it reports of the following errors

{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-12T21:27:02.100+02:00","message":"Failure to install package [panw]: [Error: Non-unique import objects detected: [dashboard:panw-0c0fa830-dca5-11ec-8b8b-1fae02ab6a5e,dashboard:panw-42d2b320-dcec-11ec-8b8b-1fae02ab6a5e,dashboard:panw-4782db40-dccc-11ec-8b8b-1fae02ab6a5e,dashboard:panw-772964e0-7591-11e9-aacf-79a3704914a0,dashboard:panw-a663eea0-dd72-11ec-8b8b-1fae02ab6a5e,dashboard:panw-a8dc42e0-dcc8-11ec-8b8b-1fae02ab6a5e,dashboard:panw-b1a9f7a0-dcaa-11ec-8b8b-1fae02ab6a5e,dashboard:panw-d3e36450-dce1-11ec-8b8b-1fae02ab6a5e,dashboard:panw-e40ba240-7572-11e9-976e-65a8f47cc4c1,dashboard:panw-f84a1440-dcf7-11ec-8b8b-1fae02ab6a5e,search:panw-0ffe1200-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-1d9d5060-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-24a5cf50-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-290685e0-7569-11e9-976e-65a8f47cc4c1,search:panw-37acbca0-ddb1-11ec-8e76-9b3b99f98cd4,search:panw-3cea1360-7569-11e9-976e-65a8f47cc4c1,search:panw-6d0ea500-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-79d117f0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-89e2f970-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-8dc6b590-ddb2-11ec-8e76-9b3b99f98cd4,search:panw-92083d90-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-9df5cdf0-ddaf-11ec-8e76-9b3b99f98cd4,search:panw-a93a1c80-dcd7-11ec-8b8b-1fae02ab6a5e,search:panw-c53134a0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-cfbe1f60-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-d01e7260-ddb8-11ec-8e76-9b3b99f98cd4]]","log":{"level":"WARN","logger":"plugins.fleet"},"process":{"pid":733969},"trace":{"id":"d4ff7ef2a5102abb2aa40628374aee2b"},"transaction":{"id":"c1d7c75d707b611f"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-12T21:27:02.101+02:00","message":"uninstalling panw-3.13.0 after error installing: [Error: Non-unique import objects detected: [dashboard:panw-0c0fa830-dca5-11ec-8b8b-1fae02ab6a5e,dashboard:panw-42d2b320-dcec-11ec-8b8b-1fae02ab6a5e,dashboard:panw-4782db40-dccc-11ec-8b8b-1fae02ab6a5e,dashboard:panw-772964e0-7591-11e9-aacf-79a3704914a0,dashboard:panw-a663eea0-dd72-11ec-8b8b-1fae02ab6a5e,dashboard:panw-a8dc42e0-dcc8-11ec-8b8b-1fae02ab6a5e,dashboard:panw-b1a9f7a0-dcaa-11ec-8b8b-1fae02ab6a5e,dashboard:panw-d3e36450-dce1-11ec-8b8b-1fae02ab6a5e,dashboard:panw-e40ba240-7572-11e9-976e-65a8f47cc4c1,dashboard:panw-f84a1440-dcf7-11ec-8b8b-1fae02ab6a5e,search:panw-0ffe1200-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-1d9d5060-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-24a5cf50-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-290685e0-7569-11e9-976e-65a8f47cc4c1,search:panw-37acbca0-ddb1-11ec-8e76-9b3b99f98cd4,search:panw-3cea1360-7569-11e9-976e-65a8f47cc4c1,search:panw-6d0ea500-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-79d117f0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-89e2f970-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-8dc6b590-ddb2-11ec-8e76-9b3b99f98cd4,search:panw-92083d90-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-9df5cdf0-ddaf-11ec-8e76-9b3b99f98cd4,search:panw-a93a1c80-dcd7-11ec-8b8b-1fae02ab6a5e,search:panw-c53134a0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-cfbe1f60-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-d01e7260-ddb8-11ec-8e76-9b3b99f98cd4]]","log":{"level":"ERROR","logger":"plugins.fleet"},"process":{"pid":733969},"trace":{"id":"d4ff7ef2a5102abb2aa40628374aee2b"},"transaction":{"id":"c1d7c75d707b611f"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-12T21:27:02.105+02:00","message":"failed to uninstall or rollback package after installation error Error: unable to remove package with existing package policy(s) in use by agent(s)","log":{"level":"ERROR","logger":"plugins.fleet"},"process":{"pid":733969},"trace":{"id":"d4ff7ef2a5102abb2aa40628374aee2b"},"transaction":{"id":"c1d7c75d707b611f"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-12T21:27:02.106+02:00","message":"Non-unique import objects detected: [dashboard:panw-0c0fa830-dca5-11ec-8b8b-1fae02ab6a5e,dashboard:panw-42d2b320-dcec-11ec-8b8b-1fae02ab6a5e,dashboard:panw-4782db40-dccc-11ec-8b8b-1fae02ab6a5e,dashboard:panw-772964e0-7591-11e9-aacf-79a3704914a0,dashboard:panw-a663eea0-dd72-11ec-8b8b-1fae02ab6a5e,dashboard:panw-a8dc42e0-dcc8-11ec-8b8b-1fae02ab6a5e,dashboard:panw-b1a9f7a0-dcaa-11ec-8b8b-1fae02ab6a5e,dashboard:panw-d3e36450-dce1-11ec-8b8b-1fae02ab6a5e,dashboard:panw-e40ba240-7572-11e9-976e-65a8f47cc4c1,dashboard:panw-f84a1440-dcf7-11ec-8b8b-1fae02ab6a5e,search:panw-0ffe1200-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-1d9d5060-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-24a5cf50-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-290685e0-7569-11e9-976e-65a8f47cc4c1,search:panw-37acbca0-ddb1-11ec-8e76-9b3b99f98cd4,search:panw-3cea1360-7569-11e9-976e-65a8f47cc4c1,search:panw-6d0ea500-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-79d117f0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-89e2f970-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-8dc6b590-ddb2-11ec-8e76-9b3b99f98cd4,search:panw-92083d90-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-9df5cdf0-ddaf-11ec-8e76-9b3b99f98cd4,search:panw-a93a1c80-dcd7-11ec-8b8b-1fae02ab6a5e,search:panw-c53134a0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-cfbe1f60-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-d01e7260-ddb8-11ec-8e76-9b3b99f98cd4]","error":{"message":"Non-unique import objects detected: [dashboard:panw-0c0fa830-dca5-11ec-8b8b-1fae02ab6a5e,dashboard:panw-42d2b320-dcec-11ec-8b8b-1fae02ab6a5e,dashboard:panw-4782db40-dccc-11ec-8b8b-1fae02ab6a5e,dashboard:panw-772964e0-7591-11e9-aacf-79a3704914a0,dashboard:panw-a663eea0-dd72-11ec-8b8b-1fae02ab6a5e,dashboard:panw-a8dc42e0-dcc8-11ec-8b8b-1fae02ab6a5e,dashboard:panw-b1a9f7a0-dcaa-11ec-8b8b-1fae02ab6a5e,dashboard:panw-d3e36450-dce1-11ec-8b8b-1fae02ab6a5e,dashboard:panw-e40ba240-7572-11e9-976e-65a8f47cc4c1,dashboard:panw-f84a1440-dcf7-11ec-8b8b-1fae02ab6a5e,search:panw-0ffe1200-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-1d9d5060-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-24a5cf50-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-290685e0-7569-11e9-976e-65a8f47cc4c1,search:panw-37acbca0-ddb1-11ec-8e76-9b3b99f98cd4,search:panw-3cea1360-7569-11e9-976e-65a8f47cc4c1,search:panw-6d0ea500-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-79d117f0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-89e2f970-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-8dc6b590-ddb2-11ec-8e76-9b3b99f98cd4,search:panw-92083d90-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-9df5cdf0-ddaf-11ec-8e76-9b3b99f98cd4,search:panw-a93a1c80-dcd7-11ec-8b8b-1fae02ab6a5e,search:panw-c53134a0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-cfbe1f60-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-d01e7260-ddb8-11ec-8e76-9b3b99f98cd4]","type":"Error","stack_trace":"Error: Non-unique import objects detected: [dashboard:panw-0c0fa830-dca5-11ec-8b8b-1fae02ab6a5e,dashboard:panw-42d2b320-dcec-11ec-8b8b-1fae02ab6a5e,dashboard:panw-4782db40-dccc-11ec-8b8b-1fae02ab6a5e,dashboard:panw-772964e0-7591-11e9-aacf-79a3704914a0,dashboard:panw-a663eea0-dd72-11ec-8b8b-1fae02ab6a5e,dashboard:panw-a8dc42e0-dcc8-11ec-8b8b-1fae02ab6a5e,dashboard:panw-b1a9f7a0-dcaa-11ec-8b8b-1fae02ab6a5e,dashboard:panw-d3e36450-dce1-11ec-8b8b-1fae02ab6a5e,dashboard:panw-e40ba240-7572-11e9-976e-65a8f47cc4c1,dashboard:panw-f84a1440-dcf7-11ec-8b8b-1fae02ab6a5e,search:panw-0ffe1200-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-1d9d5060-ddb9-11ec-8e76-9b3b99f98cd4,search:panw-24a5cf50-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-290685e0-7569-11e9-976e-65a8f47cc4c1,search:panw-37acbca0-ddb1-11ec-8e76-9b3b99f98cd4,search:panw-3cea1360-7569-11e9-976e-65a8f47cc4c1,search:panw-6d0ea500-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-79d117f0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-89e2f970-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-8dc6b590-ddb2-11ec-8e76-9b3b99f98cd4,search:panw-92083d90-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-9df5cdf0-ddaf-11ec-8e76-9b3b99f98cd4,search:panw-a93a1c80-dcd7-11ec-8b8b-1fae02ab6a5e,search:panw-c53134a0-ddb8-11ec-8e76-9b3b99f98cd4,search:panw-cfbe1f60-ddb7-11ec-8e76-9b3b99f98cd4,search:panw-d01e7260-ddb8-11ec-8e76-9b3b99f98cd4]\n    at Function.nonUniqueImportObjects (/usr/share/kibana/node_modules/@kbn/core-saved-objects-import-export-server-internal/src/import/errors.js:32:12)\n    at collectSavedObjects (/usr/share/kibana/node_modules/@kbn/core-saved-objects-import-export-server-internal/src/import/lib/collect_saved_objects.js:73:43)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at importSavedObjectsFromStream (/usr/share/kibana/node_modules/@kbn/core-saved-objects-import-export-server-internal/src/import/import_saved_objects.js:38:37)\n    at retryImportOnConflictError (/usr/share/kibana/node_modules/@kbn/fleet-plugin/server/services/epm/kibana/assets/install.js:201:18)\n    at installKibanaSavedObjects (/usr/share/kibana/node_modules/@kbn/fleet-plugin/server/services/epm/kibana/assets/install.js:232:9)\n    at installKibanaAssets (/usr/share/kibana/node_modules/@kbn/fleet-plugin/server/services/epm/kibana/assets/install.js:109:27)\n    at installKibanaAssetsAndReferences (/usr/share/kibana/node_modules/@kbn/fleet-plugin/server/services/epm/kibana/assets/install.js:135:26)"},"log":{"level":"ERROR","logger":"plugins.fleet"},"process":{"pid":733969},"trace":{"id":"d4ff7ef2a5102abb2aa40628374aee2b"},"transaction":{"id":"c1d7c75d707b611f"}}

Any additional context:
Reported in the forum: https://discuss.elastic.co/t/elastic-integrations-fail-to-install-and-lead-to-broken-dashboards-when-used-with-multiple-kibana-spaces/337246/2

Related GitHub Discussion:
#108959 Handle ID changes to Saved Objects installed by Fleet
#59598 Saved object id migration issues

@matthiasledergerber matthiasledergerber added the bug Fixes for quality problems that affect the customer experience label Jul 12, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 12, 2023
@matthiasledergerber
Copy link
Author

matthiasledergerber commented Jul 13, 2023

Further testing and information

  1. Installing Elastic-Stack 8.1.0
  2. Adding two Kibana Spaces A and B and adding per Kibana Space an Agent Policy with one Cisco Asa and the other Palo Alto Networks (i guess doesnt matter what integration)
  3. Check the Dashboards in Space A and B - everything fine
  4. Restart the Elastic-Stack 8.1.0 - everything fine (there 8.8.2 would already fail see inital issue)
  5. Try to reinstall, remove, readd the integrations - everything fine
  6. Upgrade to Elastic-Stack 8.8.2 - now it begins

No Dashboards of Cisco ASA or Palo Alto Networks visible. Only the Sample Dashboard
image

Checking the Agent Policies, the Integration is still there:
image

This message starts to appear
image

The integration seems to be stuck in upgrading
image

The kibana logs
docker-elk-kibana-1 | [2023-07-13T22:26:20.084+00:00][INFO ][plugins.synthetics] Installed synthetics index templates docker-elk-kibana-1 | [2023-07-13T22:26:35.926+00:00][INFO ][plugins.fleet] Beginning fleet setup docker-elk-kibana-1 | [2023-07-13T22:26:36.120+00:00][WARN ][plugins.fleet] Failure to install package [system]: [ConcurrentInstallOperationError: Concurrent installation or upgrade of system-1.36.0 detected, aborting.] docker-elk-kibana-1 | [2023-07-13T22:26:36.176+00:00][WARN ][plugins.fleet] Failure to install package [elastic_agent]: [ConcurrentInstallOperationError: Concurrent installation or upgrade of elastic_agent-1.8.0 detected, aborting.] docker-elk-kibana-1 | [2023-07-13T22:26:36.176+00:00][WARN ][plugins.fleet] Failed installing package [system] due to error: [ConcurrentInstallOperationError: Concurrent installation or upgrade of system-1.36.0 detected, aborting.] docker-elk-kibana-1 | [2023-07-13T22:26:36.176+00:00][WARN ][plugins.fleet] Failed installing package [elastic_agent] due to error: [ConcurrentInstallOperationError: Concurrent installation or upgrade of elastic_agent-1.8.0 detected, aborting.] docker-elk-kibana-1 | [2023-07-13T22:26:36.205+00:00][WARN ][plugins.fleet] xpack.encryptedSavedObjects.encryptionKey is not configured, private key passphrase is being stored in plain text docker-elk-kibana-1 | [2023-07-13T22:26:36.228+00:00][INFO ][plugins.fleet] Encountered non fatal errors during Fleet setup docker-elk-kibana-1 | [2023-07-13T22:26:36.229+00:00][INFO ][plugins.fleet] {"name":"ConcurrentInstallOperationError","message":"Concurrent installation or upgrade of system-1.36.0 detected, aborting."} docker-elk-kibana-1 | [2023-07-13T22:26:36.229+00:00][INFO ][plugins.fleet] {"name":"ConcurrentInstallOperationError","message":"Concurrent installation or upgrade of elastic_agent-1.8.0 detected, aborting."} docker-elk-kibana-1 | [2023-07-13T22:26:36.229+00:00][INFO ][plugins.fleet] Fleet setup completed

While navigating in Fleet the following message appears

docker-elk-kibana-1 | [2023-07-13T22:33:13.249+00:00][WARN ][plugins.fleet] Failure to install package [cisco_asa]: [Error: Non-unique import objects detected: [dashboard:cisco_asa-a555b160-4987-11e9-b8ce-ed898b5ef295,search:cisco_asa-14fce5e0-498f-11e9-b8ce-ed898b5ef295,search:cisco_asa-753406e0-4986-11e9-b8ce-ed898b5ef295,search:cisco_asa-96c6ff60-4986-11e9-b8ce-ed898b5ef295]] docker-elk-kibana-1 | [2023-07-13T22:33:13.249+00:00][ERROR][plugins.fleet] uninstalling cisco_asa-2.18.0 after error installing: [Error: Non-unique import objects detected: [dashboard:cisco_asa-a555b160-4987-11e9-b8ce-ed898b5ef295,search:cisco_asa-14fce5e0-498f-11e9-b8ce-ed898b5ef295,search:cisco_asa-753406e0-4986-11e9-b8ce-ed898b5ef295,search:cisco_asa-96c6ff60-4986-11e9-b8ce-ed898b5ef295]] docker-elk-kibana-1 | [2023-07-13T22:33:13.250+00:00][WARN ][plugins.fleet] Failure to install package [panw]: [Error: Non-unique import objects detected: [dashboard:panw-772964e0-7591-11e9-aacf-79a3704914a0,dashboard:panw-e40ba240-7572-11e9-976e-65a8f47cc4c1,visualization:panw-0407a3e0-756f-11e9-976e-65a8f47cc4c1,visualization:panw-091fe860-756a-11e9-976e-65a8f47cc4c1,visualization:panw-0bd2a0c0-7574-11e9-976e-65a8f47cc4c1,visualization:panw-135930b0-7570-11e9-976e-65a8f47cc4c1,visualization:panw-3eca1070-7589-11e9-aacf-79a3704914a0,visualization:panw-5bd32b20-7575-11e9-976e-65a8f47cc4c1,visualization:panw-6dce7930-758c-11e9-aacf-79a3704914a0,visualization:panw-78e7e820-756d-11e9-976e-65a8f47cc4c1,visualization:panw-87f30f60-7569-11e9-976e-65a8f47cc4c1,visualization:panw-90ce3300-758a-11e9-aacf-79a3704914a0,visualization:panw-a95aaf20-758a-11e9-aacf-79a3704914a0,visualization:panw-d9cab170-756f-11e9-976e-65a8f47cc4c1,visualization:panw-e46331c0-756a-11e9-976e-65a8f47cc4c1,search:panw-290685e0-7569-11e9-976e-65a8f47cc4c1,search:panw-3cea1360-7569-11e9-976e-65a8f47cc4c1]] docker-elk-kibana-1 | [2023-07-13T22:33:13.250+00:00][ERROR][plugins.fleet] uninstalling panw-2.1.0 after error installing: [Error: Non-unique import objects detected: [dashboard:panw-772964e0-7591-11e9-aacf-79a3704914a0,dashboard:panw-e40ba240-7572-11e9-976e-65a8f47cc4c1,visualization:panw-0407a3e0-756f-11e9-976e-65a8f47cc4c1,visualization:panw-091fe860-756a-11e9-976e-65a8f47cc4c1,visualization:panw-0bd2a0c0-7574-11e9-976e-65a8f47cc4c1,visualization:panw-135930b0-7570-11e9-976e-65a8f47cc4c1,visualization:panw-3eca1070-7589-11e9-aacf-79a3704914a0,visualization:panw-5bd32b20-7575-11e9-976e-65a8f47cc4c1,visualization:panw-6dce7930-758c-11e9-aacf-79a3704914a0,visualization:panw-78e7e820-756d-11e9-976e-65a8f47cc4c1,visualization:panw-87f30f60-7569-11e9-976e-65a8f47cc4c1,visualization:panw-90ce3300-758a-11e9-aacf-79a3704914a0,visualization:panw-a95aaf20-758a-11e9-aacf-79a3704914a0,visualization:panw-d9cab170-756f-11e9-976e-65a8f47cc4c1,visualization:panw-e46331c0-756a-11e9-976e-65a8f47cc4c1,search:panw-290685e0-7569-11e9-976e-65a8f47cc4c1,search:panw-3cea1360-7569-11e9-976e-65a8f47cc4c1]] docker-elk-kibana-1 | [2023-07-13T22:33:13.254+00:00][ERROR][plugins.fleet] failed to uninstall or rollback package after installation error Error: unable to remove package with existing package policy(s) in use by agent(s) docker-elk-kibana-1 | [2023-07-13T22:33:13.255+00:00][ERROR][plugins.fleet] failed to uninstall or rollback package after installation error Error: unable to remove package with existing package policy(s) in use by agent(s) docker-elk-kibana-1 | [2023-07-13T22:33:13.271+00:00][WARN ][plugins.fleet] xpack.encryptedSavedObjects.encryptionKey is not configured, private key passphrase is being stored in plain text docker-elk-kibana-1 | [2023-07-13T22:33:13.283+00:00][INFO ][plugins.fleet] Fleet setup completed

  1. Remove the stuck integration from all agent policies
  2. Still stuck, now i want to remove the stuck state and try to reboot the Elastic-Stack 8.8.2 and go back to the integration. The Integration is unlocked, still somehow tracked as not upgraded despite the removal
    image

Trying to reinstall:
image
image

These actions somehow influence the other Dashboards from other integrations. One integration that was added per default with the Upgrade to Elastic-Stack 8.2.2 was "System". Here we see the effect that we also encounter in our on-premise Elastic-Stack 8.8.2: "Could not find the search: system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab" (id varries)
image

Logfile of Step 8

docker-elk-kibana-1 | [2023-07-13T22:38:49.090+00:00][WARN ][plugins.fleet] Failure to install package [panw]: [ConcurrentInstallOperationError: Concurrent installation or upgrade of panw-2.1.0 detected, aborting. Original error: Saved object [tag/fleet-managed-b] conflict] docker-elk-kibana-1 | [2023-07-13T22:38:49.090+00:00][ERROR][plugins.fleet] Concurrent installation or upgrade of panw-2.1.0 detected, aborting. Original error: Saved object [tag/fleet-managed-b] conflict docker-elk-kibana-1 | [2023-07-13T22:41:09.441+00:00][INFO ][plugins.fleet] Fleet Usage: {"agents_enabled":true,"agents":{"total_enrolled":0,"healthy":0,"unhealthy":0,"offline":0,"inactive":0,"unenrolled":0,"total_all_statuses":0,"updating":0},"fleet_server":{"total_enrolled":0,"healthy":0,"unhealthy":0,"offline":0,"updating":0,"total_all_statuses":0,"num_host_urls":1}}

@jsanz jsanz added the Team:Integrations Team Label for Observability Integrations team label Jul 17, 2023
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 17, 2023
@juliaElastic juliaElastic added the Team:Fleet Team label for Observability Data Collection Fleet team label Jul 25, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@juliaElastic
Copy link
Contributor

@jlind23 I think we should add this bug to the next sprint, it is coming up in many support issues.

@CyberTaoFlow
Copy link

This is severely impacting usability

juliaElastic added a commit that referenced this issue Jul 31, 2023
## Summary

Fix #162639

Found a bug when paths were pushed twice in package archive, this
results in an error when trying to reinstall endpoint package, fails
with a conflict error when creating transforms.

See more details here:
#162639 (comment)

It was introduced with this change, perhaps unintentionally:
https://github.com/elastic/kibana/pull/151655/files

I think this bug is also the reason of many
[issues](#161804) with package
reinstallation. I could reproduce another bug when trying to reinstall
`system` integration, that is also fixed by removing the duplicate
paths.
```
[2023-07-28T17:41:27.116+02:00][ERROR][plugins.fleet] Error: Non-unique import objects detected: [dashboard:system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab,dashboard:system-277876d0-fa2c-11e6-bbd3-29c986c96e5a,dashboard:system-5517a150-f9ce-11e6-8115-a7c18106d86a,dashboard:system-71f720f0-ff18-11e9-8405-516218e3d268,dashboard:system-79ffd6e0-faa0-11e6-947f-177f697178b8,dashboard:system-Logs-syslog-dashboard,dashboard:system-Metrics-system-overview,dashboard:system-Windows-Dashboard,dashboard:system-bae11b00-9bfc-11ea-87e4-49f31ec44891,dashboard:system-bb858830-f412-11e9-8405-516218e3d268,dashboard:system-d401ef40-a7d5-11e9-a422-d144027429da,search:system-06b6b060-7a80-11ea-bc9a-0baf2ca323a3,search:system-324686c0-fefb-11e9-8405-516218e3d268,search:system-62439dc0-f9c9-11e6-a747-6121780e0414,search:system-6f4071a0-7a78-11ea-bc9a-0baf2ca323a3,search:system-757510b0-a87f-11e9-a422-d144027429da,search:system-7e178c80-fee1-11e9-8405-516218e3d268,search:system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab,search:system-9066d5b0-fef2-11e9-8405-516218e3d268,search:system-Syslog-system-logs,search:system-b6f321e0-fa25-11e6-bbd3-29c986c96e5a,search:system-ce71c9a0-a25e-11e9-a422-d144027429da,search:system-eb0039f0-fa7f-11e6-a1df-a78bd7504d38]
    at Function.nonUniqueImportObjects (errors.ts:35:12)
```

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
juliaElastic added a commit to juliaElastic/kibana that referenced this issue Jul 31, 2023
Fix elastic#162639

Found a bug when paths were pushed twice in package archive, this
results in an error when trying to reinstall endpoint package, fails
with a conflict error when creating transforms.

See more details here:
elastic#162639 (comment)

It was introduced with this change, perhaps unintentionally:
https://github.com/elastic/kibana/pull/151655/files

I think this bug is also the reason of many
[issues](elastic#161804) with package
reinstallation. I could reproduce another bug when trying to reinstall
`system` integration, that is also fixed by removing the duplicate
paths.
```
[2023-07-28T17:41:27.116+02:00][ERROR][plugins.fleet] Error: Non-unique import objects detected: [dashboard:system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab,dashboard:system-277876d0-fa2c-11e6-bbd3-29c986c96e5a,dashboard:system-5517a150-f9ce-11e6-8115-a7c18106d86a,dashboard:system-71f720f0-ff18-11e9-8405-516218e3d268,dashboard:system-79ffd6e0-faa0-11e6-947f-177f697178b8,dashboard:system-Logs-syslog-dashboard,dashboard:system-Metrics-system-overview,dashboard:system-Windows-Dashboard,dashboard:system-bae11b00-9bfc-11ea-87e4-49f31ec44891,dashboard:system-bb858830-f412-11e9-8405-516218e3d268,dashboard:system-d401ef40-a7d5-11e9-a422-d144027429da,search:system-06b6b060-7a80-11ea-bc9a-0baf2ca323a3,search:system-324686c0-fefb-11e9-8405-516218e3d268,search:system-62439dc0-f9c9-11e6-a747-6121780e0414,search:system-6f4071a0-7a78-11ea-bc9a-0baf2ca323a3,search:system-757510b0-a87f-11e9-a422-d144027429da,search:system-7e178c80-fee1-11e9-8405-516218e3d268,search:system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab,search:system-9066d5b0-fef2-11e9-8405-516218e3d268,search:system-Syslog-system-logs,search:system-b6f321e0-fa25-11e6-bbd3-29c986c96e5a,search:system-ce71c9a0-a25e-11e9-a422-d144027429da,search:system-eb0039f0-fa7f-11e6-a1df-a78bd7504d38]
    at Function.nonUniqueImportObjects (errors.ts:35:12)
```

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
@juliaElastic juliaElastic self-assigned this Jul 31, 2023
@juliaElastic
Copy link
Contributor

juliaElastic commented Jul 31, 2023

Good news that we found and fixed the root cause of Non-unique import object detected error that was coming up on reinstall of packages with assets: #162724, it will be included in 8.9.1 release.

Will check if the other error ConcurrentInstallOperationError: Concurrent installation or upgrade of system-1.36.0 detected, aborting. is still reproducible.
EDIT: can't reproduce the concurrent installation error anymore, closing the issue.

ThomThomson pushed a commit to ThomThomson/kibana that referenced this issue Aug 1, 2023
## Summary

Fix elastic#162639

Found a bug when paths were pushed twice in package archive, this
results in an error when trying to reinstall endpoint package, fails
with a conflict error when creating transforms.

See more details here:
elastic#162639 (comment)

It was introduced with this change, perhaps unintentionally:
https://github.com/elastic/kibana/pull/151655/files

I think this bug is also the reason of many
[issues](elastic#161804) with package
reinstallation. I could reproduce another bug when trying to reinstall
`system` integration, that is also fixed by removing the duplicate
paths.
```
[2023-07-28T17:41:27.116+02:00][ERROR][plugins.fleet] Error: Non-unique import objects detected: [dashboard:system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab,dashboard:system-277876d0-fa2c-11e6-bbd3-29c986c96e5a,dashboard:system-5517a150-f9ce-11e6-8115-a7c18106d86a,dashboard:system-71f720f0-ff18-11e9-8405-516218e3d268,dashboard:system-79ffd6e0-faa0-11e6-947f-177f697178b8,dashboard:system-Logs-syslog-dashboard,dashboard:system-Metrics-system-overview,dashboard:system-Windows-Dashboard,dashboard:system-bae11b00-9bfc-11ea-87e4-49f31ec44891,dashboard:system-bb858830-f412-11e9-8405-516218e3d268,dashboard:system-d401ef40-a7d5-11e9-a422-d144027429da,search:system-06b6b060-7a80-11ea-bc9a-0baf2ca323a3,search:system-324686c0-fefb-11e9-8405-516218e3d268,search:system-62439dc0-f9c9-11e6-a747-6121780e0414,search:system-6f4071a0-7a78-11ea-bc9a-0baf2ca323a3,search:system-757510b0-a87f-11e9-a422-d144027429da,search:system-7e178c80-fee1-11e9-8405-516218e3d268,search:system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab,search:system-9066d5b0-fef2-11e9-8405-516218e3d268,search:system-Syslog-system-logs,search:system-b6f321e0-fa25-11e6-bbd3-29c986c96e5a,search:system-ce71c9a0-a25e-11e9-a422-d144027429da,search:system-eb0039f0-fa7f-11e6-a1df-a78bd7504d38]
    at Function.nonUniqueImportObjects (errors.ts:35:12)
```

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
@cemetery84
Copy link

Not fixed in 8.9.1
grafik
If you update or reinstall some Integrations and restart Kibana after this you get logs-* and metrics-* Data Views in the default Space. And logs-* and metrics-* is deleted in other Spaces.

@matthiasledergerber
Copy link
Author

@juliaElastic

We've Upgraded our Cluster form 8.9.0 to 8.9.1. However, this issue still persists and our Dashboards in Multiple Spaces have broken references. All Integrations are affected:

image

I can provide more information if needed.

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 Team:Fleet Team label for Observability Data Collection Fleet team Team:Integrations Team Label for Observability Integrations team
Projects
None yet
Development

No branches or pull requests

6 participants