diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index 0707f489cf..ef24d31540 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -256,6 +256,9 @@ jobs: ' - name: Install BBB uses: nick-fields/retry@v3 + env: + NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/bbb-dev/bbb-dev-ca.crt + ACTIONS_RUNNER_DEBUG: true with: timeout_minutes: 25 max_attempts: 2 @@ -265,7 +268,6 @@ jobs: cd /root/ && wget -nv https://raw.githubusercontent.com/bigbluebutton/bbb-install/v3.0.x-release/bbb-install.sh -O bbb-install.sh cat bbb-install.sh | sed "s|> /etc/apt/sources.list.d/bigbluebutton.list||g" | bash -s -- -v jammy-30-dev -s bbb-ci.test -j -d /certs/ bbb-conf --salt bbbci - echo "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/bbb-dev/bbb-dev-ca.crt" >> /usr/share/meteor/bundle/bbb-html5-with-roles.conf sed -i "s/\"minify\": true,/\"minify\": false,/" /usr/share/etherpad-lite/settings.json bbb-conf --restart EOF diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala index 4e5d0b1511..6cc0319310 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala @@ -154,7 +154,7 @@ class BigBlueButtonActor( } private def handleGetAllMeetingsReqMsg(msg: GetAllMeetingsReqMsg): Unit = { - RunningMeetings.meetings(meetings).filter(_.props.systemProps.html5InstanceId == msg.body.html5InstanceId).foreach(m => { + RunningMeetings.meetings(meetings).foreach(m => { m.actorRef ! msg }) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SyncGetGroupChatsInfoMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SyncGetGroupChatsInfoMsgHdlr.scala index b7390ede78..efb5cb1d8e 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SyncGetGroupChatsInfoMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SyncGetGroupChatsInfoMsgHdlr.scala @@ -11,7 +11,7 @@ trait SyncGetGroupChatsInfoMsgHdlr { def handleSyncGetGroupChatsInfo(state: MeetingState2x, liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = { def buildSyncGetGroupChatsRespMsg(allChats: Vector[GroupChatInfo]): BbbCommonEnvCoreMsg = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, "nodeJSapp") val envelope = BbbCoreEnvelope(SyncGetGroupChatsRespMsg.NAME, routing) val header = BbbClientMsgHeader(SyncGetGroupChatsRespMsg.NAME, liveMeeting.props.meetingProp.intId, "nodeJSapp") val body = SyncGetGroupChatsRespMsgBody(allChats) @@ -21,7 +21,7 @@ trait SyncGetGroupChatsInfoMsgHdlr { } def buildSyncGetGroupChatMsgsRespMsg(msgs: Vector[GroupChatMsgToUser], chatId: String): BbbCommonEnvCoreMsg = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, "nodeJSapp") val envelope = BbbCoreEnvelope(SyncGetGroupChatMsgsRespMsg.NAME, routing) val header = BbbClientMsgHeader(SyncGetGroupChatMsgsRespMsg.NAME, liveMeeting.props.meetingProp.intId, "nodeJSapp") val body = SyncGetGroupChatMsgsRespMsgBody(chatId, msgs) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/meeting/SyncGetMeetingInfoRespMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/meeting/SyncGetMeetingInfoRespMsgHdlr.scala index a60764d3b8..6d51ac8887 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/meeting/SyncGetMeetingInfoRespMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/meeting/SyncGetMeetingInfoRespMsgHdlr.scala @@ -9,7 +9,7 @@ trait SyncGetMeetingInfoRespMsgHdlr { val outGW: OutMsgRouter def handleSyncGetMeetingInfoRespMsg(props: DefaultProps): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(props.meetingProp.intId, props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, props.meetingProp.intId, "nodeJSapp") val envelope = BbbCoreEnvelope(SyncGetMeetingInfoRespMsg.NAME, routing) val header = BbbCoreBaseHeader(SyncGetMeetingInfoRespMsg.NAME) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SyncGetPresentationPodsMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SyncGetPresentationPodsMsgHdlr.scala index a1488da85e..52d5358070 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SyncGetPresentationPodsMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SyncGetPresentationPodsMsgHdlr.scala @@ -12,7 +12,7 @@ trait SyncGetPresentationPodsMsgHdlr { def handleSyncGetPresentationPods(state: MeetingState2x, liveMeeting: LiveMeeting, bus: MessageBus): MeetingState2x = { def buildSyncGetPresentationPodsRespMsg(pods: Vector[PresentationPodVO]): BbbCommonEnvCoreMsg = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, "nodeJSapp") val envelope = BbbCoreEnvelope(SyncGetPresentationPodsRespMsg.NAME, routing) val header = BbbClientMsgHeader(SyncGetPresentationPodsRespMsg.NAME, liveMeeting.props.meetingProp.intId, "nodeJSapp") diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/SyncGetScreenshareInfoRespMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/SyncGetScreenshareInfoRespMsgHdlr.scala index 7e5c9d69de..253433036f 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/SyncGetScreenshareInfoRespMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/SyncGetScreenshareInfoRespMsgHdlr.scala @@ -9,9 +9,10 @@ trait SyncGetScreenshareInfoRespMsgHdlr { this: ScreenshareApp2x => def handleSyncGetScreenshareInfoRespMsg(liveMeeting: LiveMeeting, bus: MessageBus): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting( + val routing = Routing.addMsgToClientRouting( + MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, - liveMeeting.props.systemProps.html5InstanceId.toString + "nodeJSapp" ) val envelope = BbbCoreEnvelope(SyncGetScreenshareInfoRespMsg.NAME, routing) val header = BbbClientMsgHeader( diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SyncGetUsersMeetingRespMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SyncGetUsersMeetingRespMsgHdlr.scala index 5c3bb8572f..ec9c0e9e44 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SyncGetUsersMeetingRespMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SyncGetUsersMeetingRespMsgHdlr.scala @@ -11,7 +11,7 @@ trait SyncGetUsersMeetingRespMsgHdlr { val outGW: OutMsgRouter def handleSyncGetUsersMeetingRespMsg(): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, "nodeJSapp") val envelope = BbbCoreEnvelope(SyncGetUsersMeetingRespMsg.NAME, routing) val header = BbbClientMsgHeader(SyncGetUsersMeetingRespMsg.NAME, liveMeeting.props.meetingProp.intId, "nodeJSapp") diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/SyncGetVoiceUsersMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/SyncGetVoiceUsersMsgHdlr.scala index 3ffc7010cb..88631d992f 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/SyncGetVoiceUsersMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/SyncGetVoiceUsersMsgHdlr.scala @@ -17,7 +17,7 @@ trait SyncGetVoiceUsersMsgHdlr { callerNum = u.callerNum, color = u.color, muted = u.muted, talking = u.talking, listenOnly = u.listenOnly) } - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, "nodeJSapp") val envelope = BbbCoreEnvelope(SyncGetVoiceUsersRespMsg.NAME, routing) val header = BbbClientMsgHeader(SyncGetVoiceUsersRespMsg.NAME, liveMeeting.props.meetingProp.intId, "nodeJSapp") val body = SyncGetVoiceUsersRespMsgBody(voiceUsers) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/webcam/SyncGetWebcamInfoRespMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/webcam/SyncGetWebcamInfoRespMsgHdlr.scala index a485b157a2..43c50cb961 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/webcam/SyncGetWebcamInfoRespMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/webcam/SyncGetWebcamInfoRespMsgHdlr.scala @@ -13,9 +13,10 @@ trait SyncGetWebcamInfoRespMsgHdlr { this: WebcamApp2x => def handleSyncGetWebcamInfoRespMsg(liveMeeting: LiveMeeting, bus: MessageBus): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting( + val routing = Routing.addMsgToClientRouting( + MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, - liveMeeting.props.systemProps.html5InstanceId.toString + "nodeJSapp" ) val envelope = BbbCoreEnvelope(SyncGetWebcamInfoRespMsg.NAME, routing) val header = BbbClientMsgHeader( diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ClearWhiteboardPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ClearWhiteboardPubMsgHdlr.scala index b91ebe1f53..6e24114685 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ClearWhiteboardPubMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ClearWhiteboardPubMsgHdlr.scala @@ -11,7 +11,7 @@ trait ClearWhiteboardPubMsgHdlr extends RightsManagementTrait { def handle(msg: ClearWhiteboardPubMsg, liveMeeting: LiveMeeting, bus: MessageBus): Unit = { def broadcastEvent(msg: ClearWhiteboardPubMsg, fullClear: Boolean): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId) val envelope = BbbCoreEnvelope(ClearWhiteboardEvtMsg.NAME, routing) val header = BbbClientMsgHeader(ClearWhiteboardEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/DeleteWhiteboardAnnotationsPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/DeleteWhiteboardAnnotationsPubMsgHdlr.scala index 4ab31b32d3..e592f2c79a 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/DeleteWhiteboardAnnotationsPubMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/DeleteWhiteboardAnnotationsPubMsgHdlr.scala @@ -11,7 +11,7 @@ trait DeleteWhiteboardAnnotationsPubMsgHdlr extends RightsManagementTrait { def handle(msg: DeleteWhiteboardAnnotationsPubMsg, liveMeeting: LiveMeeting, bus: MessageBus): Unit = { def broadcastEvent(msg: DeleteWhiteboardAnnotationsPubMsg, removedAnnotationsIds: Array[String]): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId) val envelope = BbbCoreEnvelope(DeleteWhiteboardAnnotationsEvtMsg.NAME, routing) val header = BbbClientMsgHeader(DeleteWhiteboardAnnotationsEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala index a7cbfe1d64..0de1ee973b 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala @@ -10,7 +10,7 @@ trait GetWhiteboardAnnotationsReqMsgHdlr { def handle(msg: GetWhiteboardAnnotationsReqMsg, liveMeeting: LiveMeeting, bus: MessageBus): Unit = { def broadcastEvent(msg: GetWhiteboardAnnotationsReqMsg, history: Array[AnnotationVO], multiUser: Array[String]): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, msg.header.userId) val envelope = BbbCoreEnvelope(GetWhiteboardAnnotationsRespMsg.NAME, routing) val header = BbbClientMsgHeader(GetWhiteboardAnnotationsRespMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala index d50320d973..1607587c80 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala @@ -11,7 +11,7 @@ trait ModifyWhiteboardAccessPubMsgHdlr extends RightsManagementTrait { def handle(msg: ModifyWhiteboardAccessPubMsg, liveMeeting: LiveMeeting, bus: MessageBus): Unit = { def broadcastEvent(msg: ModifyWhiteboardAccessPubMsg): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId) val envelope = BbbCoreEnvelope(ModifyWhiteboardAccessEvtMsg.NAME, routing) val header = BbbClientMsgHeader(ModifyWhiteboardAccessEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendCursorPositionPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendCursorPositionPubMsgHdlr.scala index ec3c99df70..24d5233a43 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendCursorPositionPubMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendCursorPositionPubMsgHdlr.scala @@ -12,7 +12,7 @@ trait SendCursorPositionPubMsgHdlr extends RightsManagementTrait { def handle(msg: SendCursorPositionPubMsg, liveMeeting: LiveMeeting, bus: MessageBus): Unit = { def broadcastEvent(msg: SendCursorPositionPubMsg): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString) + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId) val envelope = BbbCoreEnvelope(SendCursorPositionEvtMsg.NAME, routing) val header = BbbClientMsgHeader(SendCursorPositionEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala index 236f881251..aa7bc87b2f 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala @@ -10,8 +10,8 @@ trait SendWhiteboardAnnotationsPubMsgHdlr extends RightsManagementTrait { def handle(msg: SendWhiteboardAnnotationsPubMsg, liveMeeting: LiveMeeting, bus: MessageBus): Unit = { - def broadcastEvent(msg: SendWhiteboardAnnotationsPubMsg, whiteboardId: String, annotations: Array[AnnotationVO], html5InstanceId: String): Unit = { - val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, html5InstanceId) + def broadcastEvent(msg: SendWhiteboardAnnotationsPubMsg, whiteboardId: String, annotations: Array[AnnotationVO]): Unit = { + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId) val envelope = BbbCoreEnvelope(SendWhiteboardAnnotationsEvtMsg.NAME, routing) val header = BbbClientMsgHeader(SendWhiteboardAnnotationsEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId) @@ -58,7 +58,7 @@ trait SendWhiteboardAnnotationsPubMsgHdlr extends RightsManagementTrait { // } // println("============= Printed Sanitized annotations ============") val annotations = sendWhiteboardAnnotations(msg.body.whiteboardId, msg.header.userId, msg.body.annotations, liveMeeting, isUserAmongPresenters, isUserModerator) - broadcastEvent(msg, msg.body.whiteboardId, annotations, msg.body.html5InstanceId) + broadcastEvent(msg, msg.body.whiteboardId, annotations) } else { //val meetingId = liveMeeting.props.meetingProp.intId //val reason = "No permission to send a whiteboard annotation." diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala index c020a7da4e..123b8b8152 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala @@ -18,27 +18,18 @@ class FromAkkaAppsMsgSenderActor(msgSender: MessageSender) case _ => log.warning("Cannot handle message ") } - def sendToHTML5InstanceIdChannel(msg: BbbCommonEnvCoreMsg, json: String): Unit = { - msg.envelope.routing.get("html5InstanceId") match { - case Some(id) => { - msgSender.send(toHTML5RedisChannel.concat(id), json) - } - case _ => log.error("No html5InstanceId for " + msg.envelope.name) - } - } - def handleBbbCommonEnvCoreMsg(msg: BbbCommonEnvCoreMsg): Unit = { val json = JsonUtil.toJson(msg) msg.envelope.name match { // HTML5 sync messages - case SyncGetPresentationPodsRespMsg.NAME => sendToHTML5InstanceIdChannel(msg, json) - case SyncGetMeetingInfoRespMsg.NAME => sendToHTML5InstanceIdChannel(msg, json) - case SyncGetUsersMeetingRespMsg.NAME => sendToHTML5InstanceIdChannel(msg, json) - case SyncGetGroupChatsRespMsg.NAME => sendToHTML5InstanceIdChannel(msg, json) - case SyncGetGroupChatMsgsRespMsg.NAME => sendToHTML5InstanceIdChannel(msg, json) - case SyncGetVoiceUsersRespMsg.NAME => sendToHTML5InstanceIdChannel(msg, json) + case SyncGetPresentationPodsRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) + case SyncGetMeetingInfoRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) + case SyncGetUsersMeetingRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) + case SyncGetGroupChatsRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) + case SyncGetGroupChatMsgsRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) + case SyncGetVoiceUsersRespMsg.NAME => msgSender.send(toHTML5RedisChannel, json) // Sent to FreeSWITCH case EjectAllFromVoiceConfMsg.NAME => diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala index 0d4474805b..453f43eb62 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala @@ -68,7 +68,6 @@ case class LockSettingsProps( ) case class SystemProps( - html5InstanceId: Int, loginUrl: String, logoutUrl: String, customLogoURL: String, diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/Routing.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/Routing.scala index 37059ae2fa..bf31dd9dda 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/Routing.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/Routing.scala @@ -4,7 +4,6 @@ object Routing { val MSG_TYPE = "msgType" val MEETING_ID = "meetingId" val USER_ID = "userId" - val HTML5_INSTANCE_ID = "html5InstanceId" def addMsgToClientRouting(msgType: String, meetingId: String, userId: String): collection.immutable.Map[String, String] = { Map(MSG_TYPE -> msgType, MEETING_ID -> meetingId, USER_ID -> userId) @@ -13,10 +12,6 @@ object Routing { def addMsgFromClientRouting(meetingId: String, userId: String): collection.immutable.Map[String, String] = { Map(MEETING_ID -> meetingId, USER_ID -> userId) } - - def addMsgToHtml5InstanceIdRouting(meetingId: String, html5InstanceId: String): collection.immutable.Map[String, String] = { - Map(MEETING_ID -> meetingId, HTML5_INSTANCE_ID -> html5InstanceId) - } } class Routing { diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/SystemMsgs.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/SystemMsgs.scala index 154aa12b35..ca2970c916 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/SystemMsgs.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/SystemMsgs.scala @@ -35,7 +35,7 @@ case class GetAllMeetingsReqMsg( header: BbbCoreBaseHeader, body: GetAllMeetingsReqMsgBody ) extends BbbCoreMsg -case class GetAllMeetingsReqMsgBody(requesterId: String, html5InstanceId: Int) +case class GetAllMeetingsReqMsgBody(requesterId: String) object GetRunningMeetingsReqMsg { val NAME = "GetRunningMeetingsReqMsg" } case class GetRunningMeetingsReqMsg( diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/WhiteboardMsgs.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/WhiteboardMsgs.scala index 19ab09c446..66ae474182 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/WhiteboardMsgs.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/WhiteboardMsgs.scala @@ -54,7 +54,7 @@ case class SendCursorPositionPubMsgBody(whiteboardId: String, xPercent: Double, object SendWhiteboardAnnotationsPubMsg { val NAME = "SendWhiteboardAnnotationsPubMsg" } case class SendWhiteboardAnnotationsPubMsg(header: BbbClientMsgHeader, body: SendWhiteboardAnnotationsPubMsgBody) extends StandardMsg -case class SendWhiteboardAnnotationsPubMsgBody(whiteboardId: String, annotations: Array[AnnotationVO], html5InstanceId: String) +case class SendWhiteboardAnnotationsPubMsgBody(whiteboardId: String, annotations: Array[AnnotationVO]) object DeleteWhiteboardAnnotationsPubMsg { val NAME = "DeleteWhiteboardAnnotationsPubMsg" } case class DeleteWhiteboardAnnotationsPubMsg(header: BbbClientMsgHeader, body: DeleteWhiteboardAnnotationsPubMsgBody) extends StandardMsg diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java index bc0b841592..098bd4f2bc 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java @@ -68,7 +68,6 @@ public class ApiParams { public static final String MEETING_EXPIRE_IF_NO_USER_JOINED_IN_MINUTES = "meetingExpireIfNoUserJoinedInMinutes"; public static final String MEETING_EXPIRE_WHEN_LAST_USER_LEFT_IN_MINUTES = "meetingExpireWhenLastUserLeftInMinutes"; public static final String WELCOME = "welcome"; - public static final String HTML5_INSTANCE_ID = "html5InstanceId"; public static final String ROLE = "role"; public static final String GROUPS = "groups"; public static final String DISABLED_FEATURES = "disabledFeatures"; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/HTML5LoadBalancingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/HTML5LoadBalancingService.java deleted file mode 100644 index 06538834d1..0000000000 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/HTML5LoadBalancingService.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ - *

