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

Platform hangs, lots of HTTP call interceptor fail errors #7381

Closed
dominictory opened this issue Jun 14, 2024 · 24 comments
Closed

Platform hangs, lots of HTTP call interceptor fail errors #7381

dominictory opened this issue Jun 14, 2024 · 24 comments
Assignees
Labels
question Further information is requested

Comments

@dominictory
Copy link

Description

Whilst resource appears fine for my stack, CTI regularly hangs, and the platform often presents me with 'an unknown error has occurred'. I am seeing a lot of HTTP call interceptor fail errors in the logs, as below:

ory":"APP","errors":[{"attributes":{"genre":"TECHNICAL","http_status":500},"message":"Http call interceptor fail","name":"UNKNOWN_ERROR","stack":"UNKNOWN_ERROR: Http call interceptor fail\n at error (/opt/opencti/build/src/config/errors.js:8:10)\n at UnknownError (/opt/opencti/build/src/config/errors.js:82:47)\n at fn (/opt/opencti/build/src/http/httpPlatform.js:455:18)\n at ule.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n at ule.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n at ule.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n at ule.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)"},{"message":"request aborted","name":"BadRequestError","stack":"BadRequestError: request aborted\n at IncomingMessage.onAborted (/opt/opencti/build/node_modules/raw-body/index.js:245:10)\n at IncomingMessage.emit (node:events:519:28)\n at IncomingMessage._destroy (node:_http_incoming:224:10)\n at _destroy (node:internal/streams/destroy:121:10)\n at IncomingMessage.destroy (node:internal/streams/destroy:83:5)\n at abortIncoming (node:_http_server:797:9)\n at socketOnClose (node:_http_server:791:3)\n at TLSSocket.emit (node:events:531:35)\n at node:net:338:12\n at Socket.done (node:_tls_wrap:657:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:531:35)\n at TCP.<anonymous> (node:net:338:12)"}],"level":"error","message":"Http call interceptor fail","source":"backend","timestamp":"2024-06-13T09:30:10.272Z","version":"6.1.10"}

Another error I'm seeing that I've not seen before is as below:

ERR Error | category=APP codeStack=mQe@https://10.254.202.12/static/js/front-5HAQIXMY.js:91:66684
render@https://10.254.202.12/static/js/front-5HAQIXMY.js:91:67547
O8i</a.render@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:38490
Fxt@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:6284
udi@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:6075
y1i@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:45692
p1i@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:40448
Lku@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:40371
Qgn@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:40215
Ext@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:36482
d1i@https://10.254.202.12/static/js/front-5HAQIXMY.js:8:35396
k_t@https://10.254.202.12/static/js/front-5HAQIXMY.js:1:11648
y_t@https://10.254.202.12/static/js/front-5HAQIXMY.js:1:12059
 componentStack=
