erizo controller has crashed in my machine. I have had to manually restart
it. I paste below the error I got and the relevant piece of code.
any ideas ?
thanks .
<<<<<<<<<<<<<<<<<<<<<<<<<<<
2014-12-06 21:58:37.211 - INFO: ErizoController - Socket disconnect
jMBvN-HEBsQX0LupdrVP
2014-12-06 21:58:37.212 - INFO: ErizoController - Sending message to
FYBaKUBK0LoQO1LidrUV in room 543a5d23436a0aa105fef97d
2014-12-06 21:58:37.212 - INFO: ErizoController - Sending message to
jMBvN-HEBsQX0LupdrVP in room 543a5d23436a0aa105fef97d
2014-12-06 21:58:37.212 - INFO: ErizoController - Sending message to
FYBaKUBK0LoQO1LidrUV in room 543a5d23436a0aa105fef97d
2014-12-06 21:58:37.212 - INFO: ErizoController - Sending message to
jMBvN-HEBsQX0LupdrVP in room 543a5d23436a0aa105fef97d
2014-12-06 21:58:37.212 - INFO: RoomController - Removing subscriptions
of jMBvN-HEBsQX0LupdrVP
/home/ubuntu/licode/erizo_controller/erizoController/erizoController.js:683
if (socket.room.streams[id].hasAudio() ||
socket.room.
^
TypeError: Cannot call method ‘hasAudio’ of undefined
at Socket.
(/home/ubuntu/licode/erizo_controller/erizoController/erizoController.js:683:53)
at Socket.emit [as $emit] (events.js:95:17)
at Socket.onDisconnect
(/home/ubuntu/licode/node_modules/socket.io/lib/socket.js:153:10)
at SocketNamespace.handleDisconnect
(/home/ubuntu/licode/node_modules/socket.io/lib/namespace.js:229:46)
at Manager.onClientDisconnect
(/home/ubuntu/licode/node_modules/socket.io/lib/manager.js:501:29)
at WebSocket.Transport.end
(/home/ubuntu/licode/node_modules/socket.io/lib/transport.js:467:20)
at null._onTimeout
(/home/ubuntu/licode/node_modules/socket.io/lib/transport.js:268:12)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
2014-12-06 21:58:46.806 - INFO: CloudHandler - ErizoController 1 in
54.186.93.49 does not respond. Deleting it.
651 socket.on(‘disconnect’, function () {
652 var i, index, id;
653
654 log.info('Socket disconnect ', socket.id);
655
656 for (i in socket.streams) {
657 if (socket.streams.hasOwnProperty(i)) {
658 sendMsgToRoom(socket.room, ‘onRemoveStream’, {id:
socket.streams[i]});
659 }
660 }
661
662 if (socket.room !== undefined) {
663
664 for (i in socket.room.streams) {
665 if (socket.room.streams.hasOwnProperty(i)) {
666
socket.room.streams[i].removeDataSubscriber(socket.id);
667 }
668 }
669
670 index = socket.room.sockets.indexOf(socket.id);
671 if (index !== -1) {
672 socket.room.sockets.splice(index, 1);
673 }
674
675 if (socket.room.controller) {
676
socket.room.controller.removeSubscriptions(socket.id);
677 }
678
679 for (i in socket.streams) {
680 if (socket.streams.hasOwnProperty(i)) {
681 id = socket.streams[i];
682
683 if (socket.room.streams[id].hasAudio() ||
socket.room.streams[id].hasVideo() || socket.room.streams[id].hasScreen())
{
684 if (!socket.room.p2p) {
685
socket.room.controller.removePublisher(id);
686 if
(GLOBAL.config.erizoController.sendStats) {
687 var timeStamp = new Date();
688 rpc.callRpc(‘stats_handler’,
‘event’, [{room: socket.room.id, user: socket.id, type: ‘unpublish’,
stream: id, timestamp : timeStamp.getTime()}]);
689 }
690 }
691
692 }