Enable conference_duration_component and speakerstats

Hi,
Is there any instruction on how we can enable these features on Prosody?

The steps I did:
1- download ext_events.lib.lua, mod_conference_duration.lua, mod_conference_duration_component.lua, mod_speakerstats.lua, mod_speakerstats_component.lua,util.lib.lua INTO /usr/lib/prosody/modules

2- Modify Prosody nano /etc/prosody/conf.d/ec2-52-53-208-45.us-west-1.compute.amazonaws.com.cfg.lua as shows on this link


No error on Prosody, but also timer not working

If you install latest jitsi-meet from unstable in clean environment those will be on by default. You can check the template of the prosody log https://github.com/jitsi/jitsi-meet/blob/master/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example
Mind that this will not work with prosody 0.10 and older.

Thank you @damencho.
When I do upgrade prosody, it breaking our JVB.
Some permission issues on Prosody itself.

What is the error you see? Did you fix the storage?

Hi @damencho

[ ok ] Starting prosody (via systemctl): prosody.service.

Jan 29 18:20:15 startup info Hello and welcome to Prosody version 0.11.4

Jan 29 18:20:15 startup info Prosody is using the select backend for connection handling

Jan 29 18:20:15 portmanager info Activated service ‘c2s’ on [::]:5222, :5222

Jan 29 18:20:15 portmanager info Activated service ‘legacy_ssl’ on no ports

Jan 29 18:20:15 portmanager info Activated service ‘s2s’ on [::]:5269, :5269

Jan 29 18:20:17 c2s55aaad947a30 info Client connected

Jan 29 18:20:17 c2s55aaad947a30 info Client disconnected: connection closed

Jan 29 18:20:21 c2s55aaad9518f0 info Client connected

Jan 29 18:20:21 c2s55aaad9518f0 info Client disconnected: connection closed

Jan 29 18:20:22 c2s55aaad95a4b0 info Client connected

Jan 29 18:20:22 c2s55aaad95a4b0 info Client disconnected: connection closed

Jan 29 18:20:25 c2s55aaad963ba0 info Client connected

Jan 29 18:20:25 c2s55aaad963ba0 info Client disconnected: connection closed

Jan 29 18:20:27 c2s55aaad96d220 info Client connected

Jan 29 18:20:27 c2s55aaad96d220 info Client disconnected: connection closed

Jan 29 18:20:29 c2s55aaad976ec0 info Client connected

Jan 29 18:20:29 c2s55aaad976ec0 info Client disconnected: connection closed

Jan 29 18:20:32 c2s55aaad9809a0 info Client connected

Jan 29 18:20:32 c2s55aaad9809a0 info Client disconnected: connection closed

Jan 29 18:20:33 c2s55aaad98a340 info Client connected

Jan 29 18:20:33 c2s55aaad98a340 info Client disconnected: connection closed

Jan 29 18:20:37 c2s55aaad994900 info Client connected

Jan 29 18:20:37 c2s55aaad994900 info Client disconnected: connection closed

Jan 29 18:20:37 c2s55aaad99ee00 info Client connected

Jan 29 18:20:37 c2s55aaad99ee00 info Client disconnected: connection closed

Jan 29 18:20:41 c2s55aaad9a9480 info Client connected

Jan 29 18:20:41 c2s55aaad9a9480 info Client disconnected: connection closed

Jan 29 18:20:42 c2s55aaad9b35f0 info Client connected

Jan 29 18:20:42 c2s55aaad9b35f0 info Client disconnected: connection closed

Jan 29 18:20:45 c2s55aaad9bdbb0 info Client connected

Jan 29 18:20:45 c2s55aaad9bdbb0 info Client disconnected: connection closed

Jan 29 18:20:47 c2s55aaad9c7ec0 info Client connected

Jan 29 18:20:47 c2s55aaad9c7ec0 info Client disconnected: connection closed

Jan 29 18:20:52 c2s55aaad9d25f0 info Client connected

Jan 29 18:20:52 c2s55aaad9d25f0 info Client disconnected: connection closed

Jan 29 18:20:57 c2s55aaad7502e0 info Client connected

Jan 29 18:20:57 c2s55aaad7502e0 info Client disconnected: connection closed

Jan 29 18:21:02 c2s55aaad931d40 info Client connected

Jan 29 18:21:02 c2s55aaad931d40 info Client disconnected: connection closed

Jan 29 18:21:07 c2s55aaad963cd0 info Client connected

Jan 29 18:21:07 c2s55aaad963cd0 info Client disconnected: connection closed

Jan 29 18:21:09 c2s55aaad7c5cd0 info Client connected

Jan 29 18:21:09 c2s55aaad7c5cd0 info Client disconnected: connection closed

Jan 29 18:21:12 c2s55aaad7ffe00 info Client connected

Jan 29 18:21:12 c2s55aaad7ffe00 info Client disconnected: connection closed

Do you have this in your settings c2s_require_encryption = false?
Try adding and these and see does it change anything.

cross_domain_bosh = false;
consider_bosh_secure = true;

I did.

Jan 29 22:49:11 startup info Hello and welcome to Prosody version 0.11.4
Jan 29 22:49:11 startup info Prosody is using the select backend for connection handling
Jan 29 22:49:11 portmanager info Activated service ‘c2s’ on [::]:5222, :5222
Jan 29 22:49:11 portmanager info Activated service ‘legacy_ssl’ on no ports
Jan 29 22:49:11 portmanager info Activated service ‘s2s’ on [::]:5269, :5269
Jan 29 22:49:11 certmanager error SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Check that the permissions allow Prosody to read this file. (for localhost)
Jan 29 22:49:11 localhost:tls error Error creating context for c2s: error loading private key (Permission denied)
Jan 29 22:49:11 certmanager error SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Previous error (see logs), or other system error. (for localhost)
Jan 29 22:49:11 localhost:tls error Error creating contexts for s2sout: error loading private key (system lib)
Jan 29 22:49:11 certmanager error SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Previous error (see logs), or other system error. (for localhost)
Jan 29 22:49:11 localhost:tls error Error creating contexts for s2sin: error loading private key (system lib)
Jan 29 22:49:29 c2s564e4fdba4d0 info Client connected
Jan 29 22:49:29 c2s564e4fdba4d0 info Client disconnected: connection closed

Also c2s_require_encryption = false ? is set false
cross_domain_bosh = false;
consider_bosh_secure = true;
– Plugins path gets uncommented during jitsi-meet-tokens package install - that’s where token plugin is located
–plugin_paths = { “/usr/share/jitsi-meet/prosody-plugins/” }
turncredentials_secret = “mysecret”;
turncredentials_host = “turn.XXX.com”;
turncredentials_port = 443;
turncredentials_ttl = 86400;
turncredentials = {
{ type = “stun”, host = “turn.XXX.com” },
{ type = “stun”, host = “turn2.XXX.com” },
{ type = “turn”, host = “turn.XXX.com”, port = 443},
{ type = “turn”, host = “turn2.XXX.com”, port = 443},
{ type = “turns”, host = “turn.XXX.com”, port = 443, transport = “tcp” },
{ type = “turns”, host = “turn2.XXX.com”, port = 443, transport = “tcp” },
{ type = “turns”, host = “turn.XXX.com”, port = 443},
{ type = “turns”, host = “turn2.XXX.com”, port = 443}
}

VirtualHost “XXX.com
– enabled = false – Remove this line to enable this host
authentication = “anonymous”
– Properties below are modified by jitsi-meet-tokens package config
– and authentication above is switched to “token”
–app_id=“example_app_id”
–app_secret=“example_app_secret”
– Assign this host a certificate for TLS, otherwise it would use the one
– set in the global section (if any).
– Note that old-style SSL on port 5223 only supports one certificate, and will always
– use the global one.
ssl = {
key = “/etc/prosody/certs/XXX.com.key”;
certificate = “/etc/prosody/certs/XXX.com.crt”;
}
speakerstats_component = “speakerstats.XXX.com
conference_duration_component = “conferenceduration.XXX.com
– we need bosh
modules_enabled = {
“bosh”;
“pubsub”;
“turncredentials”;
–“speakerstats”;
“ping”; – Enable mod_ping
–“conference_duration”;
}

    c2s_require_encryption = false

Component “conference.XXX.com” “muc”
storage = “memory”
–modules_enabled = { “token_verification” }
admins = { “focus@auth.XXX.com” }

Component “jitsi-videobridge.XXX.com
component_secret = “Ujcy#HHV”

VirtualHost “auth.XXX.com
ssl = {
key = “/etc/prosody/certs/auth.XXX.com.key”;
certificate = “/etc/prosody/certs/auth.XXX.com.crt”;
}
authentication = “internal_plain”

Component “focus.XXX.com
component_secret = “e0K2aTY4”
–Component “speakerstats.XXX.com” “speakerstats_component”
muc_component = “conference.XXX.com

Component “conferenceduration.XXX.com” “conference_duration_component”
muc_component = “conference.XXX.com

Put it in the global section next to cross_domain_bosh and consider_bosh_secure, just for the test.
The next thing to try is enable debug logging and see why is this connect/disconnect, is there any obvious reason.

Jicofo 2020-01-29 23:31:19.462 INFO: [10] org.eclipse.jetty.server.Server.doStart() jetty-9.4.15.v20190215; built: 2019-02-15T16:53:49.381Z; git: eb70b240169fcf1abbd86af36482d1c49826fa0b; jvm 1.8.0_232-8u232-b09-0ubuntu1~18.04.1-b09
Jicofo 2020-01-29 23:31:21.985 INFO: [10] org.eclipse.jetty.server.handler.ContextHandler.doStart() Started o.e.j.s.ServletContextHandler@50733507{/,null,AVAILABLE}
Jicofo 2020-01-29 23:31:22.050 INFO: [10] org.eclipse.jetty.server.AbstractConnector.doStart() Started MuxServerConnector@58aea6f6{HTTP/1.1,[http/1.1]}{0.0.0.0:8888}
Jicofo 2020-01-29 23:31:22.051 INFO: [10] org.eclipse.jetty.server.Server.doStart() Started @5385ms
Jicofo 2020-01-29 23:31:22.061 INFO: [1] org.jitsi.impl.configuration.ConfigurationServiceImpl.log() org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90
Jicofo 2020-01-29 23:31:22.062 INFO: [1] org.jitsi.impl.configuration.ConfigurationServiceImpl.log() org.jitsi.jicofo.STATS_PUBSUB_NODE=sharedStatsNode
Jicofo 2020-01-29 23:31:22.066 INFO: [1] org.jitsi.impl.configuration.ConfigurationServiceImpl.log() org.jitsi.focus.pubsub.ADDRESS=XXX.com
Jicofo 2020-01-29 23:31:22.066 INFO: [1] org.jitsi.impl.configuration.ConfigurationServiceImpl.log() org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.XXX.com
Jicofo 2020-01-29 23:31:22.096 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log() Component org.jitsi.jicofo. config:
Jicofo 2020-01-29 23:31:22.097 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log() ping interval: 10000 ms
Jicofo 2020-01-29 23:31:22.097 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log() ping timeout: 5000 ms
Jicofo 2020-01-29 23:31:22.098 INFO: [1] org.jitsi.xmpp.component.ComponentBase.log() ping threshold: 3
Jicofo 2020-01-29 23:31:22.117 SEVERE: [34] org.jitsi.meet.ComponentMain.log() java.net.ConnectException: Connection refused (Connection refused), host:localhost, port:5347
org.xmpp.component.ComponentException: java.net.ConnectException: Connection refused (Connection refused)

root@ip-172-31-32-96:/etc/prosody# netstat -anp | grep lua
tcp 0 0 0.0.0.0:5222 0.0.0.0:* LISTEN 3834/lua5.2
tcp 0 0 0.0.0.0:5269 0.0.0.0:* LISTEN 3834/lua5.2
tcp6 0 0 :::5222 :::* LISTEN 3834/lua5.2
tcp6 0 0 :::5269 :::* LISTEN 3834/lua5.2
unix 3 STREAM CONNECTED 32783 3834/lua5.2

