Hello,
I have a server using “mediasoup 3.6.16”, on my local MAC computer it works without problems, but now I am trying to install it on a machine with Centos 6, to test it in a real environment,
System detail:
Node v10.23.0
Python v2.7.18
gcc y g++ v4.9.3
npm v6.14.8
Port: 9001 (open state)
I have no problem running npm install
, but when I try to run npm start
I get the following error:
root@aw0241 [/opt/mediasoup/server]# npm start
> mediasoup-custom@1.0.0 start /opt/mediasoup/server
> node src/app.js
listening https 9001
(node:17126) UnhandledPromiseRejectionWarning: Error: [pid:17133, code:1, signal:null]
at ChildProcess.Worker._child.on (/opt/mediasoup/server/node_modules/mediasoup/lib/Worker.js:122:43)
at ChildProcess.emit (events.js:198:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
(node:17126) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17126) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The error is occurring when trying to create a worker await mediasoup.createWorker({})
(async () => { await createWorkers() })() async function createWorkers() { let { numWorkers } = config.mediasoup for (let i = 0; i < numWorkers; i++) { let worker = await mediasoup.createWorker({ logLevel: config.mediasoup.worker.logLevel, logTags: config.mediasoup.worker.logTags, rtcMinPort: config.mediasoup.worker.rtcMinPort, rtcMaxPort: config.mediasoup.worker.rtcMaxPort, }) worker.on('died', () => { console.error('mediasoup worker died, exiting in 2 seconds... [pid:%d]', worker.pid); setTimeout(() => process.exit(1), 2000); }) workers.push(worker) } }
In the config, the cert.pem and key.pem are already configured
I hope to have your help, I have been all day trying to solve this problem.
PD: Sorry if it’s not well written, I don’t speak English, I’m using a translator.
thank you