Jitsi服务器搭建过程问题记录

Jitsi是一个基于WebRTC的开源会议服务系统,主要提供高质量、安全、可扩展性强的视频会议业务能力!

呱牛笔记

使用docker安装手册中的架构图

使用官方的安装指南(https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-quickstart),安装成功是没有问题的,并且能顺利创建和进入一个人的会议界面,但未必能调通多人的会议功能,从github的Issure中,包括很多类似的问题,当超过一个用户进入同一个会议室后,会出现“CONFERENCE FAILED: conference.videobridgeNotAvailable”和"Failed to select initial bridge for participantRegion=null"的问题,浏览器的界面被不断的重新刷新,而且类似的问题还很多,从回答的答案来看,主要还是videobridge的配置有问题,导致jicofo并不能发现videobridge,当然我也碰到了这个问题,并通过调整配置,解决了这个问题,主要过程则是参照开发指南(https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-manual),将各个服务的配置都重新过了一遍,发现缺少了像xmpp服务器添加jvb用户这个动作,但无法确认是不是这个原因,只是经过这个操作,以及统一修改配置文件后,这个问题得到了修复!


添加xmpp的用户:

Create conference focus user:

  720  prosodyctl register focus auth.meet.test.com 7aKQ5Jdi

Create conference jvb user:

  765  prosodyctl register jvb auth.meet.test.com i2AhIKMh


补记:后面有重启docker镜像,发现又出现了上面的错误,主要判断思路还是video-bridge没有注册到jicofo上,从这个点判断,原来是hostname发生了修改,导致video-brdige并没有注册到 prosody 上,重新修改了hostname后,问题就没有再出现了!

root@2e5ee1f22bc9:~# hostnamectl set-hostname meet.test.com

root@2e5ee1f22bc9:~# cat /etc/hosts

127.0.0.1localhost meet.test.com


前端错误的日志:


Logger.js:154 2020-06-05T10:05:38.484Z [conference.js] <ee._onConferenceFailed>:  CONFERENCE FAILED: conference.videobridgeNotAvailable

jicofo的错误日志:

  
Jicofo 2020-06-05 07:30:48.710 INFO: [288] org.jitsi.jicofo.ChatRoomRoleAndPresence.log() Granted owner to 1234545555@conference.meet.test.com/8eec2e33
Jicofo 2020-06-05 07:30:48.710 INFO: [288] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Member 1234545555@conference.meet.test.com/8eec2e33 joined.
Jicofo 2020-06-05 07:31:00.449 INFO: [163] org.jitsi.jicofo.xmpp.FocusComponent.log() Focus request for room: 1234545555@conference.meet.test.com
Jicofo 2020-06-05 07:31:00.645 INFO: [288] org.jitsi.jicofo.ChatRoomRoleAndPresence.log() Chat room event ChatRoomMemberPresenceChangeEvent[type=MemberJoined sourceRoom=org.jitsi.impl.protocol.xmpp.ChatRoomImpl@4e08eda member=ChatMember[1234545555@conference.meet.test.com/3e66d08f, jid: null]@397481160]
Jicofo 2020-06-05 07:31:00.646 INFO: [288] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Member 1234545555@conference.meet.test.com/3e66d08f joined.
Jicofo 2020-06-05 07:31:00.646 WARNING: [288] org.jitsi.jicofo.bridge.BridgeSelectionStrategy.log() Failed to select initial bridge for participantRegion=null
Jicofo 2020-06-05 07:31:00.646 SEVERE: [288] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Can not invite participant -- no bridge available.
Jicofo 2020-06-05 07:31:00.646 WARNING: [288] org.jitsi.jicofo.bridge.BridgeSelectionStrategy.log() Failed to select initial bridge for participantRegion=null
Jicofo 2020-06-05 07:31:00.646 SEVERE: [288] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Can not invite participant -- no bridge available.
Jicofo 2020-06-05 07:31:01.103 INFO: [288] org.jitsi.jicofo.ChatRoomRoleAndPresence.log() Chat room event ChatRoomMemberPresenceChangeEvent[type=MemberLeft sourceRoom=org.jitsi.impl.protocol.xmpp.ChatRoomImpl@4e08eda member=ChatMember[1234545555@conference.meet.test.com/8eec2e33, jid: 8eec2e33-2efe-4c2b-8166-e1b999a46ddb@meet.test.com/6c310fe2-4beb-43de-a98b-cfae6b887bde]@1154352649]


系统安装的最新版本的包:


