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

Trying to update to 5.12, error in migration #5085

Closed
AlexSanchezN opened this issue Dec 4, 2023 · 1 comment
Closed

Trying to update to 5.12, error in migration #5085

AlexSanchezN opened this issue Dec 4, 2023 · 1 comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)

Comments

@AlexSanchezN
Copy link

Description

Trying to update to 5.12.0 from 5.11.14, but the the errors below appear. Gone back to 5.11.14 and all works well

{ "category": "APP", "error": { "context": { "category": "technical", "error": { "meta": { "body": { "error": { "reason": "index_template [octi_files] invalid, cause [index template [octi_files] specifies component templates [octi-core-settings] that do not exist]", "root_cause": [ { "reason": "index_template [octi_files] invalid, cause [index template [octi_files] specifies component templates [octi-core-settings] that do not exist]", "type": "invalid_index_template_exception" } ], "type": "invalid_index_template_exception" }, "status": 400 }, "headers": { "content-length": "431", "content-type": "application/vnd.elasticsearch+json;compatible-with=8", "x-elastic-product": "Elasticsearch" }, "meta": { "aborted": false, "attempts": 0, "connection": { "headers": {}, "id": "https://eticoctielastic03.etic.security:9200/", "status": "alive", "url": "https://eticoctielastic03.etic.security:9200/" }, "context": null, "name": "elasticsearch-js", "request": { "id": 27, "options": {}, "params": { "body": "{\"index_patterns\":[\"octi_files*\"],\"template\":{\"settings\":{\"index\":{\"lifecycle\":{\"name\":\"octi-ilm-policy\",\"rollover_alias\":\"octi_files\"}}},\"mappings\":{\"dynamic_templates\":[{\"integers\":{\"match_mapping_type\":\"long\",\"mapping\":{\"type\":\"integer\"}}},{\"strings\":{\"match_mapping_type\":\"string\",\"mapping\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"normalizer\":\"string_normalizer\",\"ignore_above\":512}}}}}],\"properties\":{\"internal_id\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"normalizer\":\"string_normalizer\",\"ignore_above\":512}}},\"standard_id\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"normalizer\":\"string_normalizer\",\"ignore_above\":512}}},\"height\":{\"type\":\"nested\",\"properties\":{\"measure\":{\"type\":\"float\"},\"date_seen\":{\"type\":\"date\"}}},\"weight\":{\"type\":\"nested\",\"properties\":{\"measure\":{\"type\":\"float\"},\"date_seen\":{\"type\":\"date\"}}},\"timestamp\":{\"type\":\"date\"},\"created\":{\"type\":\"date\"},\"created_at\":{\"type\":\"date\"},\"modified\":{\"type\":\"date\"},\"modified_at\":{\"type\":\"date\"},\"indexed_at\":{\"type\":\"date\"},\"uploaded_at\":{\"type\":\"date\"},\"first_seen\":{\"type\":\"date\"},\"last_seen\":{\"type\":\"date\"},\"start_time\":{\"type\":\"date\"},\"stop_time\":{\"type\":\"date\"},\"published\":{\"type\":\"date\"},\"valid_from\":{\"type\":\"date\"},\"valid_until\":{\"type\":\"date\"},\"observable_date\":{\"type\":\"date\"},\"event_date\":{\"type\":\"date\"},\"received_time\":{\"type\":\"date\"},\"processed_time\":{\"type\":\"date\"},\"completed_time\":{\"type\":\"date\"},\"ctime\":{\"type\":\"date\"},\"mtime\":{\"type\":\"date\"},\"atime\":{\"type\":\"date\"},\"current_state_date\":{\"type\":\"date\"},\"confidence\":{\"type\":\"integer\"},\"attribute_order\":{\"type\":\"integer\"},\"base_score\":{\"type\":\"integer\"},\"is_family\":{\"type\":\"boolean\"},\"number_observed\":{\"type\":\"integer\"},\"x_opencti_negative\":{\"type\":\"boolean\"},\"default_assignation\":{\"type\":\"boolean\"},\"x_opencti_detection\":{\"type\":\"boolean\"},\"x_opencti_order\":{\"type\":\"integer\"},\"import_expected_number\":{\"type\":\"integer\"},\"import_processed_number\":{\"type\":\"integer\"},\"x_opencti_score\":{\"type\":\"integer\"},\"connections\":{\"type\":\"nested\"},\"manager_setting\":{\"type\":\"flattened\"},\"context_data\":{\"properties\":{\"input\":{\"type\":\"flattened\"}}}}}},\"composed_of\":[\"octi-core-settings\"],\"version\":3,\"_meta\":{\"description\":\"To generate opencti expected index mappings\"}}", "headers": { "accept": "application/vnd.elasticsearch+json; compatible-with=8", "content-length": "2236", "content-type": "application/vnd.elasticsearch+json; compatible-with=8", "user-agent": "elasticsearch-js/8.10.0 (linux 5.15.0-89-generic-x64; Node.js 18.17.1; Transport 8.3.4)", "x-elastic-client-meta": "es=8.10.0,js=18.17.1,t=8.3.4,hc=18.17.1" }, "method": "PUT", "path": "/_index_template/octi_files", "querystring": "create=false" } } }, "statusCode": 400, "warnings": null }, "name": "ResponseError" }, "http_status": 500, "reason": "[SEARCH] Error creating index template" }, "message": "A database error has occurred", "name": "DatabaseError", "stack": "DatabaseError: A database error has occurred\n at error (/opt/opencti/build/src/config/errors.js:8:10)\n at DatabaseError (/opt/opencti/build/src/config/errors.js:58:48)\n at /opt/opencti/build/src/database/engine.js:748:11\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at elCreateIndexTemplate (/opt/opencti/build/src/database/engine.js:554:3)\n at elCreateIndex (/opt/opencti/build/src/database/engine.js:806:3)\n at Sdu.up (/opt/opencti/build/src/migrations/1698678031958-create-index-files.js:8:3)" }, "level": "error", "message": "[MIGRATION] Error during migration", "timestamp": "2023-12-04T15:07:08.013Z", "version": "5.12.0" }, { "category": "APP", "error": { "context": { "category": "technical", "error": { "_error": {}, "_showLocations": false, "_showPath": false, "_stack": "DatabaseError: A database error has occurred\n at error (/opt/opencti/build/src/config/errors.js:8:10)\n at DatabaseError (/opt/opencti/build/src/config/errors.js:58:48)\n at /opt/opencti/build/src/database/engine.js:748:11\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at elCreateIndexTemplate (/opt/opencti/build/src/database/engine.js:554:3)\n at elCreateIndex (/opt/opencti/build/src/database/engine.js:806:3)\n at Sdu.up (/opt/opencti/build/src/migrations/1698678031958-create-index-files.js:8:3)", "data": { "category": "technical", "error": { "meta": { "body": { "error": { "reason": "index_template [octi_files] invalid, cause [index template [octi_files] specifies component templates [octi-core-settings] that do not exist]", "root_cause": [ { "reason": "index_template [octi_files] invalid, cause [index template [octi_files] specifies component templates [octi-core-settings] that do not exist]", "type": "invalid_index_template_exception" } ], "type": "invalid_index_template_exception" }, "status": 400 }, "headers": { "content-length": "431", "content-type": "application/vnd.elasticsearch+json;compatible-with=8", "x-elastic-product": "Elasticsearch" }, "meta": { "aborted": false, "attempts": 0, "connection": { "headers": {}, "id": "https://eticoctielastic03.etic.security:9200/", "status": "alive", "url": "https://eticoctielastic03.etic.security:9200/" }, "context": null, "name": "elasticsearch-js", "request": { "id": 27, "options": {}, "params": { "body": "{\"index_patterns\":[\"octi_files*\"],\"template\":{\"settings\":{\"index\":{\"lifecycle\":{\"name\":\"octi-ilm-policy\",\"rollover_alias\":\"octi_files\"}}},\"mappings\":{\"dynamic_templates\":[{\"integers\":{\"match_mapping_type\":\"long\",\"mapping\":{\"type\":\"integer\"}}},{\"strings\":{\"match_mapping_type\":\"string\",\"mapping\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"normalizer\":\"string_normalizer\",\"ignore_above\":512}}}}}],\"properties\":{\"internal_id\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"normalizer\":\"string_normalizer\",\"ignore_above\":512}}},\"standard_id\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"normalizer\":\"string_normalizer\",\"ignore_above\":512}}},\"height\":{\"type\":\"nested\",\"properties\":{\"measure\":{\"type\":\"float\"},\"date_seen\":{\"type\":\"date\"}}},\"weight\":{\"type\":\"nested\",\"properties\":{\"measure\":{\"type\":\"float\"},\"date_seen\":{\"type\":\"date\"}}},\"timestamp\":{\"type\":\"date\"},\"created\":{\"type\":\"date\"},\"created_at\":{\"type\":\"date\"},\"modified\":{\"type\":\"date\"},\"modified_at\":{\"type\":\"date\"},\"indexed_at\":{\"type\":\"date\"},\"uploaded_at\":{\"type\":\"date\"},\"first_seen\":{\"type\":\"date\"},\"last_seen\":{\"type\":\"date\"},\"start_time\":{\"type\":\"date\"},\"stop_time\":{\"type\":\"date\"},\"published\":{\"type\":\"date\"},\"valid_from\":{\"type\":\"date\"},\"valid_until\":{\"type\":\"date\"},\"observable_date\":{\"type\":\"date\"},\"event_date\":{\"type\":\"date\"},\"received_time\":{\"type\":\"date\"},\"processed_time\":{\"type\":\"date\"},\"completed_time\":{\"type\":\"date\"},\"ctime\":{\"type\":\"date\"},\"mtime\":{\"type\":\"date\"},\"atime\":{\"type\":\"date\"},\"current_state_date\":{\"type\":\"date\"},\"confidence\":{\"type\":\"integer\"},\"attribute_order\":{\"type\":\"integer\"},\"base_score\":{\"type\":\"integer\"},\"is_family\":{\"type\":\"boolean\"},\"number_observed\":{\"type\":\"integer\"},\"x_opencti_negative\":{\"type\":\"boolean\"},\"default_assignation\":{\"type\":\"boolean\"},\"x_opencti_detection\":{\"type\":\"boolean\"},\"x_opencti_order\":{\"type\":\"integer\"},\"import_expected_number\":{\"type\":\"integer\"},\"import_processed_number\":{\"type\":\"integer\"},\"x_opencti_score\":{\"type\":\"integer\"},\"connections\":{\"type\":\"nested\"},\"manager_setting\":{\"type\":\"flattened\"},\"context_data\":{\"properties\":{\"input\":{\"type\":\"flattened\"}}}}}},\"composed_of\":[\"octi-core-settings\"],\"version\":3,\"_meta\":{\"description\":\"To generate opencti expected index mappings\"}}", "headers": { "accept": "application/vnd.elasticsearch+json; compatible-with=8", "content-length": "2236", "content-type": "application/vnd.elasticsearch+json; compatible-with=8", "user-agent": "elasticsearch-js/8.10.0 (linux 5.15.0-89-generic-x64; Node.js 18.17.1; Transport 8.3.4)", "x-elastic-client-meta": "es=8.10.0,js=18.17.1,t=8.3.4,hc=18.17.1" }, "method": "PUT", "path": "/_index_template/octi_files", "querystring": "create=false" } } }, "statusCode": 400, "warnings": null }, "name": "ResponseError" }, "http_status": 500, "reason": "[SEARCH] Error creating index template" }, "internalData": {}, "name": "DatabaseError", "time_thrown": "2023-12-04T15:07:08.012Z" }, "http_status": 500, "reason": "[OPENCTI] Platform initialization fail" }, "message": "An unknown error has occurred", "name": "UnknownError", "stack": "UnknownError: An unknown error has occurred\n at error (/opt/opencti/build/src/config/errors.js:8:10)\n at UnknownError (/opt/opencti/build/src/config/errors.js:72:47)\n at platformInit (/opt/opencti/build/src/initialization.js:399:13)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at platformStart (/opt/opencti/build/src/boot.js:229:5)" }, "level": "error", "message": "[OPENCTI] Platform start fail", "timestamp": "2023-12-04T15:07:08.014Z", "version": "5.12.0" }

Environment

Ubuntu baremetal

@AlexSanchezN AlexSanchezN added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Dec 4, 2023
@SamuelHassine
Copy link
Member

Hello @AlexSanchezN,

Thanks, it will be solved in a few minutes. Also experienced this internally on instances created prior to 5.9.X.

Kind regards,
Samuel

@SamuelHassine SamuelHassine removed the needs triage use to identify issue needing triage from Filigran Product team label Dec 4, 2023
@SamuelHassine SamuelHassine added this to the Release 5.12.1 milestone Dec 4, 2023
@SamuelHassine SamuelHassine added solved use to identify issue that has been solved (must be linked to the solving PR) sharing and removed sharing labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

2 participants