n@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:36342
qn@https://10.254.202.12/static/js/front-5HAQIXMY.js:91:67357
div
$up@https://10.254.202.12/static/js/front-5HAQIXMY.js:9465:64948
Omp@https://10.254.202.12/static/js/front-5HAQIXMY.js:28699:181
Oqn@https://10.254.202.12/static/js/front-5HAQIXMY.js:511:1158
div
jIt</Cte/<@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:23367
j$i</OI1<@https://10.254.202.12/static/js/front-5HAQIXMY.js:272:99852
n@https://10.254.202.12/static/js/front-5HAQIXMY.js:9465:20804
OLe@https://10.254.202.12/static/js/front-5HAQIXMY.js:9465:4454
kon@https://10.254.202.12/static/js/front-5HAQIXMY.js:9465:30543
div
LLe@https://10.254.202.12/static/js/front-5HAQIXMY.js:9465:39481
n@https://10.254.202.12/static/js/front-5HAQIXMY.js:9465:63550
div
C4p@https://10.254.202.12/static/js/front-5HAQIXMY.js:56987:2171
o@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:19842
s@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:18557
e$u@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:142094
ii@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:145510
n@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:36342
qn@https://10.254.202.12/static/js/front-5HAQIXMY.js:91:67357
div
v4t@https://10.254.202.12/static/js/front-5HAQIXMY.js:294258:259
tl</sLc/<@https://10.254.202.12/static/js/front-5HAQIXMY.js:504:11041
e$u@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:142094
ii@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:145510
EM0
Oqn@https://10.254.202.12/static/js/front-5HAQIXMY.js:511:1158
e$u@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:142094
ii@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:145510
Suspense
main
jIt</Cte/<@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:23367
Pwt</Gi1/<@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:64360
div
jIt</Cte/<@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:23367
Pwt</Gi1/<@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:64360
yG0@https://10.254.202.12/static/js/front-5HAQIXMY.js:305077:16752
cyo@https://10.254.202.12/static/js/front-5HAQIXMY.js:27973:436
N4e@https://10.254.202.12/static/js/front-5HAQIXMY.js:194:3628
n@https://10.254.202.12/static/js/front-5HAQIXMY.js:190:5709
BW1@https://10.254.202.12/static/js/front-5HAQIXMY.js:343:80925
o@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:19842
s@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:18557
ao1@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:79491
lAu@https://10.254.202.12/static/js/front-5HAQIXMY.js:14:52329
uo1@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:80821
Du1@https://10.254.202.12/static/js/front-5HAQIXMY.js:168:5210
fc1@https://10.254.202.12/static/js/front-5HAQIXMY.js:169:41747
o@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:19842
s@https://10.254.202.12/static/js/front-5HAQIXMY.js:49:18557
xn1@https://10.254.202.12/static/js/front-5HAQIXMY.js:145:31595
xG0@https://10.254.202.12/static/js/front-5HAQIXMY.js:305077:23696
Suspense
SG0@https://10.254.202.12/static/js/front-5HAQIXMY.js:305077:24722
e$u@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:142094
ii@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:145510
Suspense
kvi@https://10.254.202.12/static/js/front-5HAQIXMY.js:305077:25283
Aqn@https://10.254.202.12/static/js/front-5HAQIXMY.js:305077:25500
tl</sLc/<@https://10.254.202.12/static/js/front-5HAQIXMY.js:504:11041
yOt@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:144962
H4i@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:148747
TG0
Suspense
_Bu@https://10.254.202.12/static/js/front-5HAQIXMY.js:18:94198 source=frontend timestamp=2024-06-14T10:16:59.697Z version=6.1.10

Environment

OpenCTI 6.1.10
Ubuntu 22.04 LTS
Docker

Additional information

Also seeing a lot of these now:

(node:7) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit

Other notable errors in RabbitMQ:


2024-06-14 10:37:02.106220+00:00 [error] <0.5621470.0> Channel error on connection <0.5621447.0> (10.0.1.4:39262 -> 10.0.1.46:5672, vhost: '/', user: 'opencti'), channel 1:

2024-06-14 10:37:02.106220+00:00 [error] <0.5621470.0> operation basic.consume caused a channel exception not_found: no queue 'push_f919398e-2abf-4f74-bdf5-0f78fc5cfd66' in vhost '/'

2024-06-14 10:38:28.459433+00:00 [error] <0.4838325.0> closing AMQP connection <0.4838325.0> (10.0.1.4:45904 -> 10.0.1.46:5672):

2024-06-14 10:38:28.459433+00:00 [error] <0.4838325.0> missed heartbeats from client, timeout: 60s
@dominictory dominictory added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Jun 14, 2024
@nino-filigran
Copy link

@dominictory do you have a specific repro case?
And I'm not sure what's the issue here: is that the platform hanging for a while and sending you this message? Or the fact that you see interceptors calls that are unclear?

@nino-filigran nino-filigran added needs more info Intel needed about the use case and removed needs triage use to identify issue needing triage from Filigran Product team labels Jun 17, 2024
@dominictory
Copy link
Author

@dominictory do you have a specific repro case? And I'm not sure what's the issue here: is that the platform hanging for a while and sending you this message? Or the fact that you see interceptors calls that are unclear?

Honestly not sure, past few versions I've experienced a very unstable platform where sometimes the page I want takes a while to load, and then just gives me 'an unknown error has occurred' in the UI. Having inspected the logs when this happens, I get the above errors. I've noticed similar issue mentioned on Slack fairly recently but I can't work out exactly what the issue is.

@MaxwellDPS
Copy link

MaxwellDPS commented Jun 17, 2024

Seeing the same thing in a clustered deployment, lots of container restarts.

UI is almost unusable post 6.1.X, dashboard load time is >12 seconds