root@2e5ee1f22bc9:/etc/prosody# dpkg -l | grep jitsi
ii  jitsi-meet                     2.0.4627-1                          all          WebRTC JavaScript video conferences
ii  jitsi-meet-prosody             1.0.4127-1                          all          Prosody configuration for Jitsi Meet
rc  jitsi-meet-tokens              1.0.4127-1                          all          Prosody token authentication plugin for Jitsi Meet
ii  jitsi-meet-turnserver          1.0.4127-1                          all          Configures coturn to be used with Jitsi Meet
ii  jitsi-meet-web                 1.0.4127-1                          all          WebRTC JavaScript video conferences
ii  jitsi-meet-web-config          1.0.4127-1                          all          Configuration for web serving of Jitsi Meet
ii  jitsi-videobridge2             2.1-202-g5f9377b9-1                 all          WebRTC compatible Selective Forwarding Unit (SFU)
root@2e5ee1f22bc9:/etc/prosody#



先说说Jitsi主要包括哪几个服务,从安装过程来看,主要有:

1、nginx承载的web服务;

2、xmpp服务;

3、jicofo会议服务;

4、video-bridge服务;


架构图:来源(https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-manual)

呱牛笔记

实际现在的jitsi-videobridge2服务是通过5222连接prosody服务!


A Jitsi Meet installation can be broken down into the following components:

·         A web interface(nginx)

·         An XMPP server(prosody)

·         A conference focus component(jicofo)

·         A video router (could be more than one) (videobridge)

·         A SIP gateway for audio calls

·         A Broadcasting Infrastructure for recording or streaming a conference.


 

Web通过nginx代理运行,配置文件:

root@2e5ee1f22bc9:/etc/jitsi# vi /etc/nginx/sites-available/meet.test.com.conf

 

    location = /config.js {

        alias /etc/jitsi/meet/meet.test.com-config.js;

    }

 

root@2e5ee1f22bc9:/etc/nginx# tail -f /var/log/jitsi/jicofo.log

 

root@2e5ee1f22bc9:~# tail -f /var/log/jitsi/jvb.log

 

配置文件

root@2e5ee1f22bc9:/etc/jitsi# ll

total 4

drwxr-xr-x 5 root   root    51 Jun  5 08:58 ./

drwxr-xr-x 1 root   root  4096 Jun  5 08:16 ../

drwx------ 2 jicofo jitsi   81 Jun  5 09:52 jicofo/

drwxr-xr-x 2 root   root    37 Jun  5 08:44 meet/

drwxr-x--- 2 jvb    jitsi  172 Jun  5 09:05 videobridge/

 

 

三个服务

root@2e5ee1f22bc9:/etc/jitsi# service jitsi-videobridge2 status

root@2e5ee1f22bc9:/etc/jitsi# service jicofo status 

root@2e5ee1f22bc9:/etc/jitsi# service prosody status

vi /etc/prosody/conf.avail/meet.test.com.cfg.lua



root@meet:/etc/jitsi# ps -ef|grep java
 
jvb      19769    java jitsi-videobridge
jicofo    8155     1  0 Jun05 ?        00:01:18 java
 
 
root@meet:/etc/jitsi# netstat -pan|grep java
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN      8155/java          
tcp        0      0 127.0.0.1:56306         127.0.0.1:5222          ESTABLISHED 8155/java          
tcp        0      0 127.0.0.1:56316         127.0.0.1:5222          ESTABLISHED 19769/java         
tcp        0      0 127.0.0.1:33060         127.0.0.1:5347          ESTABLISHED 8155/java          
udp        0      0 0.0.0.0:3905            0.0.0.0:*                           8155/java          
udp        0      0 0.0.0.0:5000            0.0.0.0:*                           19769/java         
udp        0      0 0.0.0.0:33854           0.0.0.0:*                           19769/java         
udp        0      0 0.0.0.0:50440           0.0.0.0:*                           19769/java         
udp        0      0 192.168.1.201:10000     0.0.0.0:*                           19769/java         
udp        0      0 11.12.117.210:10000     0.0.0.0:*                           19769/java         
udp6       0      0 :::5000                 :::*                                19769/java         
unix  2      [ ]         STREAM     CONNECTED     7926045  19769/java          
unix  2      [ ]         STREAM     CONNECTED     7784143  8155/java           
unix  2      [ ]         STREAM     CONNECTED     7927656  19769/java   
 
 
root@meet:/etc/jitsi# netstat -pan|grep lua
tcp        0      0 0.0.0.0:5280            0.0.0.0:*               LISTEN      19744/lua5.1       
tcp        0      0 127.0.0.1:5347          0.0.0.0:*               LISTEN      19744/lua5.1       
tcp        0      0 0.0.0.0:5222            0.0.0.0:*               LISTEN      19744/lua5.1       
tcp        0      0 0.0.0.0:5269            0.0.0.0:*               LISTEN      19744/lua5.1       
tcp        0      0 127.0.0.1:5222          127.0.0.1:56316         ESTABLISHED 19744/lua5.1        
tcp        0      0 127.0.0.1:5280          127.0.0.1:53654         ESTABLISHED 19744/lua5.1       
tcp        0      0 127.0.0.1:5347          127.0.0.1:33060         ESTABLISHED 19744/lua5.1       
tcp        0      0 127.0.0.1:5280          127.0.0.1:53656         ESTABLISHED 19744/lua5.1       
tcp        0      0 127.0.0.1:5222          127.0.0.1:56306         ESTABLISHED 19744/lua5.1       
tcp6       0      0 :::5280                 :::*                    LISTEN      19744/lua5.1       
tcp6       0      0 :::5222                 :::*                    LISTEN      19744/lua5.1       
tcp6       0      0 :::5269                 :::*                    LISTEN      19744/lua5.1       
unix  2      [ ]         DGRAM                    7926001  19744/lua5.1


 

