-
Notifications
You must be signed in to change notification settings - Fork 985
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
Reindexing fail from opencti_stix_core_relationships-000001 to opencti_deleted_objects #9270
Comments
@alexshively could you share the json object of the indicator that fails to be deleted as it is stored on your database ? We have fixed an issue recenlty related to this error #9173, it was released on 6.4.3. |
@SouadHadjiat Thank you! I will be upgrading |
Sorry I skimmed the first part of your message. Here is one of their raw JSON objects from OpenSearch
|
@SouadHadjiat I had to wait until after holidays to upgrade, and I did just upgrade to 6.4.5. However, the same issue is occurring. Upon attempting to delete the indicators again, I'm also seeing that the timestamp still has the same time from when we first attempted to delete these indicators, for what its worth. I did clear out Redis just to be sure, and the timestamp remained the same. To be safe, I haven't touched the deleted objects index.
|
@alexshively you're right, there are old fields (i_valid_*) that are present in your object that we need to ignore when reindexing (because these fields are not recognized by the new index mapping). |
Thanks @SouadHadjiat |
Description
When attempting to delete a large amount of indicators from the platform, about ~50k, most of them were deleted. However, once the deletion gets to the last ~10k with creation dates on and before February 2023, we receive the errors (full error at bottom):
Reindexing fail from opencti_stix_core_relationships-000001 to opencti_deleted_objects
Reindexing fail from opencti_stix_domain_objects-000001 to opencti_deleted_objects
I had noticed this other issue, but we are on 6.2.18 currently. FWIW, I believe we were on and before version 5.7.4, possibly 5.6.2, when those indicators were created.
#7031
Environment
Reproducible Steps
Steps to create the smallest reproducible scenario:
Expected Output
Indicators are deleted
Actual Output
Indicators are not removed and receive the following errors:
Reindexing fail from opencti_stix_core_relationships-000001 to opencti_deleted_objects
Reindexing fail from opencti_stix_domain_objects-000001 to opencti_deleted_objects
Additional information
Full error:
{ "category": "APP", "errors": [ { "attributes": { "body": { "dest": { "index": "opencti_deleted_objects" }, "script": { "source": "ctx._source.remove('fromType'); ctx._source.remove('toType'); ctx._source.remove('spec_version'); ctx._source.remove('representative'); ctx._source.remove('rel_has-reference');" }, "source": { "index": "opencti_stix_domain_objects-000001", "query": { "ids": { "values": [ "c3e126b4-4ab0-489c-a37c-b35c19c77b19" ] } } } }, "genre": "TECHNICAL", "http_status": 500 }, "message": "Reindexing fail from opencti_stix_domain_objects-000001 to opencti_deleted_objects", "name": "DATABASE_ERROR", "stack": "GraphQLError: Reindexing fail from opencti_stix_domain_objects-000001 to opencti_deleted_objects\n at error (/opt/opencti/build/src/config/errors.js:7:10)\n at DatabaseError (/opt/opencti/build/src/config/errors.js:57:48)\n at /opt/opencti/build/src/database/engine.js:3394:11\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Promise.all (index 0)\n at elDeleteElements (/opt/opencti/build/src/database/engine.js:3433:5)\n at internalDeleteElementById (/opt/opencti/build/src/database/middleware.js:3164:7)\n at deleteElementById (/opt/opencti/build/src/database/middleware.js:3186:32)\n at executeDelete (/opt/opencti/build/src/manager/taskManager.js:219:5)\n at executeProcessing (/opt/opencti/build/src/manager/taskManager.js:471:13)\n at taskHandler (/opt/opencti/build/src/manager/taskManager.js:570:22)\n at /opt/opencti/build/src/manager/taskManager.js:600:9\n at Tlt.#runHandlerAndScheduleTimeout (/opt/opencti/build/node_modules/set-interval-async/dist/set-interval-async-timer.cjs:36:13)\n at Timeout._onTimeout (/opt/opencti/build/node_modules/set-interval-async/dist/set-interval-async-timer.cjs:29:13)" }, { "message": "Response Error", "name": "ResponseError", "stack": "ResponseError: Response Error\n at onBody (/opt/opencti/build/node_modules/@opensearch-project/opensearch/lib/Transport.js:426:23)\n at IncomingMessage.onEnd (/opt/opencti/build/node_modules/@opensearch-project/opensearch/lib/Transport.js:341:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)" } ], "level": "error", "message": "Reindexing fail from opencti_stix_domain_objects-000001 to opencti_deleted_objects", "source": "backend", "timestamp": "2024-12-06T22:26:40.040Z", "version": "6.2.18" }
The text was updated successfully, but these errors were encountered: