Skip to content

Stream connector issue when running Redis as a cluster #14604

@axel-cf

Description

@axel-cf

Description

I'm running into some issues when running Redis as a cluster of 6 shards and trying to use the OpenCTI stream with a stream ID. While trying to setup a stream connector it seems to crash. The crash happens in registerConsumer during liveStreamHandler it seems the platform can't register the SSE consumer because the Redis pipeline in that function touches keys across different hash slots (from what I could gather online looking up the error message).

Environment

  1. OS: Alpine (Official OpenCTI Docker: https://hub.docker.com/layers/opencti/platform/6.9.20/images/sha256-aed8b835ff397a818d9a5fdd0ee9744a2cb69bac2588f58b33a3dc3f0f5f0b06)
  2. OpenCTI version: 6.9.20
  3. OpenCTI client: 6.9.20
  4. Other environment details: runs in Kubernetes cluster as HA setup

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Set up OpenCTI with Redis cluster with multiple shards (e.g. 3)
  2. Create a new Stream through the Data Sharing option
  3. Create connector to connect with said Stream
  4. Run connector with the Stream ID of the created Stream
  5. Trace logging of OpenCTI platform for error message

Expected Output

Expected a live streaming of data between the Connector and the OpenCTI platform, shared through the created Stream.

Actual Output

The connector stream loop crashes and the platform will display an error message detailing the Redis error:

{"category":"APP","cause":{"code":"UNKNOWN_ERROR","message":"All keys in the pipeline should belong to the same slots allocation group","name":"Error","stack":"Error: All keys in the pipeline should belong to the same slots allocation group\n    at Pipeline.exec (/opt/opencti/build/back.js:663:18538)\n    at registerConsumer (/opt/opencti/build/back.js:3531:2973276)\n    at liveStreamHandler (/opt/opencti/build/back.js:4269:9535)\n    at Layer.handleRequest (/opt/opencti/build/back.js:1394:35686)\n    at next (/opt/opencti/build/back.js:1394:38196)\n    at authenticateForPublic (/opt/opencti/build/back.js:4265:102776)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"},"id":"<REDACTED_STREAM_ID>","level":"error","message":"[STREAM] Processing error","source":"backend","timestamp":"2026-02-24T12:34:11.075Z","type":"live","version":"6.9.20"}

Additional information

  • N/A

Metadata

Metadata

Assignees

Labels

buguse for describing something not working as expectedfiligran teamuse to identify PR from the Filigran teamsolveduse to identify issue that has been solved (must be linked to the solving PR)

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions