Videobridge2 REST API / private interface

Hi,

I set up a Jitsi Meet instance under Debian 9, trough packages.
Videobridge2 is now used in these packages, but i can’t find a documentation for REST API / private interface i want to use to monitor the system.

This link seems to be related to Videobridge1 : https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest.md
Seems jetty is not used anymore.

Is this private interface for API still available ?

Hi @poutounours,

the interface is the same. It uses also the same config parameters. Just mind that you have to attach --apis=rest as a parameter to the jitsi videobridge systemd service. (If not done already, this is also mentioned in your link.)

1 Like

Thank you.

I enabled the interface, but colibri endpoint is not working.
It is ok for /health/about (but it show nothing) and /health/version, but /colibri/stats throws a 404 error.

I got these config lines :

org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc,colibri

Are these enough to enable statistics trough /colibri ?

I have these lines in my config:

org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc,colibri,rest
org.jitsi.videobridge.STATISTICS_INTERVAL=5000

AND the parameter --apis=rest at the systemd service.

Adding rest on TRANSPORT had it !

Thank you, now i can work on my stats scripts :slight_smile:

Cool! You’re welcome. :slight_smile:

Hi, i am trying to connect the private and public interfaces to use colibri.
I set --api=rest or --api=rest,xmpp
I did follow the configuration examples from the /doc/rest.md but I can’t connect to the api.
Its necesary something more ?

thanks in advance

-gabriel

I am not sure why it does not work for you. Are you sure that videobridge is really started with the --api=rest, flag ? what says ps fauxww | grep jvb ?

The jitsi-viideobridgge2, jicofo and prosody are running.

Only jicofo show me and “Error binding encrypted port for https: No key present in SSL/TLS configuration for https port 5281”.

I set sip-communicator.propertis with:
org.jitsi.videobridge.rest.jetty.port=443,
org.jitsi.videobridge.rest.tls.port=443
org.jjitsi.videobriidge.rest.jetty.tls.port=8443

I try curl -v https://localhost:8443/ ut connection refused.

the 5281 error message is useless and should be ignored.
the correct configuration incantation is
JVB_OPTS="–apis=rest,"
I have not tried to change the port, I use the default port 8080.
To see if your port config is taken in account, use ps to find the videobridge PID then sudo ss -tapnu | grep pid-of-videobridge; if you see 8080 use it else check if one of your 443 or 8443 is taken (443 is unlikely to work because it would conflict with nginx)

no matter what port I use.
I don’t see the port listening
I try disabled private interface (using -1) and setting port to
org.jitsi.videobridge.rest.jetty.port=81 or 82,83…no matter
I still trying…

well, what says ps fauxww | grep jvb ?

root 20686 0.0 0.1 14856 1024 pts/0 S+ 14:21 0:00 | _ grep --color=auto jvb
jvb 15788 1.5 21.0 5373916 212292 ? Ssl 13:08 1:06

java -Xmx3072m -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi
-Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties
-cp /usr/share/jitsi-videobridge/jitsi-videobridge.jar:/usr/share/jitsi-videobridge/lib/* org.jitsi.videobridge.Main
–host=jitsi.mydomain
–domain=jitsi.mydomain
–port=5347
–secret=password
–apis=rest

what is this server doing then, what says

sudo grep “org.eclipse.jetty.server” /var/log/jitsi/jvb.log

nothing…emtpy

I found a SEVERAL message into the jvb.log.

root@jitsi:/etc/jitsi/videobridge# sudo grep “SEVERE” /var/log/jitsi/jvb.log
2020-04-28 18:03:12.906 SEVERE: [19] RecurringRunnableExecutor.run#230: The invocation of the method org.jitsi.videobridge.health.Health.run() threw an exception.
2020-04-28 18:03:22.902 SEVERE: [19] RecurringRunnableExecutor.run#230: The invocation of the method org.jitsi.videobridge.health.Health.run() threw an exception.
2020-04-28 18:03:31.668 SEVERE: [12] StatsServiceFactory.lambda$createStatsService$0#124: callstats.io Java library failed to initialize with error: Missing parameres and error message: appSecret missing
2020-04-28 18:03:32.133 SEVERE: [12] AbstractJettyBundleActivator.doStart#222: Failed to initialize and/or start a new Jetty HTTP(S) server instance.
2020-04-28 18:03:32.138 SEVERE: [12] org.jitsi.impl.osgi.framework.BundleImpl.start: Error starting bundle: org.jitsi.videobridge.websocket.WebSocketBundleActivator@27b409a7
2020-04-28 18:03:32.141 SEVERE: [12] org.jitsi.impl.osgi.framework.launch.FrameworkImpl.startLevelChanged: Error changing start level
2020-04-28 18:03:46.513 SEVERE: [19] AbstractHealthCheckService.run#174: Health check failed in PT3.53038S:
2020-04-28 18:47:21.285 SEVERE: [12] AbstractJettyBundleActivator.doStart#222: Failed to initialize and/or start a new Jetty HTTP(S) server instance.
2020-04-28 18:47:21.287 SEVERE: [12] org.jitsi.impl.osgi.framework.BundleImpl.start: Error starting bundle: org.jitsi.videobridge.websocket.WebSocketBundleActivator@19089d91
2020-04-28 18:47:21.290 SEVERE: [12] org.jitsi.impl.osgi.framework.launch.FrameworkImpl.startLevelChanged: Error changing start level
2020-04-28 18:47:35.284 SEVERE: [19] AbstractHealthCheckService.run#174: Health check failed in PT3.483096S:

That’s the problem. could you take a look at / post the 3/4 lines before this message ?
Duh. Edit. Missquoted the first time.

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2020-04-28 18:03:31.135 INFO: [1] NewConfig$1.invoke#88: Loaded NewConfig with origin: merge of system properties,system properties,reference.conf @ jar:file:/usr/share/jitsi-videobridge/jitsi-v$
2020-04-28 18:03:31.201 INFO: [1] LegacyConfigFileLoader$Companion.load#40: Attempting to load legacy config file at path /etc/jitsi, videobridge, sip-communicator.properties
2020-04-28 18:03:31.215 INFO: [1] LegacyConfigFileLoader$Companion.load#40: Attempting to load legacy config file at path /etc/jitsi, videobridge, sip-communicator.properties
2020-04-28 18:03:31.218 INFO: [1] JitsiConfig$Companion.reload#40: Reloading.
2020-04-28 18:03:31.266 INFO: [1] NewConfig$1.invoke#88: Loaded NewConfig with origin: merge of system properties,system properties,reference.conf @ jar:file:/usr/share/jitsi-videobridge/jitsi-v$
2020-04-28 18:03:31.267 INFO: [1] LegacyConfigFileLoader$Companion.load#40: Attempting to load legacy config file at path /etc/jitsi, videobridge, sip-communicator.properties
2020-04-28 18:03:31.268 INFO: [1] LegacyConfigFileLoader$Companion.load#40: Attempting to load legacy config file at path /etc/jitsi, videobridge, sip-communicator.properties
2020-04-28 18:03:31.434 INFO: [12] ConfigurationActivator.start#45: Registered the LegacyConfigurationServiceShim in OSGi.
2020-04-28 18:03:31.440 INFO: [12] AbstractVersionActivator.start#91: VersionService registered: JVB 2.1.183-gdbddd169
2020-04-28 18:03:31.537 INFO: [12] AbstractJettyBundleActivator.start#613: Not starting the Jetty service for org.jitsi.videobridge.rest.RESTBundleActivator(port=-1)
2020-04-28 18:03:31.668 WARNING: [12] StatsServiceFactory.createStatsService#160: KeyID/keyPath missing, will try using appSecret
2020-04-28 18:03:31.668 SEVERE: [12] StatsServiceFactory.lambda$createStatsService$0#124: callstats.io Java library failed to initialize with error: Missing parameres and error message: appSecre$
2020-04-28 18:03:31.669 WARNING: [12] StatsServiceFactory.createStatsService#167: appSecret missing. Skipping callstats init
2020-04-28 18:03:31.926 INFO: [12] org.eclipse.jetty.util.log.Log.initialized: Logging initialized @4435ms to org.eclipse.jetty.util.log.JavaUtilLog
2020-04-28 18:03:32.133 SEVERE: [12] AbstractJettyBundleActivator.doStart#222: Failed to initialize and/or start a new Jetty HTTP(S) server instance.
NoAcceptablePropertyInstanceFoundException: Unable to find or parse configuration property due to: [com.typesafe.config.ConfigException$Missing: /etc/jitsi/videobridge/sip-communicator.propertie$
at org.jitsi.utils.config.FallbackProperty.getValue(FallbackProperty.kt:41)

is the message complete ? in my logs, I see longer messages and the message seem truncated at the sip-communicator.propertie$ point. I don’t know if it’s Java or this forum’s software.
It looks also like the beginning of a traceback and maybe the 2 or 3 lines following could be of interest.

Anyway, the error message don’t say what is bad in the sip-communicator.properties file but it’s at least pointing to something it does not like in it.

Yes, first SEVERE error its about java library failed to initializate: Missing parameters and error message: “appSecret missing”

Second SEVERE its about failed initializating a new Jetty HTTP(s) server instance. NoAcceptablePropertyInstanceFoundExcepcion: Unable to find or parse configuration property due to: … No configuration setting found for key ‘org.jitsi.videobridge.rest.COLIBRI_WS_DOMAIN’