Jicofo cannot connect to the component port. Hum.
Do you have this in your main prosody config (/etc/prosody/prosody.cfg.lua):
Include "conf.d/*.cfg.lua"?
If not add it at the end and restart prosody, then jvb, then jicofo, does that make a change?

You are right the Include "conf.d/*.cfg.lua was missing from /etc/prosody/prosody.cfg.lua.
I did and now everything works but duration still not showing up.
Here is log from Prosody:

Jan 30 17:24:07 startup info Hello and welcome to Prosody version 0.11.4
Jan 30 17:24:07 startup info Prosody is using the select backend for connection handling
Jan 30 17:24:07 general info Starting conference duration timer for conference.XXX.com
Jan 30 17:24:07 conferenceduration.XXX.com:conference_duration_component info No muc component found, will listen for it: conference.XXX.com
Jan 30 17:24:07 portmanager info Activated service ‘s2s’ on :5269, [::]:5269
Jan 30 17:24:07 conferenceduration.XXX.com:conference_duration_component info Hook to muc events on conference.XXX.com
Jan 30 17:24:07 portmanager info Activated service ‘http’ on :5280, [::]:5280
Jan 30 17:24:07 portmanager error Error binding encrypted port for https: No certificate present in SSL/TLS configuration for https port 5281
Jan 30 17:24:07 portmanager error Error binding encrypted port for https: No certificate present in SSL/TLS configuration for https port 5281
Jan 30 17:24:07 portmanager info Activated service ‘https’ on no ports
Jan 30 17:24:07 portmanager info Activated service ‘c2s’ on :5222, [::]:5222
Jan 30 17:24:07 portmanager info Activated service ‘legacy_ssl’ on no ports
Jan 30 17:24:07 portmanager info Activated service ‘component’ on [0.0.0.0]:5347
Jan 30 17:24:08 jcp557ad17393e0 info Incoming Jabber component connection
Jan 30 17:24:08 focus.XXX.com:component info External component successfully authenticated
Jan 30 17:24:09 c2s557ad1742e90 info Client connected
Jan 30 17:24:09 c2s557ad1742e90 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
Jan 30 17:24:09 c2s557ad1742e90 info Authenticated as focus@auth.XXX.com
Jan 30 17:24:09 jitsi-videobridge.XXX.com:component warn Component not connected, bouncing error for:
Jan 30 17:24:11 jcp557ad179a880 info Incoming Jabber component connection
Jan 30 17:24:11 jitsi-videobridge.XXX.com:component info External component successfully authenticated
Jan 30 17:24:11 c2s557ad17a3db0 info Client connected
Jan 30 17:24:11 c2s557ad17a3db0 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
Jan 30 17:24:11 c2s557ad17a3db0 info Authenticated as jibri@auth.XXX.com
Jan 30 17:24:19 c2s557ad17eeef0 info Client connected
Jan 30 17:24:19 c2s557ad17eeef0 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
Jan 30 17:24:19 c2s557ad17eeef0 info Authenticated as jibri@auth.XXX.com

Are you using latest version from unstable? Do you have this setting https://github.com/jitsi/jitsi-meet/blob/ab5627212dc271f1c836b44bfc620cc3a9b861ff/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example#L71

Yaya, WORK NOW :slight_smile:
Thanks for the help.
I used the latest stable jitsi-meet.

@damenchoTHANK YOU

hello @Hamid_Narimani

i’ve upgraded my prosody from 0.9 to 0.11 and fixed the compatibility issues, but unfortunately i’m still unable to see timer in the the conference. there’s no error shown in prosody or jicofo log.

what could be wrong? anywhere i need to look into to troubleshoot this issue? thanks.

Are you using secure domain?

hi @damencho

you are right, i’m using secure domain

Add to your guest virtual domain these two settings to activate it:


hi @damencho

I already had these 2 lines in the configuration file. I can see these entries in the prosody log so I guess the component setup properly, is my understanding correct?

May 08 23:35:50 general info Starting conference duration timer for conference.vctest.packetfilters.net
May 08 23:35:50 conferenceduration.vctest.packetfilters.net:conference_duration_component info Hook to muc events on conference.vctest.packetfilters.net