jitsi/jitsi-videobridge

Issue with jvb config (reference.conf) - failed to resolve variables

Closed this issue · 7 comments

This Issue tracker is only for reporting bugs and tracking code related issues.

Before posting, please make sure you check community.jitsi.org to see if the same or similar bugs have already been discussed. General questions, installation help, and feature requests can also be posted to community.jitsi.org.

Description

I upgrade my jvb
https://github.com/jitsi/jitsi-videobridge/compare/8a42be70..4d6a2157

I use the option

-Dconfig.file=/etc/jitsi-videobridge-nightly/jvb.conf

And jvb.conf contains reference.conf (the content in the jar).

Now jvb failed to start because it cannot resolved the variables inside the config.


Current behavior


Oct 16 19:12:44 ks10 jvb.sh[453834]: OpenJDK 64-Bit Server VM warning: Ignoring option UseConcMarkSweepGC; support was removed in 14.0
Oct 16 19:12:45 ks10 jvb.sh[453834]: 2020-10-16 19:12:45.075 INFO: [1] JitsiConfig.<clinit>#47: Initialized newConfig: merge of /etc/jitsi-videobridge-nightly/jvb.conf: 1,system properties,reference.conf @ jar:file:/usr/lib/jitsi-videobridge-nightly/jitsi-videobridge.jar!/reference.conf: 1,reference.conf @ jar:file:/usr/lib/jitsi-videobridge-nightly/lib/ice4j-3.0-22-g67ffceb.jar!/reference.conf: 1,reference.conf @ jar:file:/usr/lib/jitsi-videobridge-nightly/lib/jitsi-media-transform-1.0-198-g1babb83.jar!/reference.conf: 1
Oct 16 19:12:45 ks10 jvb.sh[453834]: 2020-10-16 19:12:45.100 INFO: [1] ReadOnlyConfigurationService.reloadConfiguration#51: loading config file at path /etc/jitsi-videobridge-nightly/sip-communicator.properties
Oct 16 19:12:45 ks10 jvb.sh[453834]: 2020-10-16 19:12:45.103 INFO: [1] JitsiConfig.<clinit>#68: Initialized legacyConfig: sip communicator props (no description provided)
Oct 16 19:12:45 ks10 jvb.sh[453834]: 2020-10-16 19:12:45.105 INFO: [1] JitsiConfig$Companion.reloadNewConfig#93: Reloading the Typesafe config source (previously reloaded 0 times).
Oct 16 19:12:45 ks10 jvb.sh[453834]: Exception in thread "main" org.jitsi.metaconfig.ConfigException$UnableToRetrieve$NotFound: videobridge.apis.xmpp-client.presence-interval has not been resolved, you need to call Config#resolve(), see API docs for Config#resolve()
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.config.TypesafeConfigSource$wrap$1.invoke(TypesafeConfigSource.kt:100)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.config.TypesafeConfigSource$wrap$1.invoke(TypesafeConfigSource.kt:33)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.supplier.ConfigSourceSupplier.doGet(ConfigSourceSupplier.kt:48)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.supplier.ConfigValueSupplier$value$2.invoke(ConfigValueSupplier.kt:28)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.util.Cache$cachedValue$2.invoke(Cache.kt:43)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.util.Cache$cachedValue$2.invoke(Cache.kt:26)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.util.Cache.getCachedValue(Cache.kt)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.util.Cache.getValue(Cache.kt:33)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.supplier.ConfigValueSupplier.getValue(ConfigValueSupplier.kt)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.supplier.ConfigValueSupplier.get(ConfigValueSupplier.kt:30)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.metaconfig.ConfigDelegate.getValue(Delegates.kt:30)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.videobridge.xmpp.config.XmppClientConnectionConfig.getPresenceIntervalProperty(XmppClientConnectionConfig.kt)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.videobridge.xmpp.config.XmppClientConnectionConfig.<init>(XmppClientConnectionConfig.kt:59)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.videobridge.xmpp.XmppConnection.<init>(XmppConnection.kt:49)
Oct 16 19:12:45 ks10 jvb.sh[453834]:         at org.jitsi.videobridge.MainKt.main(Main.kt:74)

In my config I have:

  apis {
    xmpp-client {
      # The interval at which presence is published in the configured MUCs.
      presence-interval = ${videobridge.stats.interval}

And this one is defined like:

  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

    # The interval at which stats are gathered.
    interval = 5 seconds

Expected Behavior


The variables should be able to be solved like the previous version without any issues.

Possible Solution


Use the hint to run the Config resolved again.

Steps to reproduce


Install the last JVB
copy the reference.conf to jvb.conf
use the config.file parameters

Environment details


Arch Linux

Thanks for the report...looks like we may not be making a call to resolve to resolve any substitutions there (I thought we used some substitutions already, but maybe not). I'll look into it.

Have you made any changes to reference.conf or application.conf in the bridge code? Would you be able to share your entire jvb.conf with me? (Can sensor it or emil it if it has sensitive information--I don't think I need the real domains, etc.). I'm unable to repro this issue when I've tried locally on that same jvb hash.

Hi, yes of course,

did you used this tag? 4d6a215

I suspect this changes to be the issue here:

        <jicoco.version>1.1-58-g13ed16a</jicoco.version>
        <jicoco.version>1.1-62-g1befa88</jicoco.version>

I join my config

jvb.conf.txt

Ok, I can repro now...I had to run it like it normally does when deploying (it wouldn't repro when running from Intellij). PR in Jicoco is here: jitsi/jicoco#120

OK thanks.
Will you update jvb soon with the dependencies?

JVB was updated here #1501

Fixed in Jicoco here: jitsi/jicoco#120, JVB updated here: #1501