Ubuntu 18.04: Systemd unable to start videobridge2

Hello,

It appears with the latest upgrade that I’m unable to start the videobridge:

Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: Converting job jitsi-videobridge2.service/restart -> jitsi-videobridge2.service/start
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: Failed to set blkio.weight: No such file or directory
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: Passing 0 fds to service
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: About to execute: /bin/bash -c 'exec /usr/share/jitsi-videobridge/jvb.sh ${JVB_OPTS} < /dev/null >> ${LOGFILE} 2>&1'
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: Forked /bin/bash as 13264
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: About to execute: /bin/bash -c 'echo $MAINPID > /var/run/jitsi-videobridge/jitsi-videobridge.pid'
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: Forked /bin/bash as 13265
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: Changed dead -> start-post
Sep 07 14:40:26 jitsi systemd[1]: Starting Jitsi Videobridge...
-- Subject: Unit jitsi-videobridge2.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit jitsi-videobridge2.service has begun starting up.
Sep 07 14:40:26 jitsi systemd[1]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/systemd1/unit/jitsi_2dvideobridge2_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=37605 reply_cookie=0 signature=sa{sv}as 
Sep 07 14:40:26 jitsi systemd[1]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/systemd1/unit/jitsi_2dvideobridge2_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=37606 reply_cookie=0 signature=sa{sv}as 
Sep 07 14:40:26 jitsi systemd[1]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/systemd1/job/140472 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=37607 reply_cookie=0 signature=sa{sv}as error-name=n/a error-mess
Sep 07 14:40:26 jitsi systemd[1]: jitsi-videobridge2.service: User lookup succeeded: uid=999 gid=1000
Sep 07 14:40:26 jitsi systemd[1]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/systemd1/unit/jitsi_2dvideobridge2_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=37608 reply_cookie=0 signature=sa{sv}as 
Sep 07 14:40:26 jitsi systemd[1]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/systemd1/unit/jitsi_2dvideobridge2_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=37609 reply_cookie=0 signature=sa{sv}as 
Sep 07 14:40:26 jitsi systemd[13265]: jitsi-videobridge2.service: Failed to apply ambient capabilities (before UID change): Invalid argument
Sep 07 14:40:26 jitsi systemd[13265]: jitsi-videobridge2.service: Failed at step CAPABILITIES spawning /bin/bash: Invalid argument
-- Subject: Process /bin/bash could not be executed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The process /bin/bash could not be executed and failed.
-- 
-- The error number returned by this process is 22.

If I start manually using:

export JVB_OPTS="--apis=,"
export LOGFILE=/var/log/jitsi/foo.log
/bin/bash -c 'exec /usr/share/jitsi-videobridge/jvb.sh ${JVB_OPTS} < /dev/null >> ${LOGFILE} 2>&1'

it works without issue

This is on Ubuntu 18.04:
jitsi-videobridge2 2.1-304-g8488f77d-1

Any ideas on what I can check next to get this working? Thanks in advance.

what is the output?

egrep -v '(HOSTNAME|SECRET)' /etc/jitsi/videobridge/config

Here’s the output:

root@jitsi:/etc/jitsi/jicofo# egrep -v '(HOSTNAME|SECRET)' /etc/jitsi/videobridge/config
# Jitsi Videobridge settings

# sets the XMPP domain (default: none)

# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)
JVB_HOST=

# sets the port of the XMPP server (default: 5275)
JVB_PORT=5347

# sets the shared secret used to authenticate to the XMPP server

# extra options to pass to the JVB daemon
JVB_OPTS="--apis=,"

# adds java system props that are passed to jvb (default are for home and logging config file)
JAVA_SYS_PROPS="-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"

This file seems OK. There may be an unsupported line in /lib/systemd/system/jitsi-videobridge2.service

AmbientCapabilities=CAP_NET_BIND_SERVICE ?

Commenting that line out did the trick. It looks like it’s operational now. :slight_smile: