meething / meething-mediasoup

Meething Mediasoup Server
https://web.meething.space
11 stars 5 forks source link

Meeting-mediasoup server crashes after a while #14

Open Madriix opened 2 years ago

Madriix commented 2 years ago

Hi

So here I explain: I migrated to a new dedicated server from Debian 9 to Debian 11, it's all almost blank, I put Nodejs v16.13.1 and npm 8.2.0 and I put Meeting-mediasoup like on my old server.

When I start my webcam and I look at myself in another place, I found that it works well but the camera of the transmitter stops the stream at some point, and it restarts randomly a few seconds later. It seems that this bug occurs as soon as a log poster appears indicating "protoo server ... close" here the screen I am looking at on my recipient stops. This is the first problem!

The second problem is that after a while, maybe 4 or 6 hours, the server will end up crashing on its own, it should be restarted. The server reports the following error (last error recovered) :

/home/debian/node/mediasoup/meething-mediasoup/node_modules/mediasoup/lib/Channel.js:199
                        sent.reject(new Error(msg.reason));
                                    ^

Error: Consumer not found
    at Channel._processMessage (/home/debian/node/mediasoup/meething-mediasoup/node_modules/mediasoup/lib/Channel.js:199:37)
    at Socket.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/mediasoup/lib/Channel.js:61:34)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

here is the stopping that starts during the webcam session and then restarts then stops and restarts again.. :

protoo Peer "close" event [peerId:Lyredev]
protoo connection request [peerId:51.2xx.xx.1xx, address:/?roomId=d8yn94xv25qh1qfc4lc&peerId=Lyredev&t=1642594542713, room:%s]
existing room stat d8yn94xv25qh1qfc4lc Lyredev {
  peer: 2,
  transport: 2,
  transports: [ { producer: 1 }, { consumer: 0 } ]
}
request:getRouterRtpCapabilities
request:createWebRtcTransport
request:createWebRtcTransport
request:join
request:connectWebRtcTransport

I tried to update several "npm i <name>@<version>" but it's the same, there's still the error. I also tried to update mediasoup server to the latest version, and there the Meeting-mediasoup server absolutely does not want to start, there are errors.

The problem does not seem to come from ipv6 or not only because of that

Is it possible to give you a tip (less than 120€) to make it functional on a Debian 11 with nodejs latest version and possibly the latest version of mediasoup?