NAME                                                              READY   STATUS      RESTARTS        AGE
opencti-elastic-es-leaders-0                                      1/1     Running     0               52m
opencti-elastic-es-leaders-1                                      1/1     Running     0               54m
opencti-elastic-es-leaders-2                                      1/1     Running     0               56m
opencti-elastic-es-data-0                                         1/1     Running     0               58m
opencti-elastic-es-data-1                                         1/1     Running     0               60m
opencti-elastic-es-data-2                                         1/1     Running     0               62m
opencti-kibana-kb-654f956c44-z7dms                                1/1     Running     0               47m
opencti-minio-6896b4f4dc-ntl4g                                    1/1     Running     0               47m
opencti-opencti-api-54b696d688-dnfj5                              2/2     Running     1 (42m ago)     47m
opencti-opencti-api-54b696d688-h9vm2                              2/2     Running     1 (2m33s ago)   47m
opencti-opencti-api-54b696d688-j65kv                              2/2     Running     0               47m
opencti-opencti-api-54b696d688-x62gz                              2/2     Running     1 (10m ago)     47m
opencti-opencti-api-54b696d688-xhxh8                              2/2     Running     1 (4m29s ago)   47m
opencti-opencti-web-64c7ffc568-2w69h                              2/2     Running     1 (6m15s ago)   45m
opencti-opencti-web-64c7ffc568-4lzng                              2/2     Running     1 (73s ago)     46m
opencti-opencti-web-64c7ffc568-fnfhv                              2/2     Running     1 (12m ago)     47m
opencti-opencti-web-64c7ffc568-kx8lq                              2/2     Running     1 (8m22s ago)   47m
opencti-opencti-web-64c7ffc568-nkh9n                              2/2     Running     1 (44m ago)     47m
opencti-opencti-worker-675c866964-7vsg6                           1/1     Running     0               47m
opencti-opencti-worker-675c866964-kng68                           1/1     Running     0               47m
opencti-opencti-worker-675c866964-lbh8x                           1/1     Running     1 (46m ago)     47m
opencti-opencti-worker-675c866964-mvv9g                           1/1     Running     0               47m
opencti-opencti-worker-675c866964-xj6hd                           1/1     Running     0               47m
opencti-rabbitmq-server-0                                         1/1     Running     0               60m
opencti-rabbitmq-server-1                                         1/1     Running     0               62m
opencti-rabbitmq-server-2                                         1/1     Running     0               63m
opencti-redis-master-0                                            2/2     Running     1 (54m ago)     63m
{
    "category": "APP",
    "errors": [
        {
            "attributes": {
                "genre": "TECHNICAL",
                "http_status": 500,
                "promise": {},
                "reason": {
                    "code": "ERR_HTTP_HEADERS_SENT"
                }
            },
            "message": "Engine unhandled rejection",
            "name": "UNKNOWN_ERROR",
            "stack": "UNKNOWN_ERROR: Engine unhandled rejection\n    at error (/opt/opencti/build/src/config/errors.js:8:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:82:47)\n    at process.<anonymous> (/opt/opencti/build/src/boot.js:60:16)\n    at process.emit (node:events:519:28)\n    at process.emit (/opt/opencti/build/node_modules/source-map-support/source-map-support.js:516:21)\n    at emit (node:internal/process/promises:150:20)\n    at processPromiseRejections (node:internal/process/promises:284:27)\n    at processTicksAndRejections (node:internal/process/task_queues:96:32)"
        }
    ],
    "level": "error",
    "message": "Engine unhandled rejection",
    "source": "backend",
    "timestamp": "2024-06-17T20:21:27.867Z",
    "version": "6.1.6"
}
{
    "category": "APP",
    "errors": [
        {
            "attributes": {
                "genre": "TECHNICAL",
                "http_status": 500,
                "referer": "https://intel/dashboard/data/import"
            },
            "message": "Http call interceptor fail",
            "name": "UNKNOWN_ERROR",
            "stack": "UNKNOWN_ERROR: Http call interceptor fail\n    at error (/opt/opencti/build/src/config/errors.js:8:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:82:47)\n    at fn (/opt/opencti/build/src/http/httpPlatform.js:455:18)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)"
        },
        {
            "message": "stream is not readable",
            "name": "InternalServerError",
            "stack": "InternalServerError: stream is not readable\n    at readStream (/opt/opencti/build/node_modules/raw-body/index.js:185:17)\n    at getBody (/opt/opencti/build/node_modules/raw-body/index.js:116:12)\n    at read (/opt/opencti/build/node_modules/body-parser/lib/read.js:79:3)\n    at fn (/opt/opencti/build/node_modules/body-parser/lib/types/json.js:138:5)\n    at lle.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at cors (/opt/opencti/build/node_modules/cors/lib/index.js:188:7)\n    at cb (/opt/opencti/build/node_modules/cors/lib/index.js:224:17)\n    at originCallback (/opt/opencti/build/node_modules/cors/lib/index.js:214:15)\n    at cb (/opt/opencti/build/node_modules/cors/lib/index.js:219:13)\n    at optionsCallback (/opt/opencti/build/node_modules/cors/lib/index.js:199:9)\n    at fn (/opt/opencti/build/node_modules/cors/lib/index.js:204:7)\n    at lle.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Function.handle (/opt/opencti/build/node_modules/express/lib/router/index.js:175:3)\n    at router (/opt/opencti/build/node_modules/express/lib/router/index.js:47:12)"
        }
    ],
    "level": "error",
    "message": "Http call interceptor fail",
    "source": "backend",
    "timestamp": "2024-06-17T20:21:55.993Z",
    "version": "6.1.6"
}
{
    "category": "APP",
    "errors": [
        {
            "attributes": {
                "genre": "TECHNICAL",
                "http_status": 500,
                "referer": "https://intel/dashboard/data/import"
            },
            "message": "Http call interceptor fail",
            "name": "UNKNOWN_ERROR",
            "stack": "UNKNOWN_ERROR: Http call interceptor fail\n    at error (/opt/opencti/build/src/config/errors.js:8:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:82:47)\n    at fn (/opt/opencti/build/src/http/httpPlatform.js:455:18)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at lle.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)"
        },
        {
            "message": "stream is not readable",
            "name": "InternalServerError",
            "stack": "InternalServerError: stream is not readable\n    at readStream (/opt/opencti/build/node_modules/raw-body/index.js:185:17)\n    at getBody (/opt/opencti/build/node_modules/raw-body/index.js:116:12)\n    at read (/opt/opencti/build/node_modules/body-parser/lib/read.js:79:3)\n    at fn (/opt/opencti/build/node_modules/body-parser/lib/types/json.js:138:5)\n    at lle.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at cors (/opt/opencti/build/node_modules/cors/lib/index.js:188:7)\n    at cb (/opt/opencti/build/node_modules/cors/lib/index.js:224:17)\n    at originCallback (/opt/opencti/build/node_modules/cors/lib/index.js:214:15)\n    at cb (/opt/opencti/build/node_modules/cors/lib/index.js:219:13)\n    at optionsCallback (/opt/opencti/build/node_modules/cors/lib/index.js:199:9)\n    at fn (/opt/opencti/build/node_modules/cors/lib/index.js:204:7)\n    at lle.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Function.handle (/opt/opencti/build/node_modules/express/lib/router/index.js:175:3)\n    at router (/opt/opencti/build/node_modules/express/lib/router/index.js:47:12)"
        }
    ],
    "level": "error",
    "message": "Http call interceptor fail",
    "source": "backend",
    "timestamp": "2024-06-17T20:22:02.012Z",
    "version": "6.1.6"
}

