#1902 Failed to initialize modules (posix, websocket) in Jitsi

Reporter Rudi
Owner Nobody
Created
Updated
Stars ★★ (2)
Tags
  • Priority-Medium
  • Status-New
  • Type-Defect
  1. Rudi on

    The 'prosody' component refuses to start in a docker setup under Ubuntu Server 24.04.2 LTS in VMware. Error messages look like this: Error initializing module 'posix' on 'auth.meet.jitsi': /usr/share/lua/5.4/prosody/util/startup.lua:357: attempt to index a nil value (field 'main_thread') | stack traceback: | /usr/share/lua/5.4/prosody/util/startup.lua:357: in field 'shutdown' | /usr/lib/prosody/modules/mod_posix.lua:70: in local 'write_pidfile' | /usr/lib/prosody/modules/mod_posix.lua:123: in main chunk | [C]: in function 'xpcall' | /usr/share/lua/5.4/prosody/core/modulemanager.lua:270: in upvalue 'do_load_module' | /usr/share/lua/5.4/prosody/core/modulemanager.lua:353: in function 'core.modulemanager.load' | /usr/share/lua/5.4/prosody/core/modulemanager.lua:131: in function 'core.modulemanager.load_modules_for_host' | /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77> | (...tail calls...) | /usr/share/lua/5.4/prosody/core/hostmanager.lua:108: in function 'core.hostmanager.activate' | /usr/share/lua/5.4/prosody/core/hostmanager.lua:58: in field '?' | /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77> | (...tail calls...) | /usr/share/lua/5.4/prosody/util/startup.lua:428: in function 'util.startup.prepare_to_start' | /usr/share/lua/5.4/prosody/util/startup.lua:707: in function 'util.startup.prosody' | /usr/share/lua/5.4/prosody/util/async.lua:156: in upvalue 'func' | /usr/share/lua/5.4/prosody/util/async.lua:144: in function </usr/share/lua/5.4/prosody/util/async.lua:142> or: Error initializing module 'websocket' on 'meet.jitsi': /usr/lib/prosody/modules/mod_websocket.lua:47: attempt to index a nil value | stack traceback: | /usr/lib/prosody/modules/mod_websocket.lua:47: in main chunk | [C]: in function 'xpcall' | /usr/share/lua/5.4/prosody/core/modulemanager.lua:270: in upvalue 'do_load_module' | /usr/share/lua/5.4/prosody/core/modulemanager.lua:353: in function 'core.modulemanager.load' | /usr/share/lua/5.4/prosody/core/modulemanager.lua:131: in function 'core.modulemanager.load_modules_for_host' | /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77> | (...tail calls...) | /usr/share/lua/5.4/prosody/core/hostmanager.lua:108: in function 'core.hostmanager.activate' | /usr/share/lua/5.4/prosody/core/hostmanager.lua:58: in field '?' | /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77> | (...tail calls...) | /usr/share/lua/5.4/prosody/util/startup.lua:428: in function 'util.startup.prepare_to_start' | /usr/share/lua/5.4/prosody/util/startup.lua:707: in function 'util.startup.prosody' | /usr/share/lua/5.4/prosody/util/async.lua:156: in upvalue 'func' | /usr/share/lua/5.4/prosody/util/async.lua:144: in function </usr/share/lua/5.4/prosody/util/async.lua:142> This appears to be a race condition, as this does not happen always. I.e. sometimes I get four of those messages, on the next attempt three or even only two. But there are rare situations. The Jitsi guys have no idea what could be the reason for that.

  2. Rudi on

    I did some more research on this. There is definitively a race condition when initializing modules! It seem to happen when accessing the PID file. The error messages above are from an older version of prosody. I don't know exactly which. However, with 13.0.2 the log is different. Now I get: ' | [cont-init.d] 10-config: exited 0. | [cont-init.d] done. | [services.d] starting services | [services.d] done. | 2025-07-10 11:06:43 startup info Hello and welcome to Prosody version 13.0.2 | 2025-07-10 11:06:43 startup error Another Prosody instance seems to be running with PID 242, quitting | 2025-07-10 11:06:44 startup info Hello and welcome to Prosody version 13.0.2 | 2025-07-10 11:06:44 startup error Another Prosody instance seems to be running with PID 242, quitting ... <repeated 6 more times> ' I.e. it claims that another instance os running, but there isn't.

New comment

Not published. Used for spam prevention and optional update notifications.