Closed remys89 closed 5 months ago
@remys89, can you try this? It's weird that the rest of the services can reach the Elasticsearch service but not OpenCTI.
Enforce fullnameOverride
flag to set the name which use on ELASTICSEARCH__URL
environment.
env:
...
ELASTICSEARCH__ENGINE_SELECTOR: elk
ELASTICSEARCH__INDEX_PREFIX: opencti
ELASTICSEARCH__URL: http://elasticsearch:9200
elasticsearch:
enabled: true
fullnameOverride: elasticsearch
If you see the logs: ECONNREFUSED
. So, here's my CI values: https://github.com/devops-ia/helm-charts/blob/main/charts/opencti/ci/ci-values.yaml, maybe can help you to set values.
Tell me if doesn't work.
I deployed it using our own elasticsearch in the same namespace, but i still seem to run into the same error. I will investigate more tomorrow and get back to you.
OpenCTI seems to boot up just fine now, had to adjust the token to a valid UUIDv4 and it works now, with our own elasticsearch instance. Had to disable the ES instance in the helm chart, since it requires some additional config for memory reservation. We can close this if its up to me.
Thanks for the update @remys89!
Describe the bug a clear and concise description of what the bug is.
We deployed OpenCTI using the helm chart, and we tried writing our own deployment files based on the docker variant, but we keep running into the same error following examples and guide. It seems like it has issues with elastichsearch for running the correct engine.
We run OpenCTI with elasticsearch, rabbitmq, redis on a Kubernetes Cluster running 1.28.4 on containerd 1.7.2 with Helm 3.7.2 using the follwing variables:
What's your helm version?
3.7.2
What's your kubectl version?
1.28.4
Chart name
devops-ia/opencti
Chart version
1.2.2
Explain bug
Deployed using helm as wel as writing on k8s files based on docker-compose for OpenCTI, but we run into the same issue on both situations. After deploying all the components, only opencti-server seems to fail after 60-90 seconds:
{"category":"APP","errors":[{"attributes":{"genre":"TECHNICAL","http_status":500},"message":"Engine attachment processor configuration fail","name":"CONFIGURATION_ERROR","stack":"CONFIGURATION_ERROR: Engine attachment processor configuration fail\n at error (/opt/opencti/build/src/config/errors.js:8:10)\n at ConfigurationError (/opt/opencti/build/src/config/errors.js:70:53)\n at /opt/opencti/build/src/database/engine.js:816:20\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at elConfigureAttachmentProcessor (/opt/opencti/build/src/database/engine.js:804:5)\n at searchEngineInit (/opt/opencti/build/src/database/engine.js:292:32)\n at checkSystemDependencies (/opt/opencti/build/src/initialization.js:31:3)\n at platformStart (/opt/opencti/build/src/boot.js:14:7)"},{"message":"parse_exception\n\tRoot causes:\n\t\tparse_exception: No processor type exists with name [attachment]","name":"ResponseError","stack":"ResponseError: parse_exception\n\tRoot causes:\n\t\tparse_exception: No processor type exists with name [attachment]\n at Won.request (/opt/opencti/build/node_modules/@elastic/elasticsearch/node_modules/@elastic/transport/src/Transport.ts:553:17)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at ydn.putPipeline (/opt/opencti/build/node_modules/@elastic/elasticsearch/src/api/api/ingest.ts:195:12)\n at elConfigureAttachmentProcessor (/opt/opencti/build/src/database/engine.js:804:5)\n at searchEngineInit (/opt/opencti/build/src/database/engine.js:292:32)\n at checkSystemDependencies (/opt/opencti/build/src/initialization.js:31:3)\n at platformStart (/opt/opencti/build/src/boot.js:14:7)"}],"level":"error","message":"Engine attachment processor configuration fail","timestamp":"2024-05-03T08:07:45.697Z","version":"6.0.10"} {"category":"APP","dependencyError":{"$metadata":{"attempts":3,"totalRetryDelay":188},"code":"ECONNREFUSED"},"level":"error","message":"[OPENCTI] System dependencies check failed","timestamp":"2024-05-03T08:07:46.197Z","version":"6.0.10"} {"category":"APP","errors":[{"attributes":{"genre":"TECHNICAL","http_status":500},"message":"An unknown error has occurred","name":"UNKNOWN_ERROR","stack":"UNKNOWN_ERROR: 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:76:47)\n at Object._logWithError (/opt/opencti/build/src/config/conf.js:331:23)\n at Object.error (/opt/opencti/build/src/config/conf.js:341:48)\n at platformStart (/opt/opencti/build/src/boot.js:47:12)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)"},{"message":"","name":"AggregateError","stack":"AggregateError: \n at internalConnectMultiple (node:net:1116:18)\n at afterConnectMultiple (node:net:1683:7)"}],"level":"error","message":"Platform unmanaged direct error","timestamp":"2024-05-03T08:07:46.198Z","version":"6.0.10"}
From other deployments in the stack, like i.e. redis or rabbitmq, we can reach the elasticsearch deployment and receive data when curling it.
What you expected to happen?
OpenCTI to start and serve webportal for usage.
How to reproduce it?
Deploy the helm chart using the values files provided below.
Enter the changed values of values.yaml?
Enter the command that you execute when chart failing/misfunctioning
helm install opencti devops-ia/opencti -f values.yml -n namespace_name
More info
No response