Jitsi installed and working. Tokens installed and JITSI doesn't work anymore

I have follow all the documentation, searched on this forum,

  • installed prosody 0.11
  • add the include conf.d/* into prosody.cfg.lua
  • apt-get install liblua5.2-dev
  • apt-get install libssl1.0-dev
  • apt-get install jitsi-meet-tokens (again because the last line removed it)
  • luarocks install luajwtjitsi

Jitsi meet was working. After doing all of this, it’s now working anymore, even in anonymous authentication mode…

If I see the prosody logs… there are none… If I do the servide prosody status:


Jun 01 20:54:34 67C8948 prosody[8548]: modulemanager: Error initializing module ‘token_verification’ on ‘conference.jitsi4.inxpirius.com’: /usr/share/lua/5.2/luarocks/loader.lua:147: error loading module ‘cjson’ from file '/usr/local/lib
/usr/local/lib/lua/5.2/cjson.so: undefined symbol: lua_objlen
stack traceback:
[C]: in function ‘a_loader’
/usr/share/lua/5.2/luarocks/loader.lua:147: in function </usr/share/lua/5.2/luarocks/loader.lua:144>
(…tail calls…)
[C]: in function ‘_real_require’
/usr/share/lua/5.2/prosody/util/startup.lua:163: in function ‘require’
/usr/local/share/lua/5.2/luajwtjitsi.lua:1: in main chunk
[C]: in function ‘_real_require’
/usr/share/lua/5.2/prosody/util/startup.lua:163: in function ‘require’
/usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:7: in main chunk
(…tail calls…)
…re/jitsi-meet/prosody-plugins/mod_token_verification.lua:24: in main chunk
[C]: in function ‘xpcall’
/usr/share/lua/5.2/prosody/core/modulemanager.lua:200: in function ‘do_load_module’
/usr/share/lua/5.2/prosody/core/modulemanager.lua:283: in function ‘load’
/usr/share/lua/5.2/prosody/core/modulemanager.lua:99: in function ‘?’
/usr/share/lua/5.2/prosody/util/events.lua:79: in function </usr/share/lua/5.2/prosody/util/events.lua:75>
(…tail calls…)
/usr/share/lua/5.2/prosody/core/hostmanager.lua:108: in function ‘activate’
/usr/share/lua/5.2/prosody/core/hostmanager.lua:58: in function ‘?’
/usr/share/lua/5.2/prosody/util/events.lua:79: in function </usr/share/lua/5.2/prosody/util/events.lua:75>
(…tail calls…)
/usr/share/lua/5.2/prosody/util/startup.lua:368: in function ‘prepare_to_start’
/usr/share/lua/5.2/prosody/util/startup.lua:594: in function ‘f’
/usr/share/lua/5.2/prosody/util/async.lua:139: in function ‘func’
/usr/share/lua/5.2/prosody/util/async.lua:127: in function </usr/share/lua/5.2/prosody/util/async.lua:125>
Jun 01 20:54:34 67C8948 prosody[8548]: modulemanager: Error initializing module ‘auth_token’ on ‘jitsi4.inxpirius.com’: /usr/share/lua/5.2/luarocks/loader.lua:147: error loading module ‘cjson’ from file ‘/usr/local/lib/lua/5.2/cjson.so’:
/usr/local/lib/lua/5.2/cjson.so: undefined symbol: lua_objlen
stack traceback:
[C]: in function ‘a_loader’
/usr/share/lua/5.2/luarocks/loader.lua:147: in function </usr/share/lua/5.2/luarocks/loader.lua:144>
(…tail calls…)
[C]: in function ‘_real_require’
/usr/share/lua/5.2/prosody/util/startup.lua:163: in function ‘require’
/usr/local/share/lua/5.2/luajwtjitsi.lua:1: in main chunk
[C]: in function ‘_real_require’
/usr/share/lua/5.2/prosody/util/startup.lua:163: in function ‘require’
/usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:7: in main chunk
(…tail calls…)
/usr/share/jitsi-meet/prosody-plugins/mod_auth_token.lua:8: in main chunk
[C]: in function ‘xpcall’
/usr/share/lua/5.2/prosody/core/modulemanager.lua:200: in function ‘do_load_module’
/usr/share/lua/5.2/prosody/core/modulemanager.lua:283: in function ‘load’
/usr/share/lua/5.2/prosody/core/usermanager.lua:90: in function ‘?’
/usr/share/lua/5.2/prosody/util/events.lua:79: in function </usr/share/lua/5.2/prosody/util/events.lua:75>
(…tail calls…)
/usr/share/lua/5.2/prosody/core/hostmanager.lua:108: in function ‘activate’
/usr/share/lua/5.2/prosody/core/hostmanager.lua:58: in function ‘?’
/usr/share/lua/5.2/prosody/util/events.lua:79: in function </usr/share/lua/5.2/prosody/util/events.lua:75>
(…tail calls…)

Then I try to install lua-cjson so I do: luarocks install lua-cjson


root@67C8948:/etc/prosody/conf.d# luarocks install lua-cjson
Installing https://luarocks.org/lua-cjson-2.1.0.6-1.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lua_cjson.c -o lua_cjson.o
lua_cjson.c: In function ‘json_append_data’:
lua_cjson.c:743:19: warning: implicit declaration of function ‘lua_objlen’; did you mean ‘lua_len’? [-Wimplicit-function-declaration]
len = lua_objlen(l, -1);
^~~~~~~~~~
lua_len
gcc -O2 -fPIC -I/usr/include/lua5.2 -c strbuf.c -o strbuf.o
gcc -O2 -fPIC -I/usr/include/lua5.2 -c fpconv.c -o fpconv.o
gcc -shared -o cjson.so -L/usr/local/lib lua_cjson.o strbuf.o fpconv.o
lua-cjson 2.1.0.6-1 is now installed in /usr/local (license: MIT)


I tried installing lua5.3, but the same error…

I’m stuck after days of working on this… I really don’t understand why JITSI is so difficult to install…

Unfortunately token as an authentication method hasn’t seem to have had any development for a long time and looks like it was added as an afterthought. This limits greatly what can be done with jitsi, as e.g. authenticating with the api using tokens can’t be relied upon.

Tokens are handled with luajwtjitsi which uses luacrypto which has been abandoned 7 years ago and uses openssl 1.0. Trying to get a working combination of a working versions of prosody/meet/tokens is a nightmare.

Tokens should really be integrated into the main application. I’m not sure what can be done. I’d like to help getting this into better shape. If we’d put some time into this it would be nice to be able to use tokens reliably and not just brake on the next release.