#425 mod_bosh: Error if stream opened to component

Reporter sean@scj.net
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Status-Fixed
  • Priority-Medium
  • Type-Defect
  1. sean@scj.net on

    *What steps will reproduce the problem?* 1. Client connect to server getting login error *2.* *3.* *What is the expected output? What do you see instead?* Client not connecting properly to server. Log file Jul 01 04:46:38 mod_posix info Successfully daemonized to PID 31982 Jul 01 04:47:04 c2s23c24e0 info Client connected Jul 01 04:47:04 general error Top-level error, please report: /usr/lib/prosody/core/usermanager.lua:104: attempt to index field 'users' (a nil value) Jul 01 04:47:04 general error stack traceback: [C]: in function 'parse' /usr/lib/prosody/util/xmppstream.lua:255: in function 'feed' /usr/lib/prosody/modules/mod_c2s.lua:230: in function 'data' /usr/lib/prosody/modules/mod_c2s.lua:252: in function </usr/lib/prosody/modules/mod_c2s.lua:249> (tail call): ? /usr/lib/prosody/net/server_select.lua:848: in function </usr/lib/prosody/net/server_select.lua:830> [C]: in function 'xpcall' /usr/lib/prosody/../../bin/prosody:373: in function 'loop' /usr/lib/prosody/../../bin/prosody:403: in main chunk [C]: ? *What version of the product are you using? On what operating system?* Linux 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux root@mx:/etc/prosody# prosodyctl about Prosody 0.9.4 # Prosody directories Data directory: /var/lib/prosody Plugin directory: /usr/lib/prosody/modules/ Config directory: /etc/prosody Source directory: /usr/lib/prosody # Lua environment Lua version: Lua 5.1 LuaRocks: Installed (2.0.8) # Lua module versions lfs: LuaFileSystem 1.5.0 lxp: LuaExpat 1.3.0 pposix: 0.3.6 socket: LuaSocket 3.0-rc1 ssl: 0.3.2M Using internal_hashed *Please provide any additional information below.*

  2. Zash on

    Is this the issue where a client opens a c2s stream to a component? That issue has been fixed.

  3. Zash on

    Let's assume this was the c2s stream to component issue. Comment here or file a new issue if this appears again.

    Changes
    • owner Zash
    • tags Status-Fixed
  4. Amarjeet Sharma on

    Step: 1 admin@testbed:/etc/prosody# prosodyctl about Prosody 0.11.2 # Prosody directories Data directory: /var/lib/prosody Config directory: /etc/prosody Source directory: /usr/lib/prosody Plugin directories: /usr/share/jitsi-meet/prosody-plugins/ /usr/lib/prosody/modules/ # Lua environment Lua version: Lua 5.2 Lua module search paths: /usr/lib/prosody/?.lua /usr/local/share/lua/5.2/?.lua /usr/local/share/lua/5.2/?/init.lua /usr/local/lib/lua/5.2/?.lua /usr/local/lib/lua/5.2/?/init.lua /usr/share/lua/5.2/?.lua /usr/share/lua/5.2/?/init.lua Lua C module search paths: /usr/lib/prosody/?.so /usr/local/lib/lua/5.2/?.so /usr/lib/x86_64-linux-gnu/lua/5.2/?.so /usr/lib/lua/5.2/?.so /usr/local/lib/lua/5.2/loadall.so LuaRocks: Not installed # Lua module versions lfs: LuaFileSystem 1.6.3 libevent: 2.1.8-stable luaevent: 0.4.6 lxp: LuaExpat 1.3.0 socket: LuaSocket 3.0-rc1 ssl: 0.7 Step2: Added two components: a) Component "internal.auth.yourdomain.com" "muc" b) VirtualHost "recorder.yourdomain.com" Added two user: a) prosodyctl register jibri auth.yourdomain.com jibriauthpass b) prosodyctl register recorder recorder.yourdomain.com jibrirecorderpass Step3: Setup jibri on seperate Server to authenticate with Prosody Step4: Prosody Status gives following error: admin@testbed:/etc/prosody# systemctl status prosody ● prosody.service - Prosody XMPP Server Loaded: loaded (/lib/systemd/system/prosody.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2020-05-27 13:21:23 IST; 19min ago Docs: https://prosody.im/doc Main PID: 27018 (lua5.2) Tasks: 1 (limit: 65000) Memory: 21.1M CGroup: /system.slice/prosody.service └─27018 lua5.2 /usr/bin/prosody May 27 13:21:23 ekayana systemd[1]: Started Prosody XMPP Server. May 27 13:21:55 ekayana prosody[27018]: http.server: Traceback[httpserver]: /usr/lib/prosody/core/usermanager.lua:109: attempt to index field 'users' (a nil value stack traceback: [C]: in function 'parse' /usr/lib/prosody/util/xmppstream.lua:282: in function 'feed' /usr/lib/prosody/modules/mod_bosh.lua:133: in function '?' /usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75> (...tail calls...) /usr/lib/prosody/net/http/server.lua:228: in function </usr/lib/prosody/net/http/server.lua:176> [C]: in function 'xpcall' /usr/lib/prosody/net/http/server.lua:108: in function 'process_next' /usr/lib/prosody/net/http/server.lua:124: in function 'success_cb' /usr/lib/prosody/net/http/parser.lua:177: in function 'feed' /usr/lib/prosody/net/http/server.lua:155: in function </usr/lib/prosody/net/http/server.lua:154> (...tail calls...) /usr/lib/prosody/net/server_select.lua:915: in function </usr/lib/prosody/net/server_select.lua:899> [C]: in function 'xpcall' /usr/bin/prosody:80: in function 'loop' /usr/bin/prosody:90: in main chunk [C]: in ? Expected: The authentication would works Outcome: Prosody not able to find the users

  5. Zash on

    ``` $ curl https://localhost/http-bind --data-binary '<body xmlns="http://jabber.org/protocol/httpbind" to="conference.localhost" hold="1" rid="12345" wait="60" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0"/>' ``` > http.server error Traceback[httpserver]: ./core/usermanager.lua:133: attempt to index a nil value (field 'users') However if you trigger this then your client is misconfigured to talk to a component instead of a virtualhost.

    Changes
    • title Client login failed - attempt to index field 'users' (a nil value) mod_bosh: Error if stream opened to component
    • tags Status-Accepted
  6. Amarjeet Sharma on

    Step1: curl https://hostname.yourdomain.com/http-bind --data-binary '<body xmlns="http://jabber.org/protocol/httpbind" to="conference.localhost" hold="1" rid="12345" wait="60" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0"/>' Step 2: Output: <body requests='2' ver='1.6' xmpp:version='1.0' hold='1' from='conference.localhost' authid='635417cd-2469-4452-a7b3-b30eb9b7b45e' secure='true' xmlns:xmpp='urn:xmpp:xbosh' wait='60' inactivity='60' sid='635417cd-2469-4452-a7b3-b30eb9b7b45e' polling='5' xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'><stream:features xmlns='jabber:client'/></body>

  7. Zash on

    'conference.localhost' in my case is defined by Component "conference.localhost" "muc",

  8. Amarjeet Sharma on

    in my case 'conference.yourdomain.com' is defined by Component "conference.yourdomain.com' "muc" in prosody configuration.

  9. Zash on

    Fixed in https://hg.prosody.im/0.11/rev/1aea75b63d0a

    Changes
    • tags Status-Fixed

New comment

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