Videobridge doc + debug

This commit is contained in:
Quentin 2021-01-31 18:03:55 +01:00
parent a3f62d1f30
commit 56cf9c1e55
5 changed files with 32 additions and 15 deletions

View file

@ -1,6 +1,16 @@
#!/bin/bash
update-ca-certificates -f
if [ -z "${JITSI_NAT_LOCAL_IP}" ]; then
JITSI_NAT_LOCAL_IP=$(ip route get $(ip route show 0.0.0.0/0 | grep -oP 'via \K\S+') | grep -oP 'src \K\S+')
fi
if [ -z "${JITSI_NAT_PUBLIC_IP}" ]; then
JITSI_NAT_PUBLIC_IP=$(curl https://ifconfig.me)
fi
echo "NAT config: ${JITSI_NAT_LOCAL_IP} -> ${JITSI_NAT_PUBLIC_IP}"
exec java \
-Xmx3072m \
-XX:+UseConcMarkSweepGC \

View file

@ -71,6 +71,20 @@ Add this parameter to the java process you want to debug (either jicofo or jvb).
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
```
## Be careful
jiti-videobridge (jvb) does not start to listen on ICE ports (both TCP and UDP) at boot.
Instead, listening is triggered on the creation of the first conference (a 2 people P2P conference is enough).
A nice entrypoint to check with your debugger is:
- [Videobridge.java#XmppConnectionEventHandle.colibriConferenceIqReceived](https://github.com/jitsi/jitsi-videobridge/blob/256dc7acb7ee10440502a6073a498329eaf1e819/jvb/src/main/java/org/jitsi/videobridge/Videobridge.java#L627)
- [VideobridgeShim.java#VideobridgeShim.handleColibriConferenceIQ](https://github.com/jitsi/jitsi-videobridge/blob/256dc7acb7ee10440502a6073a498329eaf1e819/jvb/src/main/java/org/jitsi/videobridge/shim/VideobridgeShim.java#L251)
- [ConferenceShim.java#ConferenceShim.initializeSignaledEndpoints](https://github.com/jitsi/jitsi-videobridge/blob/256dc7acb7ee10440502a6073a498329eaf1e819/jvb/src/main/java/org/jitsi/videobridge/shim/ConferenceShim.java#L274)
- [same.ensureEndpointCreated](https://github.com/jitsi/jitsi-videobridge/blob/256dc7acb7ee10440502a6073a498329eaf1e819/jvb/src/main/java/org/jitsi/videobridge/shim/ConferenceShim.java#L312)
- [Conference.java#Conference.createLocalEndpoint](https://github.com/jitsi/jitsi-videobridge/blob/256dc7acb7ee10440502a6073a498329eaf1e819/jvb/src/main/java/org/jitsi/videobridge/Conference.java#L602)
- [Endpoint.java#Endpoint.new](https://github.com/jitsi/jitsi-videobridge/blob/256dc7acb7ee10440502a6073a498329eaf1e819/jvb/src/main/java/org/jitsi/videobridge/Endpoint.java#L254)
- [IceTransport.kt#IceTransport.iceAgent(init)](https://github.com/jitsi/jitsi-videobridge/blob/0c2ac250ec6b518eaf75fbc83f7936ec01e7b5f6/jvb/src/main/kotlin/org/jitsi/videobridge/transport/ice/IceTransport.kt#L99)
- [IceTransport.kt#companionObject.appendHarvesters](https://github.com/jitsi/jitsi-videobridge/blob/0c2ac250ec6b518eaf75fbc83f7936ec01e7b5f6/jvb/src/main/kotlin/org/jitsi/videobridge/transport/ice/IceTransport.kt#L350)
## Resources to understand jitsi
- [jicofo/debian/postinst](https://github.com/jitsi/jicofo/blob/master/debian/postinst)

View file

@ -26,11 +26,8 @@ services:
- "./prosody/certs/auth.jitsi.crt:/usr/local/share/ca-certificates/auth.jitsi.crt:ro"
- "./jvb/videobridge.conf:/etc/jitsi/videobridge.conf:ro"
- "./jvb/logging.properties:/usr/share/jvb/lib/logging.properties:ro"
environment:
- JITSI_NAT_LOCAL_IP=10.64.82.33
- JITSI_NAT_PUBLIC_IP=212.47.253.12
ports:
- "8080:8080/tcp"
- "8089:8089/tcp"
- "10000:10000/udp"
jitsi-meet:

View file

@ -7,14 +7,10 @@ java.util.logging.ConsoleHandler.formatter = org.jitsi.utils.logging2.JitsiLogFo
net.java.sip.communicator.util.ScLogFormatter.programname=JVB
#.level=INFO # default
.level=FINE
# Added by quentin
#org.jitsi.videobridge.ice.level=FINE
#org.ice4j.level=FINE
org.ice4j.stack.Connector=FINEST
org.jitsi.videobridge.transport.ice=FINEST
# default
.level=INFO
# for debug
#.level=FINE
org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE

View file

@ -79,10 +79,10 @@ videobridge {
}
# The COLIBRI REST API
rest {
enabled = false
enabled = true
}
jvb-api {
enabled = false
enabled = true
}
}
# Configuration of the different REST APIs.
@ -187,7 +187,7 @@ videobridge {
stats {
# Whether periodic collection of statistics is enabled or not. When enabled they are accessible through the REST
# API (at `/colibri/stats`), and are available to other modules (e.g. to be pushed to callstats or in a MUC).
enabled = false
enabled = true
# The interval at which stats are gathered.
interval = 5 seconds