mediasoup worker is failing in linux/arm64 (Docker)

Hello Team,

I’m getting following error. when I’m running my mediasoup project as docker container.

2024-02-12T13:24:03.291Z mediasoup:Worker constructor()
2024-02-12T13:24:03.291Z mediasoup:Worker spawning worker process: /media-room/node_modules/mediasoup/worker/out/Release/mediasoup-worker --logLevel=warn --logTag=info --logTag=ice --logTag=dtls --logTag=rtp --logTag=srtp --logTag=rtcp --logTag=rtx --logTag=bwe --logTag=score --logTag=simulcast --logTag=svc --logTag=sctp --rtcMinPort=4422 --rtcMaxPort=7000
2024-02-12T13:24:03.295Z mediasoup:Channel constructor()
2024-02-12T13:24:03.302Z mediasoup:ERROR:Channel [pid:35] DepLibUring::LibUring() | throwing MediaSoupError: io_uring_queue_init() failed: Operation not permitted
2024-02-12T13:24:03.303Z mediasoup:Channel Consumer Channel ended by the worker process
2024-02-12T13:24:03.304Z mediasoup:ERROR:Worker (stderr) mediasoup-worker::mediasoup_worker_run() | failure exit: io_uring_queue_init() failed: Operation not permitted
2024-02-12T13:24:03.305Z mediasoup:Channel Producer Channel ended by the worker process
2024-02-12T13:24:03.305Z mediasoup:ERROR:Worker worker process failed unexpectedly [pid:35, code:40, signal:null]
2024-02-12T13:24:03.305Z mediasoup:Worker close()
2024-02-12T13:24:03.306Z mediasoup:Channel close()
/media-room/node_modules/mediasoup/node/lib/Worker.js:144
                    this.emit('@failure', new Error(`[pid:${this.#pid}, code:${code}, signal:${signal}]`));
                                          ^

Error: [pid:35, code:40, signal:null]
    at ChildProcess.<anonymous> (/media-room/node_modules/mediasoup/node/lib/Worker.js:144:43)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)

  • it is working fine without dockerizing application.

Mediasoup Version: 3.13.18
Instance: Graviton ARM64
Nodejs Version: v21.6.1

let me know if anything required to traceback the error/problem

Thank You

By briefly googling I see this happened to someone else due to having Selinux enabled:

thank you for your answer.

I’ve tried that approach and check sestatus and getenforce as it is disabled. but issue with mediasoup worker remains as it is.

also, I’m not able to identify issue is with mediasoup worker or linux/arm64 permissions. let me know any details required to back track the issue

background:
I have follow instructions mention here to disable SElinux

If this is happening just with docker you should check the restrictions you are adding to the image. Ie: If you are using seccomp then that may be restricting the usage of certain syscalls.