From a3f62d1f30e278192b9e36ca007758e686a56ab2 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sun, 31 Jan 2021 15:47:01 +0100 Subject: [PATCH] Overide logging + some doc to debug java processes --- app/jitsi/integration/README.md | 15 ++++-- app/jitsi/integration/docker-compose.yml | 1 + app/jitsi/integration/jvb/logging.properties | 51 ++++++++++++++++++++ app/jitsi/integration/jvb/videobridge.conf | 2 +- 4 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 app/jitsi/integration/jvb/logging.properties diff --git a/app/jitsi/integration/README.md b/app/jitsi/integration/README.md index 82fa91d..c6bedd7 100644 --- a/app/jitsi/integration/README.md +++ b/app/jitsi/integration/README.md @@ -11,9 +11,10 @@ Several server components: - etc. Some libs: - - libjitsi - - jicoco - - jitsi-utils + - libjitsi seems deprecated + - jicoco contains some parent classes to handle Jitsi's Configuration + - [jitsi-utils](https://github.com/jitsi/jitsi-utils) contains the Logger definition for example + - [ice4j](https://github.com/jitsi/ice4j) contains jitsi's implementation of WebRTC - etc. Client components: @@ -62,6 +63,14 @@ instead, we should look at this one: https://github.com/jitsi/jitsi-meet/blob/ma Jitsi can be configured to authenticated through tokens, the postinst file is here: https://github.com/jitsi/jitsi-meet/blob/master/debian/jitsi-meet-tokens.postinst +## Remote debug + +Add this parameter to the java process you want to debug (either jicofo or jvb). It must be added by modifying the entrypoint script, next to the respective Dockerfile of each container. + +``` +-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 +``` + ## Resources to understand jitsi - [jicofo/debian/postinst](https://github.com/jitsi/jicofo/blob/master/debian/postinst) diff --git a/app/jitsi/integration/docker-compose.yml b/app/jitsi/integration/docker-compose.yml index 5eb72e7..f6d69b2 100644 --- a/app/jitsi/integration/docker-compose.yml +++ b/app/jitsi/integration/docker-compose.yml @@ -25,6 +25,7 @@ services: - "./prosody/certs/jitsi.crt:/usr/local/share/ca-certificates/jitsi.crt:ro" - "./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 diff --git a/app/jitsi/integration/jvb/logging.properties b/app/jitsi/integration/jvb/logging.properties new file mode 100644 index 0000000..2850f23 --- /dev/null +++ b/app/jitsi/integration/jvb/logging.properties @@ -0,0 +1,51 @@ +handlers= java.util.logging.ConsoleHandler +#handlers= java.util.logging.ConsoleHandler, com.agafua.syslog.SyslogHandler +#handlers= java.util.logging.ConsoleHandler, io.sentry.jul.SentryHandler + +java.util.logging.ConsoleHandler.level = ALL +java.util.logging.ConsoleHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter + +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 + +org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE + +# All of the INFO level logs from MediaStreamImpl are unnecessary in the context of jitsi-videobridge. +org.jitsi.impl.neomedia.MediaStreamImpl.level=WARNING + +# Syslog (uncomment handler to use) +com.agafua.syslog.SyslogHandler.transport = udp +com.agafua.syslog.SyslogHandler.facility = local0 +com.agafua.syslog.SyslogHandler.port = 514 +com.agafua.syslog.SyslogHandler.hostname = localhost +com.agafua.syslog.SyslogHandler.formatter = org.jitsi.utils.logging2.JitsiLogFormatter +com.agafua.syslog.SyslogHandler.escapeNewlines = false + +# Sentry (uncomment handler to use) +io.sentry.jul.SentryHandler.level=WARNING + +# to disable double timestamps in syslog uncomment next line +#net.java.sip.communicator.util.ScLogFormatter.disableTimestamp=true + +# time series logging +java.util.logging.SimpleFormatter.format= %5$s%n +java.util.logging.FileHandler.level = ALL +java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter +java.util.logging.FileHandler.pattern = /tmp/jvb-series.log +java.util.logging.FileHandler.limit = 200000000 +java.util.logging.FileHandler.count = 1 +java.util.logging.FileHandler.append = false + +timeseries.level=OFF +timeseries.org.jitsi.videobridge.cc.allocation.BitrateAllocator.level=ALL +timeseries.useParentHandlers = false +# time series logging is disabled by default. Uncomment the line below to enable it. +#timeseries.handlers = java.util.logging.FileHandler diff --git a/app/jitsi/integration/jvb/videobridge.conf b/app/jitsi/integration/jvb/videobridge.conf index edf73bb..b40dec6 100644 --- a/app/jitsi/integration/jvb/videobridge.conf +++ b/app/jitsi/integration/jvb/videobridge.conf @@ -233,7 +233,7 @@ videobridge { enabled = true # The port to bind to for ICE/TCP. - port = 8080 + port = 8089 # An optional additional port to advertise. # mapped-port = 8443