@nino-filigran
Copy link

Do you still see this happening?

@dominictory
Copy link
Author

Do you still see this happening?

I do, it seems to be every few hours roughly, although the platform is not unusable:

{"category":"APP","errors":[{"attributes":{"genre":"TECHNICAL","http_status":500},"message":"Http call interceptor fail","name":"UNKNOWN_ERROR","stack":"UNKNOWN_ERROR: Http call interceptor fail\n at error (/opt/opencti/build/src/config/errors.js:8:10)\n at UnknownError (/opt/opencti/build/src/config/errors.js:82:47)\n at fn (/opt/opencti/build/src/http/httpPlatform.js:463:18)\n at $le.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n at $le.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n at $le.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n at $le.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)"},{"message":"request aborted","name":"BadRequestError","stack":"BadRequestError: request aborted\n at IncomingMessage.onAborted (/opt/opencti/build/node_modules/raw-body/index.js:245:10)\n at IncomingMessage.emit (node:events:519:28)\n at IncomingMessage._destroy (node:_http_incoming:224:10)\n at _destroy (node:internal/streams/destroy:121:10)\n at IncomingMessage.destroy (node:internal/streams/destroy:83:5)\n at abortIncoming (node:_http_server:797:9)\n at socketOnClose (node:_http_server:791:3)\n at TLSSocket.emit (node:events:531:35)\n at node:net:339:12\n at Socket.done (node:_tls_wrap:657:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:531:35)\n at TCP.<anonymous> (node:net:339:12)"}],"level":"error","message":"Http call interceptor fail","source":"backend","timestamp":"2024-08-19T05:49:59.817Z","version":"6.2.9"}

@richard-julien
Copy link
Member

Can you check the CPU usage of the platform? Do you have 100% cpu usage?
We identify a problem of usage when too many sessions are created, can you check the number of open sessions you have in the platform ?

Thanks

@dominictory
Copy link
Author

dominictory commented Aug 19, 2024