主要的问题是videobridge没有被jicofo发现,而如何才能被jicofo发现,如果不看代码逻辑的话,还真是不清楚!

不过参考开发指南中的配置,添加jvb用户到prosody服务,重新启动videobridge和prosody服务后,发现jicobo服务已经能正常发现videobridget服务了!


Create conference focus user:

  720  prosodyctl register focus auth.meet.test.com 7aKQ5Jdi

Create conference jvb user:

  765  prosodyctl register jvb auth.meet.test.com i2AhIKMh

 

 


root@meet:/etc/jitsi# tail -f /var/log/jitsi/jicofo.log 
         at java.util.TimerThread.mainLoop(Timer.java:555)
         at java.util.TimerThread.run(Timer.java:505)
Jicofo 2020-06-06 07:39:04.716 SEVERE: [427] org.jitsi.xmpp.component.ComponentBase.log() Ping timeout for ID: CqeOq-16955
Jicofo 2020-06-06 07:39:20.639 INFO: [242] org.jitsi.jicofo.xmpp.BaseBrewery.log() Removed brewery instance: jvbbrewery@internal.auth.meet.test.com/0a4788b1-a1e1-4413-a7c2-c3d0cb6cfe91a
Jicofo 2020-06-06 07:39:20.639 INFO: [242] org.jitsi.jicofo.xmpp.BaseBrewery.log() A bridge left the MUC: jvbbrewery@internal.auth.meet.test.com/0a4788b1-a1e1-4413-a7c2-c3d0cb6cfe91a
Jicofo 2020-06-06 07:39:20.639 INFO: [242] org.jitsi.jicofo.bridge.BridgeSelector.log() Removing JVB: jvbbrewery@internal.auth.meet.test.com/0a4788b1-a1e1-4413-a7c2-c3d0cb6cfe91a
Jicofo 2020-06-06 07:39:20.640 INFO: [85] org.jitsi.jicofo.bridge.JvbDoctor.log() Stopping health-check task for: jvbbrewery@internal.auth.meet.test.com/0a4788b1-a1e1-4413-a7c2-c3d0cb6cfe91a
Jicofo 2020-06-06 07:39:26.073 INFO: [242] org.jitsi.jicofo.xmpp.BaseBrewery.log() Added brewery instance: jvbbrewery@internal.auth.meet.test.com/0a4788b1-a1e1-4413-a7c2-c3d0cb6cfe91a
Jicofo 2020-06-06 07:39:26.073 INFO: [242] org.jitsi.jicofo.bridge.BridgeSelector.log() Added new videobridge: Bridge[jid=jvbbrewery@internal.auth.meet.test.com/0a4788b1-a1e1-4413-a7c2-c3d0cb6cfe91a, relayId=null, region=null, stress=0.00]


然后重新打开多个浏览器,进入同一个会议室,各个通话功能正常,并且也不会出现浏览器不断重新refresh异常退出了!

-------------------广告线---------------
项目、合作,欢迎勾搭,邮箱:promall@qq.com


本文为呱牛笔记原创文章,转载无需和我联系,但请注明来自呱牛笔记 ,it3q.com

请先登录后发表评论
  • 最新评论
  • 总共0条评论