Trying to install and activate mod_muc_allowners.lua


#1

I am trying to install and activate mod_muc_allowners.lua, but I fail miserably.

I put the lua file in /usr/lib/prosody/modules/mod_muc_allowners.lua
I edited the file /etc/prosody/conf.d/webconference.streamhub.ro.cfg.lua. It contains now the follwing:

-- 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/" }

VirtualHost "webconference.streamhub.ro"
        -- 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/webconference.streamhub.ro.key";
                certificate = "/etc/prosody/certs/webconference.streamhub.ro.crt";
        }
        -- we need bosh
        modules_enabled = {
            "bosh";
            "pubsub";
            "ping"; -- Enable mod_ping
        }

        c2s_require_encryption = false

Component "conference.webconference.streamhub.ro" "muc"
    storage = "null"
    modules_enabled = { "muc_allowners"; }
    --modules_enabled = { "token_verification" }
admins = { "focus@auth.webconference.streamhub.ro" }

Component "jitsi-videobridge.webconference.streamhub.ro"
    component_secret = "*******"

VirtualHost "auth.webconference.streamhub.ro"
    ssl = {
        key = "/etc/prosody/certs/auth.webconference.streamhub.ro.key";
        certificate = "/etc/prosody/certs/auth.webconference.streamhub.ro.crt";
    }
    authentication = "internal_plain"

Component "focus.webconference.streamhub.ro"
    component_secret = "*********"

I restarted the prosody service with service prosody restart

On service prosody status I get:

$ service prosody status
● prosody.service - LSB: Prosody XMPP Server
   Loaded: loaded (/etc/init.d/prosody; generated)
   Active: active (running) since Sun 2018-07-29 21:15:03 EEST; 13min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 20947 ExecStop=/etc/init.d/prosody stop (code=exited, status=0/SUCCESS)
  Process: 12845 ExecReload=/etc/init.d/prosody reload (code=exited, status=0/SUCCESS)
  Process: 20956 ExecStart=/etc/init.d/prosody start (code=exited, status=0/SUCCESS)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/prosody.service
           └─20972 lua5.1 /usr/bin/prosody

Jul 29 21:15:03 streamhub.ro systemd[1]: Starting LSB: Prosody XMPP Server...
Jul 29 21:15:03 streamhub.ro prosody[20956]: Starting Prosody XMPP Server: prosody.
Jul 29 21:15:03 streamhub.ro systemd[1]: Started LSB: Prosody XMPP Server.
Jul 29 21:15:03 streamhub.ro prosody[20972]: modulemanager: Error initializing module 'muc_allowners' on 'conference.webconference.streamhub.ro': /usr/lib/prosody/modules/mod_muc_allowners.lua:13: attempt to index local 'room_mt'
                                             stack traceback:
                                                     /usr/lib/prosody/core/modulemanager.lua:29: in function </usr/lib/prosody/core/modulemanager.lua:29>
                                                     /usr/lib/prosody/modules/mod_muc_allowners.lua:13: in main chunk
                                                     (tail call): ?
                                                     [C]: in function 'xpcall'
                                                     /usr/lib/prosody/core/modulemanager.lua:29: in function 'pcall'
                                                     /usr/lib/prosody/core/modulemanager.lua:171: in function 'do_load_module'
                                                     /usr/lib/prosody/core/modulemanager.lua:249: in function 'load'
                                                     /usr/lib/prosody/core/modulemanager.lua:74: in function '?'
                                                     /usr/lib/prosody/util/events.lua:67: in function 'fire_event'
                                                     /usr/lib/prosody/core/hostmanager.lua:98: in function 'activate'
                                                     /usr/lib/prosody/core/hostmanager.lua:44: in function '?'
                                                     /usr/lib/prosody/util/events.lua:67: in function 'fire_event'
                                                     /usr/bin/prosody:337: in function 'prepare_to_start'
                                                     /usr/bin/prosody:403: in main chunk
                                                     [C]: ?

Please help! What am I doing wrong?


#2

For others stumbling with this, the solution is very simple. Update prosody from the official repo and that’s it, the problem is gone. It seems that the version provided from jitsi repo on debian is to old to handle this muc plugin.