Can you check the CPU usage of the platform? Do you have 100% cpu usage? We identify a problem of usage when too many sessions are created, can you check the number of open sessions you have in the platform ?

Thanks

Total CPU usage is currently around ~50%. Platform showing >98%, sometimes over 100% usage. Where should I look for total open sessions? There's quite a few for the users going back a few days. The platform is stable but every now and then it does produce these errors, I suspect when many bundles are being processed, or maybe there's some other issue.

@FormindMPO
Copy link

Hello
Found out the same issue at the moment

{"category":"APP","codeStack":"vQe@https://[...]/static/js/front-43R7MMGU.js:91:66684
render@https://[...]/static/js/front-43R7MMGU.js:91:67547\nN8i</a.render@https://[...]/static/js/front-43R7MMGU.js:49:38490...

I was trying to make better firewall rules, but forgot the rabbitmq service...

Found out this error (seconds after the first one)

"message":"connect ETIMEDOUT 172.31.16.223:15671","operation":"Unspecified","query_attributes":[[{"arguments":[],"name":"rabbitMQMetrics"}]],"size":2,"source":"backend","time":129561,"timestamp":"2024-09-03T15:59:37.133Z","type":"READ_ERROR"

Changed the RabbitMQ management port firewall rule, and now my opencti is up !

@dominictory, look at your connections with rabbitmq (both RABBITMQ__PORT, RABBITMQ__PORT_MANAGEMENT)

@nino-filigran
Copy link

@dominictory do you still have the issue?

@dominictory
Copy link
Author

@dominictory do you still have the issue?

Yes, however not very often now. My platform is relatively stable. Last time I saw this was 2 days ago:

{
    "category": "APP",
    "errors": [
        {
            "attributes": {
                "genre": "TECHNICAL",
                "http_status": 500
            },
            "message": "Http call interceptor fail",
            "name": "UNKNOWN_ERROR",
            "stack": "GraphQLError: Http call interceptor fail\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:81:47)\n    at fn (/opt/opencti/build/src/http/httpPlatform.js:499:18)\n    at Wve.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Wve.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Wve.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Wve.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)"
        },
        {
            "message": "request aborted",
            "name": "BadRequestError",
            "stack": "BadRequestError: request aborted\n    at IncomingMessage.onAborted (/opt/opencti/build/node_modules/raw-body/index.js:245:10)\n    at IncomingMessage.emit (node:events:519:28)\n    at IncomingMessage._destroy (node:_http_incoming:224:10)\n    at _destroy (node:internal/streams/destroy:121:10)\n    at IncomingMessage.destroy (node:internal/streams/destroy:83:5)\n    at abortIncoming (node:_http_server:797:9)\n    at socketOnClose (node:_http_server:791:3)\n    at TLSSocket.emit (node:events:531:35)\n    at node:net:339:12\n    at Socket.done (node:_tls_wrap:657:7)\n    at Object.onceWrapper (node:events:634:26)\n    at Socket.emit (node:events:531:35)\n    at TCP.<anonymous> (node:net:339:12)"
        }
    ],
    "level": "error",
    "message": "Http call interceptor fail",
    "source": "backend",
    "timestamp": "2024-09-09T23:48:30.737Z",
    "version": "6.2.18"
}

@dominictory
Copy link
Author

dominictory commented Sep 20, 2024

@nino-filigran Hi, after upgrading from 6.2.18 to 6.3.1, I am seeing a lot of more of these errors. New logs below:

2024-09-20T09:15:46.802662818Z ERR Http call interceptor fail | category=APP errors=[{"attributes":{"genre":"TECHNICAL","http_status":500},"message":"Http call interceptor fail","name":"UNKNOWN_ERROR","stack":"GraphQLError: Http call interceptor fail\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:81:47)\n    at fn (/opt/opencti/build/src/http/httpPlatform.js:499:19)\n    at Mge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Mge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Mge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Mge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)"},{"message":"stream is not readable","name":"InternalServerError","stack":"InternalServerError: stream is not readable\n    at readStream (/opt/opencti/build/node_modules/raw-body/index.js:185:17)\n    at getBody (/opt/opencti/build/node_modules/raw-body/index.js:116:12)\n    at read (/opt/opencti/build/node_modules/body-parser/lib/read.js:79:3)\n    at fn (/opt/opencti/build/node_modules/body-parser/lib/types/json.js:138:5)\n    at Mge.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at fn (/opt/opencti/build/node_modules/passport/lib/middleware/initialize.js:98:5)\n    at Mge.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at cb (/opt/opencti/build/node_modules/express-session/index.js:514:7)\n    at cb (/opt/opencti/build/src/database/sessionStore-redis.js:38:14)\n    at done (/opt/opencti/build/node_modules/async-lock/lib/index.js:104:6)\n    at done (/opt/opencti/build/node_modules/async-lock/lib/index.js:157:7)\n    at /opt/opencti/build/src/database/sessionStore-redis.js:34:16\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)"}] source=backend timestamp=2024-09-20T09:15:46.802Z version=6.3.1

As well as:

2024-09-20T08:37:29.742615416Z ERR Fail to execute engine pagination | category=APP errors=[{"attributes":{"genre":"TECHNICAL","http_status":500,"query":{"_source":true,"body":{"query":{"bool":{"must":[{"bool":{"minimum_should_match":2,"should":[{"bool":{"minimum_should_match":1,"should":[{"bool":{"minimum_should_match":1,"should":[{"bool":{"minimum_should_match":1,"should":[{"bool":{"must_not":{"exists":{"field":"event_access"}}}},{"term":{"event_access.keyword":{"value":""}}}]}}]}}]}},{"bool":{"minimum_should_match":1,"should":[{"multi_match":{"fields":["entity_type.keyword","parent_types.keyword"],"query":"History"}}]}}]}}],"must_not":[]}},"size":1,"sort":[{"timestamp":{"missing":0,"order":"desc"}},{"standard_id.keyword":"asc"}]},"index":["opencti_history"],"track_total_hits":true}},"message":"Fail to execute engine pagination","name":"DATABASE_ERROR","stack":"GraphQLError: Fail to execute engine pagination\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:3091:15\n    at Object.start (/opt/opencti/build/src/manager/historyManager.ts:198:29)\n    at startModules (/opt/opencti/build/src/managers.js:96:5)\n    at platformStart (/opt/opencti/build/src/boot.js:36:7)"},{"message":"Request timed out","name":"TimeoutError","stack":"TimeoutError: Request timed out\n    at FJt._request (/opt/opencti/build/node_modules/@elastic/transport/src/Transport.ts:630:36)\n    at /opt/opencti/build/node_modules/@elastic/transport/src/Transport.ts:704:22\n    at FJt.request (/opt/opencti/build/node_modules/@elastic/transport/src/Transport.ts:701:14)\n    at dZe.SearchApi [as search] (/opt/opencti/build/node_modules/@elastic/elasticsearch/src/api/api/search.ts:96:10)\n    at Object.start (/opt/opencti/build/src/manager/historyManager.ts:198:29)\n    at startModules (/opt/opencti/build/src/managers.js:96:5)\n    at platformStart (/opt/opencti/build/src/boot.js:36:7)"}] source=backend timestamp=2024-09-20T08:37:29.742Z version=6.3.1

@dominictory
Copy link
Author

Also the below almost immediately after requesting a page

front-H63FL5SL.js:8  TypeError: Failed to fetch
    at OWu (front-H63FL5SL.js:34:7781)
    at front-H63FL5SL.js:34:7965
    at c (front-H63FL5SL.js:34:1296)
    at Generator.<anonymous> (front-H63FL5SL.js:34:2620)
    at Generator.next (front-H63FL5SL.js:34:1655)
    at B5i (front-H63FL5SL.js:34:7268)
    at l (front-H63FL5SL.js:34:7467)
    at front-H63FL5SL.js:34:7530
    at new Promise (<anonymous>)
    at front-H63FL5SL.js:34:7408

@richard-julien
Copy link
Member

You have some "message":"Request timed out" in your logs, so maybe related to a problem of connectivity or an overloaded elastic?

@dominictory
Copy link
Author

You have some "message":"Request timed out" in your logs, so maybe related to a problem of connectivity or an overloaded elastic?

Hi, you mentioned open sessions before, should I check this per user, since I have a user per connector?

@berkbykn
Copy link

You have some "message":"Request timed out" in your logs, so maybe related to a problem of connectivity or an overloaded elastic?

Even if i turn off every connectors to stop overloading elastic, it still times out (message":"Request timed out).

But most of the time error logs occur like this;

opencti-worker;
pika.exceptions.ChannelClosedByBroker: (404, "NOT_FOUND - no queue 'push_c1a6cab5-bfd6-413a-a60c-61adce96b183' in vhost 'opencti'")

opencti-server;
{"category":"APP","errors":[{"attributes":{"genre":"TECHNICAL","http_status":500},"message":"Http call interceptor fail","name":"UNKNOWN_ERROR","stack":"GraphQLError: Http call interceptor fail

@simonbjorzen-ts
Copy link

Also seeing this, the "node build/back.js" process goes to 100% CPU usage and the platform stops responding for users.

@simonbjorzen-ts
Copy link

Our platform is very unstable at the moment with these issues, on latest version 6.3.6.

@nauliajati
Copy link

Hi, i found the same issue on my platform, this the error logs, (running on docker [opencti/platform:6.3.5])

GraphQLError: Http call interceptor fail\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:81:47)\n    at fn (/opt/opencti/build/src/http/httpPlatform.js:501:19)\n    at Age.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)
/opt/opencti/build/src/http/httpPlatform.js:213:7\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)"},{"attributes":{"filename":"import/External-Reference/407cd56a-f3f7-48ff-a25d-f5f23198e902/search","genre":"BUSINESS","http_status":500,"user_id":"88ec0c6a-13ce-5e39-b486-354fe4a7084f"},"message":"Load file from storage fail","name":"UNSUPPORTED_ERROR","stack":"GraphQLError: Load file from storage fail\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at UnsupportedError (/opt/opencti/build/src/config/errors.js:88:51)\n    at loadFile (/opt/opencti/build/src/database/file-storage.js:321:11)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at /opt/opencti/build/src/http/httpPlatform.js:203:20"}

@simonbjorzen-ts
Copy link

@nauliajati that looks like an error caused by a missing file and not the same as this.

@simonbjorzen-ts
Copy link

I have determined that what triggers our issues is connectors ingesting large amounts of data.

@nino-filigran
Copy link

@dominictory, @nauliajati @simonbjorzen-ts have you all identified the root cause of the problem, leading to having HTTP call interceptor fail error?
If so, would you mind opening a specific bug regarding each of your issues so that we can address the root cause of the problem and its consequences? (If it's something that you think we can act on, obviously.)

The rationale for this request is that if an HTTP call interceptor fails, something goes wrong. If we manage to identify & fix what's causing the problem, you won't get the HTTP call interceptor.
I hope my comment is clear :)

@dominictory
Copy link
Author

dominictory commented Oct 23, 2024

@dominictory, @nauliajati @simonbjorzen-ts have you all identified the root cause of the problem, leading to having HTTP call interceptor fail error? If so, would you mind opening a specific bug regarding each of your issues so that we can address the root cause of the problem and its consequences? (If it's something that you think we can act on, obviously.)

The rationale for this request is that if an HTTP call interceptor fails, something goes wrong. If we manage to identify & fix what's causing the problem, you won't get the HTTP call interceptor. I hope my comment is clear :)

I've collected and sorted all the different variations of this error. It appears the bulk of them are InternalServerError: stream is not readable. I am currently having issues with workers (#8642) that, although they remain connected according to the UI, eventually bundles stop getting processed and I see a lot of connection reset errors there, although I'm not sure if that's connected to this issue. CPU and memory usage are currently fine, in fact there's a lot more headroom in terms of memory. Redis is showing as healthy.

      2 "stack":"GraphQLError: Http call interceptor fail\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:81:47)\n    at fn (/opt/opencti/build/src/http/httpPlatform.js:501:19)\n    at Rge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Rge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at next (/opt/opencti/build/node_modules/express/lib/router/route.js:141:14)\n    at /opt/opencti/build/src/http/httpPlatform.js:213:7\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)"
      2 "stack":"GraphQLError: Load file from storage fail\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at UnsupportedError (/opt/opencti/build/src/config/errors.js:88:51)\n    at loadFile (/opt/opencti/build/src/database/file-storage.js:321:11)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at /opt/opencti/build/src/http/httpPlatform.js:203:20"
      2 "stack":"NotFound: UnknownError\n    at de_NotFoundRes (/opt/opencti/build/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:4827:21)\n    at de_CommandError (/opt/opencti/build/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:4750:19)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at /opt/opencti/build/node_modules/@smithy/middleware-serde/dist-cjs/index.js:35:20\n    at /opt/opencti/build/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:482:18\n    at /opt/opencti/build/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38\n    at /opt/opencti/build/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:110:22\n    at /opt/opencti/build/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:138:14\n    at /opt/opencti/build/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22\n    at loadFile (/opt/opencti/build/src/database/file-storage.js:272:22)\n    at /opt/opencti/build/src/http/httpPlatform.js:203:20"
    240 "stack":"GraphQLError: Http call interceptor fail\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at UnknownError (/opt/opencti/build/src/config/errors.js:81:47)\n    at fn (/opt/opencti/build/src/http/httpPlatform.js:501:19)\n    at Rge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:71:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Rge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Rge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at Rge.handle_error (/opt/opencti/build/node_modules/express/lib/router/layer.js:67:12)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:326:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)"
    240 "stack":"InternalServerError: stream is not readable\n    at readStream (/opt/opencti/build/node_modules/raw-body/index.js:185:17)\n    at getBody (/opt/opencti/build/node_modules/raw-body/index.js:116:12)\n    at read (/opt/opencti/build/node_modules/body-parser/lib/read.js:79:3)\n    at fn (/opt/opencti/build/node_modules/body-parser/lib/types/json.js:138:5)\n    at Rge.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at fn (/opt/opencti/build/node_modules/passport/lib/middleware/initialize.js:98:5)\n    at Rge.handle [as handle_request] (/opt/opencti/build/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/opt/opencti/build/node_modules/express/lib/router/index.js:328:13)\n    at done (/opt/opencti/build/node_modules/express/lib/router/index.js:286:9)\n    at Function.process_params (/opt/opencti/build/node_modules/express/lib/router/index.js:346:12)\n    at next (/opt/opencti/build/node_modules/express/lib/router/index.js:280:10)\n    at cb (/opt/opencti/build/node_modules/express-session/index.js:514:7)\n    at cb (/opt/opencti/build/src/database/sessionStore-redis.js:38:14)\n    at done (/opt/opencti/build/node_modules/async-lock/lib/index.js:104:6)\n    at done (/opt/opencti/build/node_modules/async-lock/lib/index.js:157:7)\n    at /opt/opencti/build/src/database/sessionStore-redis.js:34:16\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)"

@richard-julien richard-julien self-assigned this Oct 26, 2024
@richard-julien
Copy link
Member

Ok lets try to answer this ticket :)
Interceptor fail is a generic error that currently occurs at the end of express middleware.
So currently it can mix some different problems.
I also noticed that we propagated some errors to this middleware for no reason and so it add some noise on the real error.