- * Copyright (c) 2020 BigBlueButton Inc. and by respective authors (see below). - *

- * This program is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3.0 of the License, or (at your option) any later - * version. - *

- * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - *

- * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, see . - */ - -package org.bigbluebutton.api; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.BufferedReader; -import java.io.InputStreamReader; - -import java.io.InputStream; -import java.io.OutputStream; - -import org.apache.commons.io.IOUtils; - -import java.util.ArrayList; -import java.util.List; - -import org.bigbluebutton.api.util.HTML5ProcessLine; - - -public class HTML5LoadBalancingService { - private static Logger log = LoggerFactory.getLogger(HTML5LoadBalancingService.class); - private ArrayList list = new ArrayList(); - private final int MAX_NUMBER_OF_HTML5_INSTANCES = 20; - private int lastSelectedInstanceId = 0; - - public void init() { - log.info("HTML5LoadBalancingService initialised"); - } - - // Find nodejs processes associated with processing meeting events - // $ ps -u meteor -o pcpu,cmd= | grep NODEJS_BACKEND_INSTANCE_ID - // 1.1 /usr/lib/bbb-html5/node/bin/node --max-old-space-size=2048 --max_semi_space_size=128 main.js NODEJS_BACKEND_INSTANCE_ID=1 - // 1.0 /usr/lib/bbb-html5/node/bin/node --max-old-space-size=2048 --max_semi_space_size=128 main.js NODEJS_BACKEND_INSTANCE_ID=2 - public void scanHTML5processes() { - try { - this.list = new ArrayList(); - Process p1 = Runtime.getRuntime().exec(new String[]{"ps", "-u", "meteor", "-o", "pcpu,cmd="}); - InputStream input1 = p1.getInputStream(); - Process p2 = Runtime.getRuntime().exec(new String[]{"grep", HTML5ProcessLine.BBB_HTML5_PROCESS_IDENTIFIER}); - OutputStream output = p2.getOutputStream(); - IOUtils.copy(input1, output); - output.close(); // signals grep to finish - List result = IOUtils.readLines(p2.getInputStream()); - for (String entry : result) { - HTML5ProcessLine line = new HTML5ProcessLine(entry); - list.add(line); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - private boolean listItemWithIdExists(int id) { - for (HTML5ProcessLine line : this.list) { - if (line.instanceId == id) { - return true; - } - } - return false; - } - - public int findSuitableHTML5ProcessByRoundRobin() { - this.scanHTML5processes(); - if (list.isEmpty()) { - log.warn("Did not find any instances of html5 process running"); - return 1; - } - - for (int i = lastSelectedInstanceId + 1; i <= MAX_NUMBER_OF_HTML5_INSTANCES + lastSelectedInstanceId; i++) { - int k = i % (MAX_NUMBER_OF_HTML5_INSTANCES + 1); - if (this.listItemWithIdExists(k)) { - this.lastSelectedInstanceId = k; - return k; - } - } - return 1; - } - -} diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java index 5b951c5cf4..28c2838067 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java @@ -452,7 +452,7 @@ public class MeetingService implements MessageListener { m.getUserInactivityInspectTimerInMinutes(), m.getUserInactivityThresholdInMinutes(), m.getUserActivitySignResponseDelayInMinutes(), m.getEndWhenNoModerator(), m.getEndWhenNoModeratorDelayInMinutes(), m.getMuteOnStart(), m.getAllowModsToUnmuteUsers(), m.getAllowModsToEjectCameras(), m.getMeetingKeepEvents(), - m.breakoutRoomsParams, m.lockSettingsParams, m.getHtml5InstanceId(), m.getLoginUrl(), m.getLogoutUrl(), m.getCustomLogoURL(), + m.breakoutRoomsParams, m.lockSettingsParams, m.getLoginUrl(), m.getLogoutUrl(), m.getCustomLogoURL(), m.getBannerText(), m.getBannerColor(), m.getGroups(), m.getDisabledFeatures(), m.getNotifyRecordingIsOn(), m.getPresentationUploadExternalDescription(), m.getPresentationUploadExternalUrl(), m.getOverrideClientSettings()); diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java index 1931b9c7fc..9421955f1a 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java @@ -134,7 +134,6 @@ public class ParamsProcessorUtil { private Integer maxUserConcurrentAccesses = 0; private Boolean defaultEndWhenNoModerator = false; private Integer defaultEndWhenNoModeratorDelayInMinutes = 1; - private Integer defaultHtml5InstanceId = 1; private String bbbVersion = ""; private Boolean allowRevealOfBBBVersion = false; @@ -731,8 +730,6 @@ public class ParamsProcessorUtil { String avatarURL = useDefaultAvatar ? defaultAvatarURL : ""; - int html5InstanceId = processHtml5InstanceId(params.get(ApiParams.HTML5_INSTANCE_ID)); - if(defaultAllowDuplicateExtUserid == false) { log.warn("[DEPRECATION] use `maxUserConcurrentAccesses=1` instead of `allowDuplicateExtUserid=false`"); maxUserConcurrentAccesses = 1; @@ -768,7 +765,6 @@ public class ParamsProcessorUtil { .withBreakoutRoomsParams(breakoutParams) .withLockSettingsParams(lockSettingsParams) .withMaxUserConcurrentAccesses(maxUserConcurrentAccesses) - .withHTML5InstanceId(html5InstanceId) .withLearningDashboardCleanupDelayInMinutes(learningDashboardCleanupMins) .withLearningDashboardAccessToken(learningDashboardAccessToken) .withGroups(groups) @@ -795,7 +791,6 @@ public class ParamsProcessorUtil { meeting.setUserInactivityInspectTimerInMinutes(userInactivityInspectTimerInMinutes); meeting.setUserActivitySignResponseDelayInMinutes(userActivitySignResponseDelayInMinutes); meeting.setUserInactivityThresholdInMinutes(userInactivityThresholdInMinutes); -// meeting.setHtml5InstanceId(html5InstanceId); meeting.setEndWhenNoModerator(endWhenNoModerator); meeting.setEndWhenNoModeratorDelayInMinutes(endWhenNoModeratorDelayInMinutes); @@ -978,17 +973,6 @@ public class ParamsProcessorUtil { return rec; } - public int processHtml5InstanceId(String instanceId) { - int html5InstanceId = 1; - try { - html5InstanceId = Integer.parseInt(instanceId); - } catch(Exception ex) { - html5InstanceId = defaultHtml5InstanceId; - } - - return html5InstanceId; - } - public int processMaxUser(String maxUsers) { int mUsers = -1; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java index 3cdaa71698..8ea0af81f6 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java @@ -117,8 +117,6 @@ public class Meeting { private String meetingEndedCallbackURL = ""; - private Integer html5InstanceId; - private String overrideClientSettings = ""; public Meeting(Meeting.Builder builder) { @@ -174,7 +172,6 @@ public class Meeting { maxUserConcurrentAccesses = builder.maxUserConcurrentAccesses; endWhenNoModerator = builder.endWhenNoModerator; endWhenNoModeratorDelayInMinutes = builder.endWhenNoModeratorDelayInMinutes; - html5InstanceId = builder.html5InstanceId; groups = builder.groups; guestUsersWithPositionInWaitingLine = new HashMap<>(); userCustomData = new HashMap<>(); @@ -286,10 +283,6 @@ public class Meeting { return GuestPolicy.DENY; } - public int getHtml5InstanceId() { return html5InstanceId; } - - public void setHtml5InstanceId(int instanceId) { html5InstanceId = instanceId; } - public ArrayList getGroups() { return groups; } public void setGroups(ArrayList groups) { this.groups = groups; } @@ -925,7 +918,6 @@ public class Meeting { private Integer maxUserConcurrentAccesses; private Boolean endWhenNoModerator; private Integer endWhenNoModeratorDelayInMinutes; - private int html5InstanceId; private ArrayList groups; public Builder(String externalId, String internalId, long createTime) { @@ -1139,11 +1131,6 @@ public class Meeting { return this; } - public Builder withHTML5InstanceId(int instanceId) { - html5InstanceId = instanceId; - return this; - } - public Builder withGroups(ArrayList groups) { this.groups = groups; return this; diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/util/HTML5ProcessLine.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/util/HTML5ProcessLine.java deleted file mode 100644 index 32d01b51ea..0000000000 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/util/HTML5ProcessLine.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ - *

- * Copyright (c) 2020 BigBlueButton Inc. and by respective authors (see below). - *

- * This program is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3.0 of the License, or (at your option) any later - * version. - *

- * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - *

- * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, see . - */ - -package org.bigbluebutton.api.util; - -public class HTML5ProcessLine { - - public int instanceId; - public double percentageCPU; - - public static final String BBB_HTML5_PROCESS_IDENTIFIER = "NODEJS_BACKEND_INSTANCE_ID"; - - public HTML5ProcessLine(String input) { - // $ ps -u meteor -o pcpu,cmd= | grep NODEJS_BACKEND_INSTANCE_ID - // 1.1 /usr/lib/bbb-html5/node/bin/node --max-old-space-size=2048 --max_semi_space_size=128 main.js NODEJS_BACKEND_INSTANCE_ID=1 - // 1.0 /usr/lib/bbb-html5/node/bin/node --max-old-space-size=2048 --max_semi_space_size=128 main.js NODEJS_BACKEND_INSTANCE_ID=2 - - String[] a = input.trim().split(" "); - this.percentageCPU = Double.parseDouble(a[0]); - - for (int i = 0; i < a.length; i++) { - if (a[i].toString().indexOf(BBB_HTML5_PROCESS_IDENTIFIER) > -1) { - this.instanceId = Integer.parseInt(a[i].replace(BBB_HTML5_PROCESS_IDENTIFIER + "=", "")); - } - } - } - - public String toString() { - return "instanceId:" + this.instanceId + " CPU:" + this.percentageCPU; - } - - -} diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java b/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java index c8b4d2ac46..be4af85cc3 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java @@ -41,7 +41,6 @@ public interface IBbbWebApiGWApp { Boolean keepEvents, BreakoutRoomsParams breakoutParams, LockSettingsParams lockSettingsParams, - Integer html5InstanceId, String loginUrl, String logoutUrl, String customLogoURL, diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala index 024a6f5326..3679c54dd3 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala @@ -148,7 +148,6 @@ class BbbWebApiGWApp( keepEvents: java.lang.Boolean, breakoutParams: BreakoutRoomsParams, lockSettingsParams: LockSettingsParams, - html5InstanceId: java.lang.Integer, loginUrl: String, logoutUrl: String, customLogoURL: String, @@ -235,7 +234,6 @@ class BbbWebApiGWApp( ) val systemProps = SystemProps( - html5InstanceId, loginUrl match { case url: String => url case _ => "" diff --git a/bbb-graphql-actions/src/actions/presAnnotationSubmit.ts b/bbb-graphql-actions/src/actions/presAnnotationSubmit.ts index e79efe26c7..e66893e3af 100644 --- a/bbb-graphql-actions/src/actions/presAnnotationSubmit.ts +++ b/bbb-graphql-actions/src/actions/presAnnotationSubmit.ts @@ -22,7 +22,6 @@ export default function buildRedisMessage(sessionVariables: Record/dev/null <; durationInSeconds: number; extId: string; - html5InstanceId: string | null; isBreakout: boolean; learningDashboardAccessToken: string; maxPinnedCameras: number; diff --git a/bigbluebutton-html5/imports/ui/core/graphql/queries/meetingSubscription.ts b/bigbluebutton-html5/imports/ui/core/graphql/queries/meetingSubscription.ts index a70772714f..648919dbb8 100644 --- a/bigbluebutton-html5/imports/ui/core/graphql/queries/meetingSubscription.ts +++ b/bigbluebutton-html5/imports/ui/core/graphql/queries/meetingSubscription.ts @@ -97,7 +97,6 @@ const MEETING_SUBSCRIPTION = gql` record sequence } - html5InstanceId voiceSettings { dialNumber muteOnStart diff --git a/bigbluebutton-html5/package-lock.json b/bigbluebutton-html5/package-lock.json index 4e3f82020d..3bb8233dc4 100644 --- a/bigbluebutton-html5/package-lock.json +++ b/bigbluebutton-html5/package-lock.json @@ -9432,4 +9432,4 @@ } } } -} +} \ No newline at end of file diff --git a/bigbluebutton-web/grails-app/conf/spring/resources.xml b/bigbluebutton-web/grails-app/conf/spring/resources.xml index 2ef1102312..81e97d4f29 100755 --- a/bigbluebutton-web/grails-app/conf/spring/resources.xml +++ b/bigbluebutton-web/grails-app/conf/spring/resources.xml @@ -118,8 +118,6 @@ with BigBlueButton; if not, see . - - diff --git a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy index d4c91363b6..a5bfbf756c 100755 --- a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy +++ b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy @@ -62,7 +62,6 @@ class ApiController { ParamsProcessorUtil paramsProcessorUtil PresentationUrlDownloadService presDownloadService StunTurnService stunTurnService - HTML5LoadBalancingService html5LoadBalancingService ResponseBuilder responseBuilder = initResponseBuilder() ValidationService validationService @@ -184,8 +183,6 @@ class ApiController { // Still no unique voiceBridge found? Let createMeeting handle it. } - params.html5InstanceId = html5LoadBalancingService.findSuitableHTML5ProcessByRoundRobin().toString() - Meeting newMeeting = paramsProcessorUtil.processCreateParams(params) String requestBody = request.inputStream == null ? null : request.inputStream.text diff --git a/build/packages-template/bbb-html5/bbb-html5-backend@.service b/build/packages-template/bbb-html5/bbb-html5-backend@.service deleted file mode 100644 index 43f8e26373..0000000000 --- a/build/packages-template/bbb-html5/bbb-html5-backend@.service +++ /dev/null @@ -1,28 +0,0 @@ -[Unit] -Description=BigBlueButton HTML5 service, backend instance %i -Requires=bbb-html5.service -Before=bbb-html5.service -BindsTo=bbb-html5.service -StartLimitBurst=4 -StartLimitInterval=70sec -StartLimitAction=none - -[Service] -PermissionsStartOnly=true -#Type=simple -Type=idle -EnvironmentFile=/usr/share/meteor/bundle/bbb-html5-with-roles.conf -ExecStart=/usr/share/meteor/bundle/systemd_start.sh %i $BACKEND_NODEJS_ROLE -WorkingDirectory=/usr/share/meteor/bundle -StandardOutput=syslog -StandardError=syslog -TimeoutStartSec=10 -Restart=on-failure -RestartSec=10 -User=meteor -Group=meteor -CPUSchedulingPolicy=fifo -Nice=18 - -[Install] -WantedBy=bbb-html5.service diff --git a/build/packages-template/bbb-html5/bbb-html5-frontend@.service b/build/packages-template/bbb-html5/bbb-html5-frontend@.service deleted file mode 100644 index f89095c368..0000000000 --- a/build/packages-template/bbb-html5/bbb-html5-frontend@.service +++ /dev/null @@ -1,29 +0,0 @@ -[Unit] -Description=BigBlueButton HTML5 service, frontend instance %i -Requires=bbb-html5.service -Before=bbb-html5.service -BindsTo=bbb-html5.service -StartLimitBurst=4 -StartLimitInterval=70sec -StartLimitAction=none - -[Service] -PermissionsStartOnly=true -#Type=simple -Type=idle -EnvironmentFile=/usr/share/meteor/bundle/bbb-html5-with-roles.conf -ExecStart=/usr/share/meteor/bundle/systemd_start_frontend.sh %i -WorkingDirectory=/usr/share/meteor/bundle -StandardOutput=syslog -StandardError=syslog -TimeoutStartSec=10 -Restart=on-failure -RestartSec=10 -User=meteor -Group=meteor -CPUSchedulingPolicy=fifo -Nice=18 - -[Install] -WantedBy=bbb-html5.service - diff --git a/build/packages-template/bbb-html5/bbb-html5-loadbalancer.conf b/build/packages-template/bbb-html5/bbb-html5-loadbalancer.conf deleted file mode 100644 index adb25948ad..0000000000 --- a/build/packages-template/bbb-html5/bbb-html5-loadbalancer.conf +++ /dev/null @@ -1,13 +0,0 @@ -upstream poolhtml5servers { - zone poolhtml5servers 32k; - least_conn; - server 127.0.0.1:4100 fail_timeout=5s max_fails=3; - server 127.0.0.1:4101 fail_timeout=5s max_fails=3; - server 127.0.0.1:4102 fail_timeout=5s max_fails=3; - server 127.0.0.1:4103 fail_timeout=5s max_fails=3; - server 127.0.0.1:4104 fail_timeout=5s max_fails=3; - server 127.0.0.1:4105 fail_timeout=5s max_fails=3; - server 127.0.0.1:4106 fail_timeout=5s max_fails=3; - server 127.0.0.1:4107 fail_timeout=5s max_fails=3; -} - diff --git a/build/packages-template/bbb-html5/bbb-html5-with-roles.conf b/build/packages-template/bbb-html5/bbb-html5-with-roles.conf deleted file mode 100644 index 1c869d1df2..0000000000 --- a/build/packages-template/bbb-html5/bbb-html5-with-roles.conf +++ /dev/null @@ -1,9 +0,0 @@ -# Default = 2; Min = 1; Max = 4 -# On powerful systems with high number of meetings you can set values up to 4 to accelerate handling of events -NUMBER_OF_BACKEND_NODEJS_PROCESSES=2 -# Default = 2; Min = 0; Max = 8 -# If 0 is set, bbb-html5 will handle both backend and frontend roles in one process (default until Feb 2021) -# Set a number between 1 and 4 times the value of NUMBER_OF_BACKEND_NODEJS_PROCESSES where higher number helps with meetings -# stretching the recommended number of users in BigBlueButton -NUMBER_OF_FRONTEND_NODEJS_PROCESSES=2 - diff --git a/build/packages-template/bbb-html5/bbb-html5.conf b/build/packages-template/bbb-html5/bbb-html5.conf deleted file mode 100644 index 05ab984352..0000000000 --- a/build/packages-template/bbb-html5/bbb-html5.conf +++ /dev/null @@ -1,4 +0,0 @@ -INSTANCE_MIN=1 -INSTANCE_MAX=4 -DESIRED_INSTANCE_COUNT=1 - diff --git a/build/packages-template/bbb-html5/bbb-html5.nginx b/build/packages-template/bbb-html5/bbb-html5.nginx index 0e4dadc9d0..d6656bba7c 100644 --- a/build/packages-template/bbb-html5/bbb-html5.nginx +++ b/build/packages-template/bbb-html5/bbb-html5.nginx @@ -1,6 +1,5 @@ location @html5client { - # proxy_pass http://127.0.0.1:4100; # use for development - proxy_pass http://poolhtml5servers; # use for production + proxy_pass http://127.0.0.1:4100; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; @@ -15,13 +14,13 @@ location /html5client/__meteor__/dynamic-import/fetch { proxy_cache_lock on; add_header X-Cached $upstream_cache_status; - proxy_pass http://poolhtml5servers; + proxy_pass http://127.0.0.1:4100; proxy_http_version 1.1; } -#location /html5client/join { -# alias /usr/share/meteor/bundle/programs/web.browser; -#} + #location /html5client/join { + # alias /usr/share/meteor/bundle/programs/web.browser; + #} location /html5client/locales { alias /usr/share/meteor/bundle/programs/web.browser/app/locales; diff --git a/build/packages-template/bbb-html5/bbb-html5.service b/build/packages-template/bbb-html5/bbb-html5.service index eb56a2fb77..c0ace38b3f 100644 --- a/build/packages-template/bbb-html5/bbb-html5.service +++ b/build/packages-template/bbb-html5/bbb-html5.service @@ -5,16 +5,18 @@ After=redis-server.service mongod.service disable-transparent-huge-pages.service PartOf=bigbluebutton.target [Service] -Type=oneshot +Type=idle ExecStart=/usr/share/meteor/bundle/workers-start.sh -WorkingDirectory=/usr/share/meteor -# WorkingDirectory=/usr/share/meteor/bundle -RemainAfterExit=yes -# StandardOutput=syslog -# StandardError=syslog -# User=meteor -# Group=meteor -User=root +WorkingDirectory=/usr/share/meteor/bundle +StandardOutput=syslog +StandardError=syslog +TimeoutStartSec=10 +Restart=on-failure +RestartSec=10 +User=meteor +Group=meteor +CPUSchedulingPolicy=fifo +Nice=18 [Install] WantedBy=multi-user.target bigbluebutton.target diff --git a/build/packages-template/bbb-html5/before-install.sh b/build/packages-template/bbb-html5/before-install.sh index 5c783c1ad5..0ae413e95f 100755 --- a/build/packages-template/bbb-html5/before-install.sh +++ b/build/packages-template/bbb-html5/before-install.sh @@ -10,5 +10,19 @@ case "$1" in rm -r /usr/share/meteor/bundle/programs/server/node_modules fi + # Remove remnants from old architecture prior to BBB 3.0.x-alpha.6 + if [ -f /usr/lib/systemd/system/bbb-html5-backend@.service ]; then + rm /usr/lib/systemd/system/bbb-html5-backend@.service + fi + if [ -f /usr/lib/systemd/system/bbb-html5-frontend@.service ]; then + rm /usr/lib/systemd/system/bbb-html5-frontend@.service + fi + if [ -f /etc/nginx/conf.d/bbb-html5-loadbalancer.conf ]; then + rm /etc/nginx/conf.d/bbb-html5-loadbalancer.conf + fi + if [ -f /etc/bigbluebutton/bbb-html5-with-roles.conf ]; then + echo "BigBlueButton 3.0+ does not support configurations in /etc/bigbluebutton/bbb-html5-with-roles.conf" + fi + ;; esac diff --git a/build/packages-template/bbb-html5/build.sh b/build/packages-template/bbb-html5/build.sh index 38255284a8..d7155386c1 100755 --- a/build/packages-template/bbb-html5/build.sh +++ b/build/packages-template/bbb-html5/build.sh @@ -25,7 +25,6 @@ mkdir -p staging/usr/share/bigbluebutton/nginx cp bbb-html5.nginx staging/usr/share/bigbluebutton/nginx mkdir -p staging/etc/nginx/conf.d -cp bbb-html5-loadbalancer.conf staging/etc/nginx/conf.d cp bbb-html5-conn-limit.conf staging/etc/nginx/conf.d cp bbb-html5-meteor-assets-cache.conf staging/etc/nginx/conf.d @@ -78,17 +77,9 @@ if [ ! -f staging/usr/share/meteor/bundle/programs/web.browser/app/locales/index find staging/usr/share/meteor/bundle/programs/web.browser/app/locales -maxdepth 1 -type f -name "*.json" -exec basename {} \; | awk 'BEGIN{printf "["}{printf "\"%s\", ", $0}END{print "]"}' | sed 's/, ]/]/' > staging/usr/share/meteor/bundle/programs/web.browser/app/locales/index.json fi -cp systemd_start.sh staging/usr/share/meteor/bundle -chmod +x staging/usr/share/meteor/bundle/systemd_start.sh - -cp systemd_start_frontend.sh staging/usr/share/meteor/bundle -chmod +x staging/usr/share/meteor/bundle/systemd_start_frontend.sh - cp workers-start.sh staging/usr/share/meteor/bundle chmod +x staging/usr/share/meteor/bundle/workers-start.sh -cp bbb-html5-with-roles.conf staging/usr/share/meteor/bundle - cp mongod_start_pre.sh staging/usr/share/meteor/bundle chmod +x staging/usr/share/meteor/bundle/mongod_start_pre.sh @@ -99,10 +90,6 @@ mkdir -p staging/usr/lib/systemd/system cp bbb-html5.service staging/usr/lib/systemd/system cp disable-transparent-huge-pages.service staging/usr/lib/systemd/system -cp bbb-html5-backend@.service staging/usr/lib/systemd/system -cp bbb-html5-frontend@.service staging/usr/lib/systemd/system - - mkdir -p staging/usr/share # replace v=VERSION with build number in head and css files diff --git a/build/packages-template/bbb-html5/systemd_start.sh b/build/packages-template/bbb-html5/systemd_start.sh deleted file mode 100644 index e48c13a31f..0000000000 --- a/build/packages-template/bbb-html5/systemd_start.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -e - -#Allow to run outside of directory -cd $(dirname $0) - -if [ -z $1 ] -then - INSTANCE_ID=1 -else - INSTANCE_ID=$1 -fi - -PORT=$(echo "3999+$INSTANCE_ID" | bc) - -echo "instanceId = $INSTANCE_ID and port = $PORT and role is backend (in backend file)" - -export INSTANCE_ID=$INSTANCE_ID -export BBB_HTML5_ROLE=backend -# this might be already set by a systemd unit override in case this node is run -# behind a load balancer proxy node -if [[ -z $ROOT_URL ]] ; then - export ROOT_URL=http://127.0.0.1/html5client -fi -export MONGO_OPLOG_URL=mongodb://127.0.1.1/local -export MONGO_URL=mongodb://127.0.1.1/meteor -export NODE_ENV=production -export SERVER_WEBSOCKET_COMPRESSION=0 -export BIND_IP=127.0.0.1 -PORT=$PORT /usr/lib/bbb-html5/node/bin/node --max-old-space-size=2048 --max_semi_space_size=128 main.js NODEJS_BACKEND_INSTANCE_ID=$INSTANCE_ID - diff --git a/build/packages-template/bbb-html5/systemd_start_frontend.sh b/build/packages-template/bbb-html5/systemd_start_frontend.sh deleted file mode 100644 index d23c5eaa89..0000000000 --- a/build/packages-template/bbb-html5/systemd_start_frontend.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -e - -#Allow to run outside of directory -cd $(dirname $0) - -if [ -z $1 ] -then - INSTANCE_ID=1 -else - INSTANCE_ID=$1 -fi - -PORT=$(echo "4099+$INSTANCE_ID" | bc) - -echo "instanceId = $INSTANCE_ID and port = $PORT and role is frontend (in frontend file)" - -export INSTANCE_ID=$INSTANCE_ID -export BBB_HTML5_ROLE=frontend -# this might be already set by a systemd unit override in case this node is run -# behind a load balancer proxy node -if [[ -z $ROOT_URL ]] ; then - export ROOT_URL=http://127.0.0.1/html5client -fi -export MONGO_OPLOG_URL=mongodb://127.0.1.1/local -export MONGO_URL=mongodb://127.0.1.1/meteor -export NODE_ENV=production -export SERVER_WEBSOCKET_COMPRESSION='{"level":5, "maxWindowBits":13, "memLevel":7, "requestMaxWindowBits":13}' -export BIND_IP=127.0.0.1 -PORT=$PORT /usr/lib/bbb-html5/node/bin/node --max-old-space-size=2048 --max_semi_space_size=128 main.js diff --git a/build/packages-template/bbb-html5/workers-start.sh b/build/packages-template/bbb-html5/workers-start.sh index a4b5aba182..36e93cf4b0 100644 --- a/build/packages-template/bbb-html5/workers-start.sh +++ b/build/packages-template/bbb-html5/workers-start.sh @@ -23,37 +23,19 @@ done; echo "I'm the master!" +#Allow to run outside of directory +cd $(dirname $0) -# Start parallel nodejs processes for bbb-html5. Number varies on restrictions file bbb-html5-with-roles.conf +PORT=4100 -source /usr/share/meteor/bundle/bbb-html5-with-roles.conf - -if [ -f /etc/bigbluebutton/bbb-html5-with-roles.conf ]; then - source /etc/bigbluebutton/bbb-html5-with-roles.conf +# this might be already set by a systemd unit override in case this node is run +# behind a load balancer proxy node +if [[ -z $ROOT_URL ]] ; then + export ROOT_URL=http://127.0.0.1/html5client fi - -MIN_NUMBER_OF_BACKEND_PROCESSES=1 -MAX_NUMBER_OF_BACKEND_PROCESSES=4 - -MIN_NUMBER_OF_FRONTEND_PROCESSES=0 # 0 means each nodejs process handles both front and backend roles -MAX_NUMBER_OF_FRONTEND_PROCESSES=8 - - -# Start backend nodejs processes -if ((NUMBER_OF_BACKEND_NODEJS_PROCESSES >= MIN_NUMBER_OF_BACKEND_PROCESSES && NUMBER_OF_BACKEND_NODEJS_PROCESSES <= MAX_NUMBER_OF_BACKEND_PROCESSES)); then - for ((i = 1 ; i <= NUMBER_OF_BACKEND_NODEJS_PROCESSES ; i++)); do - systemctl start bbb-html5-backend@$i - done -fi - - -# Start frontend nodejs processes -if ((NUMBER_OF_FRONTEND_NODEJS_PROCESSES >= MIN_NUMBER_OF_FRONTEND_PROCESSES && NUMBER_OF_FRONTEND_NODEJS_PROCESSES <= MAX_NUMBER_OF_FRONTEND_PROCESSES)); then - if ((NUMBER_OF_FRONTEND_NODEJS_PROCESSES == 0)); then - echo 'Need to modify bbb-html5.nginx to ensure backend IPs are used' - fi - for ((i = 1 ; i <= NUMBER_OF_FRONTEND_NODEJS_PROCESSES ; i++)); do - systemctl start bbb-html5-frontend@$i - done -fi - +export MONGO_OPLOG_URL=mongodb://127.0.1.1/local +export MONGO_URL=mongodb://127.0.1.1/meteor +export NODE_ENV=production +export SERVER_WEBSOCKET_COMPRESSION='{"level":5, "maxWindowBits":13, "memLevel":7, "requestMaxWindowBits":13}' +export BIND_IP=127.0.0.1 +PORT=$PORT /usr/lib/bbb-html5/node/bin/node --max-old-space-size=2048 --max_semi_space_size=128 main.js diff --git a/docs/docs/administration/cluster-proxy.md b/docs/docs/administration/cluster-proxy.md index fff7ff397c..c37244c160 100644 --- a/docs/docs/administration/cluster-proxy.md +++ b/docs/docs/administration/cluster-proxy.md @@ -126,10 +126,9 @@ public: Create (or edit if it already exists) these unit file overrides: -* `/usr/lib/systemd/system/bbb-html5-frontend@.service` -* `/usr/lib/systemd/system/bbb-html5-backend@.service` +* `/usr/lib/systemd/system/bbb-html5.service` -Each should have the following content: +It should have the following content: ``` [Service] @@ -137,14 +136,6 @@ Environment=ROOT_URL=https://127.0.0.1/bbb-01/html5client Environment=DDP_DEFAULT_CONNECTION_URL=https://bbb-01.example.com/bbb-01/html5client ``` -Change the nginx `$bbb_loadbalancer_node` variable to the name of the load -balancer node in `/usr/share/bigbluebutton/nginx/loadbalancer.nginx` to allow CORS -requests: - -``` -set $bbb_loadbalancer_node https://bbb-proxy.example.com; -``` - Prepend the mount point of bbb-html5 in all location sections except for the `location @html5client` section in `/usr/share/bigbluebutton/nginx/bbb-html5.nginx`: diff --git a/docs/docs/administration/configuration-files.md b/docs/docs/administration/configuration-files.md index c2d90f69c0..d0a556238d 100644 --- a/docs/docs/administration/configuration-files.md +++ b/docs/docs/administration/configuration-files.md @@ -25,7 +25,6 @@ Starting with BigBlueButton 2.3 many of the configuration files have local overr | /usr/share/bbb-apps-akka/conf/application.conf | /etc/bigbluebutton/bbb-apps-akka.conf | | | /usr/share/bbb-fsesl-akka/conf/application.conf | /etc/bigbluebutton/bbb-fsesl-akka.conf | | | /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml | /etc/bigbluebutton/bbb-html5.yml | Arrays are merged by replacement (as of 2.4-rc-5) | -| /usr/share/meteor/bundle/bbb-html5-with-roles.conf | /etc/bigbluebutton/bbb-html5-with-roles.conf | | | /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml | /etc/bigbluebutton/turn-stun-servers.xml | Replaces the original file | | /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml | /etc/bigbluebutton/bbb-webrtc-sfu/production.yml | Arrays are merged by replacement | | /usr/local/bigbluebutton/bbb-pads/config/settings.json | /etc/bigbluebutton/bbb-pads.json | Arrays are merged by replacement | @@ -81,17 +80,15 @@ public: #### Log monitoring for server logs (bbb-html5) -Since BigBlueButton 2.3 we run multiple nodejs processes in production mode, so tailing logs is slightly different from `journalctl -f bbb-html5.service` which was used in 2.2. Rather than listing all the services ( `bbb-html5-backend@1.service bbb-html5-backend@2.service bbb-html5-frontend@1.service bbb-html5-frontend@2.service bbb-html5-frontend@3.service bbb-html5-frontend@4.service ...` ) you can use the wildcard operator `*`. Notice the different process id for each bbb-html5-\* service. Also notice `systemd_start_frontend.sh` signifying a log from a frontend process vs `systemd_start.sh` - backend process. +In BigBlueButton 3.0 we modified the architecture to shift the load away from the old frontend and backend bbb-html5 pools of services. Logs for the new services can be foud via: -``` -# journalctl -f -u bbb-html5-* --- Logs begin at Mon 2021-03-15 12:13:05 UTC. -- -Mar 15 15:14:18 demo2 systemd_start_frontend.sh[3881]: debug: Redis: SendCursorPositionEvtMsg completed sync -Mar 15 15:14:18 demo2 systemd_start_frontend.sh[3891]: debug: Redis: SendCursorPositionEvtMsg completed sync -Mar 15 15:14:18 demo2 systemd_start_frontend.sh[3888]: debug: Publishing Polls {"meetingId":"37d0fb4f4617b3c97948d717435f9e1cf6998477-1615821214341","userId":"w_el87iar97iwa"} -... -Mar 15 15:30:18 demo2 systemd_start.sh[3869]: debug: Redis: UpdateBreakoutUsersEvtMsg completed sync -``` +`journalctl -f -u bbb-html5.service` + +Akka-apps is responsible for most of the logic, so key info can be obtained via + +`journalctl -f -u bbb-apps-akka.service` + +`SYSTEMD_LESS=FRXMK journalctl -u bbb-graphql-middleware.service -f` can also be useful. #### Logs sent directly from the client diff --git a/docs/docs/administration/install.md b/docs/docs/administration/install.md index e307f066d0..42154a8447 100644 --- a/docs/docs/administration/install.md +++ b/docs/docs/administration/install.md @@ -253,10 +253,6 @@ bbb-apps-akka —————————————————————— bbb-fsesl-akka ———————————————————————► [✔ - active] mongod ———————————————————————————————► [✔ - active] bbb-html5 ————————————————————————————► [✔ - active] -bbb-html5-backend@1 ——————————————————► [✔ - active] -bbb-html5-backend@2 ——————————————————► [✔ - active] -bbb-html5-frontend@1 —————————————————► [✔ - active] -bbb-html5-frontend@2 —————————————————► [✔ - active] bbb-graphql-actions ——————————————————► [✔ - active] bbb-graphql-middleware ———————————————► [✔ - active] bbb-graphql-server ———————————————————► [✔ - active] diff --git a/docs/docs/new-features.md b/docs/docs/new-features.md index 43c502273a..ea2a400e71 100644 --- a/docs/docs/new-features.md +++ b/docs/docs/new-features.md @@ -48,7 +48,9 @@ Administrators will appreciate that we now allow passing of custom client settin #### Major strides in replacing Meteor For years we have discussed internally the topic of replacing MeteorJS with other technologies in order to improve scalability, performance, etc. In the last year we have introduced several different new components which are to replace Meteor. The work is underway, it will span into BigBlueButton 3.0, 3.1, possibly 3.2 too. -These new components are: `bbb-graphql-server`, `bbb-graphql-middleware`, `bbb-graphql-actions`, database Postgres, GraphQL server Hasura. During the transition period, `bbb-html5-backend` and `bbb-html5-frontend` are still present, however, lots of what they used to do is now being carried out by the new components. +These new components are: `bbb-graphql-server`, `bbb-graphql-middleware`, `bbb-graphql-actions`, database Postgres, GraphQL server Hasura. + +Note: The services `bbb-html5-backend` and `bbb-html5-frontend` have been removed and `bbb-html5` modified heavily as a result of the change in architecture. ### Experimental