Now lets explain all the different error in this ticket that finised in a Interceptor fail error

BadRequestError: request aborted

Its a request cancelled by the client. Its not really an error on the server side but a consequence of request cancelling. Maybe related to client cancelling the request because the platform is too long to answer so more a consequence on the client based on a platform that have some performance issue.

GraphQLError: Load file from storage fail

If the file is not accessible for some reason we throw an error that is then catch and log by the generic interceptor. For me we should not propagate the error to make the situation clearer.

Engine unhandled rejection - ERR_HTTP_HEADERS_SENT

This one is more related to a problem in code that hide the real problem has we try to modify the response headers after his generation. If you have a repro case on this one, please open a dedicated ticket.

InternalServerError: stream is not readable

Looks like related to user session but the error is really unclear. Like the previous one, If you have a repro case on this one, please open a dedicated ticket.

I hope my explanation make the situation clearer for you.

I will close this ticket as it started to cumulate too much different potential problems. Please open dedicated ticket for each problem if you manage to have a reprocase you can share. At the same time I will work on #8870 to cleanup the situation.

@richard-julien richard-julien added question Further information is requested and removed bug use for describing something not working as expected needs more info Intel needed about the use case labels Nov 1, 2024
@dominictory
Copy link
Author

Ok lets try to answer this ticket :) Interceptor fail is a generic error that currently occurs at the end of express middleware. So currently it can mix some different problems. I also noticed that we propagated some errors to this middleware for no reason and so it add some noise on the real error.

Now lets explain all the different error in this ticket that finised in a Interceptor fail error

BadRequestError: request aborted

Its a request cancelled by the client. Its not really an error on the server side but a consequence of request cancelling. Maybe related to client cancelling the request because the platform is too long to answer so more a consequence on the client based on a platform that have some performance issue.

GraphQLError: Load file from storage fail

If the file is not accessible for some reason we throw an error that is then catch and log by the generic interceptor. For me we should not propagate the error to make the situation clearer.

Engine unhandled rejection - ERR_HTTP_HEADERS_SENT

This one is more related to a problem in code that hide the real problem has we try to modify the response headers after his generation. If you have a repro case on this one, please open a dedicated ticket.

InternalServerError: stream is not readable

Looks like related to user session but the error is really unclear. Like the previous one, If you have a repro case on this one, please open a dedicated ticket.

I hope my explanation make the situation clearer for you.

I will close this ticket as it started to cumulate too much different potential problems. Please open dedicated ticket for each problem if you manage to have a reprocase you can share. At the same time I will work on #8870 to cleanup the situation.

Thanks! Will revisit my issues and see if can get a repro case. My main issue at the moment is #8846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants