Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the timer is keeping the previous sessions, including different conferences #14815

Closed
2 of 11 tasks
tonnick opened this issue Jun 10, 2024 · 39 comments · Fixed by #14871
Closed
2 of 11 tasks

the timer is keeping the previous sessions, including different conferences #14815

tonnick opened this issue Jun 10, 2024 · 39 comments · Fixed by #14871

Comments

@tonnick
Copy link

tonnick commented Jun 10, 2024

What happened?

starting new conference, the timer is not starting at 0. not sure about it but it seems that it keep the IP / session from previous conference, whatever the room.

Exemple 1
I can open 3 conferences at different time and keep them running
/conferencetest1 started 30 min ago
/conferencetest2 started 10min ago
/conferencetest3 started 3min ago.

all 3 conferences are running with same timer value !

same if I open a conference /conference1 during 20min, then close it, and open a new one /conference2, the conference 2 will start at 20min because of previous one.

--> timer is unique

Platform

  • Chrome (or Chromium based)
  • Firefox
  • Safari
  • Other desktop browser
  • Android browser
  • iOS browser
  • Electron app
  • Android mobile app
  • iOS mobile app
  • Custom app using a mobile SDK

Browser / app / sdk version

chrome Version 125.0.6422.142 (Build officiel) (64 bits)

Relevant log output

No response

Reproducibility

  • The problem is reproducible on meet.jit.si

More details?

No response

@damencho
Copy link
Member

What is the jitsi-meet that is installed? What is the OS version? What is the prosody version running on the server?

@tonnick
Copy link
Author

tonnick commented Jun 10, 2024

debian 11.9

#apt list --installed | grep jitsi
jitsi-meet-prosody/stable,now 1.0.7952-1 all [installed,automatic]
jitsi-meet-turnserver/stable,now 1.0.7952-1 all [installed,automatic]
jitsi-meet-web-config/stable,now 1.0.7952-1 all [installed,automatic]
jitsi-meet-web/stable,now 1.0.7952-1 all [installed,automatic]
jitsi-meet/stable,now 2.0.9457-1 all [installed]
jitsi-videobridge2/stable,now 2.3-105-ge155b81e-1 all [installed,automatic]
lua-basexx/stable,now 0.4.1-jitsi1 all [installed,automatic]
lua-cjson/stable,now 2.1.0.10-jitsi1 amd64 [installed,automatic]

@damencho
Copy link
Member

dpkg -l | grep prosody ?

@tonnick
Copy link
Author

tonnick commented Jun 10, 2024

ii jitsi-meet-prosody 1.0.7952-1 all Prosody configuration for Jitsi Meet
ii prosody 0.11.9-2+deb11u2 amd64 Lightweight Jabber/XMPP server

@damencho
Copy link
Member

same if I open a conference /conference1 during 20min, then close it, and open a new one /conference2, the conference 2 will start at 20min because of previous one.

Check prosody logs when you are closing conference1 and when opening conference2? What do you see? Can you share it here?

@tonnick
Copy link
Author

tonnick commented Jun 10, 2024

here is my new test.

opening new room /conference1
Jun 10 20:59:20 mod_bosh info New BOSH session, assigned it sid 'c7e508e1-6314-41c1-b348-1c6c367fbead'
Jun 10 20:59:20 boshc7e508e1-6314-41c1-b348-1c6c367fbead info Authenticated as [email protected]

timer started to 00:00 and do not start ! 00:00 remains.

no idea about what's going on here.

@asdf512
Copy link

asdf512 commented Jun 13, 2024

Having exactly this same issue. The timer first was not starting at zero and now it is stuck at 0 and does not count.

Ubuntu 22.04.4

apt list --installed |grep jitsi

jitsi-meet-prosody/stable,now 1.0.7952-1 all [installed,automatic]
jitsi-meet-turnserver/stable,now 1.0.7952-1 all [installed,automatic]
jitsi-meet-web-config/stable,now 1.0.7952-1 all [installed]
jitsi-meet-web/stable,now 1.0.7952-1 all [installed]
jitsi-meet/stable,now 2.0.9457-1 all [installed]
jitsi-videobridge2/stable,now 2.3-105-ge155b81e-1 all [installed]
lua-basexx/stable,now 0.4.1-jitsi1 all [installed,automatic]
lua-cjson/stable,now 2.1.0.10-jitsi1 amd64 [installed,automatic]

dpkg -l |grep prosody

ii jitsi-meet-prosody 1.0.7952-1 all Prosody configuration for Jitsi Meet
ii prosody 0.11.13-1 amd64 Lightweight Jabber/XMPP server
ii prosody-modules 0.0~hg20210130.dd3bfe8f182e+dfsg-2 all Selection of community modules for Prosody

@tonnick
Copy link
Author

tonnick commented Jun 21, 2024

Timer started again with new conference 2 days ago, and re-openinng same conference link today, the timer kept the previous session from 2 days ago.

@damencho
Copy link
Member

Do you have the log in prosody that the meeting ended two days ago?

@tonnick
Copy link
Author

tonnick commented Jun 21, 2024

my mistake. this is not even the same conference.

2 days ago I opened a conference /mrcc. I closed it
/var/log/prosody/prosody.log:Jun 19 10:26:32 endconference.mydomain.com:end_conference info Room [email protected] destroyed by occupant [email protected]/NGqhSRch

Today I opened a new one on different url (/testatoto)
and the timer kept the time from /mrcc : 1h23

I re open it, and then timer gone to 0

How does work this timer ?! I cannot figure out the way to make it work properly. Can't we have a command / button to force to reset it ? maybe this would help

@damencho
Copy link
Member

When the first participant joins we record the time when the meeting was started:

room.created_timestamp = os.time() * 1000; -- Lua provides UTC time in seconds, so convert to milliseconds

When the last person leaves the room, the room is destroyed and this value disappears.
No idea how this is possible at all.
How are you opening the meeting where you see the wrong timer, is that web, or is that mobile?

@tonnick
Copy link
Author

tonnick commented Jun 21, 2024

always web.
note as well that if I'm alone in meeting, timer remains to 0. it does not start (which maybe soulnd logical as I'm not participant, but moderator).
but what I do not understant id how the timer can "jump" from a conference to another.

@asdf512
Copy link

asdf512 commented Jun 25, 2024

I have noticed that the timer value depends entirely on the time of day. Sometimes it will not increment at all staying at 0. Other times, like currently at ~17:20 AEST it has begun to increment but will not stop if meeting is ended, persists and is identical across every meeting regardless of room name.

@damencho
Copy link
Member

Is your server setup to use UTC time?

@asdf512
Copy link

asdf512 commented Jun 25, 2024

I have changed it back and forth and it made no difference.

@asdf512
Copy link

asdf512 commented Jun 25, 2024

UTC by default

@asdf512
Copy link

asdf512 commented Jun 25, 2024

Not sure if this is an issue but I always kept my config from previous versions of jitsi. Problem only started after an upgrade of jitsi, which required a php update and ubuntu release upgrade. Not sure if this only applies to the SIP trunk though.

@asdf512
Copy link

asdf512 commented Jun 25, 2024

When the first participant joins we record the time when the meeting was started:

room.created_timestamp = os.time() * 1000; -- Lua provides UTC time in seconds, so convert to milliseconds

When the last person leaves the room, the room is destroyed and this value disappears.
No idea how this is possible at all.
How are you opening the meeting where you see the wrong timer, is that web, or is that mobile?

It is both for me

@virtuaris
Copy link

We have the same problem in our setup.

cat /etc/debian_version
10.13

apt list --installed |grep jitsi
jitsi-meet-prosody/stable,now 1.0.7874-1 all [installed,upgradable to: 1.0.7952-1]
jitsi-meet-tokens/stable,now 1.0.7874-1 all [installed,upgradable to: 1.0.7952-1]
jitsi-meet-web-config/stable,now 1.0.7874-1 all [installed,upgradable to: 1.0.7952-1]
jitsi-meet-web/stable,now 1.0.7874-1 all [installed,upgradable to: 1.0.7952-1]
jitsi-meet/stable,now 2.0.9364-1 all [installed,upgradable to: 2.0.9457-1]
jitsi-videobridge2/stable,now 2.3-92-g64f9f34f-1 all [installed,upgradable to: 2.3-105-ge155b81e-1]

dpkg -l |grep prosody
hi  jitsi-meet-prosody              1.0.7874-1                    all          Prosody configuration for Jitsi Meet
ii  prosody                         0.11.9-1~bpo10+1              amd64        Lightweight Jabber/XMPP server

We have been experiencing this issue since the update from version 2.0.8960 to 2.0.9364.

It may be of intereset that we use the lobby feature and implement authentication via JWT (including token_lobby_bypass).

Since @damencho mentioned the connection with mod_conference_duration.lua, our prosody configuration could be relevant:

plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }
  
-- domain mapper options, must at least have domain base set to use the mapper
muc_mapper_domain_base = "jitsi-dev.therapie.de";

turncredentials_secret = "xxxxxxxxxxxxxxxxxxxxxx";

turncredentials = {
  { type = "stun", host = "turn.therapie.de", port = "80" },
  { type = "turn", host = "turn.therapie.de", port = "80", transport = "udp" },
  { type = "turns", host = "turn.therapie.de", port = "443", transport = "tcp" }
};

cross_domain_bosh = false;
consider_bosh_secure = true;

VirtualHost "jitsi-dev.therapie.de"
        -- enabled = false -- Remove this line to enable this host
        authentication = "token"
        app_id = "therapie_web_client"
        app_secret = "xxxxxxxxxxxxxxxxxxxxx"
        signature_algorithm = "HS512"
        allow_empty_token = false
        -- See https://github.com/jitsi/jitsi-meet/issues/11967
        enable_domain_verification = false
        -- 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/jitsi-dev.therapie.de.key";
                certificate = "/etc/prosody/certs/jitsi-dev.therapie.de.crt";
        }
        speakerstats_component = "speakerstats.jitsi-dev.therapie.de"
        conference_duration_component = "conferenceduration.jitsi-dev.therapie.de"
        -- we need bosh
        modules_enabled = {
            "bosh";
            "pubsub";
            "ping"; -- Enable mod_ping
            "speakerstats";
            "turncredentials";
            "conference_duration";
            "muc_lobby_rooms";
        }
        c2s_require_encryption = false
        lobby_muc = "lobby.jitsi-dev.therapie.de"
        main_muc = "conference.jitsi-dev.therapie.de"
        -- muc_lobby_whitelist = { "recorder.jitsi-dev.therapie.de" }

Component "lobby.jitsi-dev.therapie.de" "muc"
    storage = "memory"
    restrict_room_creation = true
    muc_room_locking = false
    muc_room_default_public_jids = true

Component "conference.jitsi-dev.therapie.de" "muc"
    default_storage = "memory"
    muc_max_occupants = 3
    muc_access_whitelist = { '[email protected]' }
    modules_enabled = {
        "muc_meeting_id";
        "muc_domain_mapper";
        "muc_max_occupants";
        "token_verification";
        "token_affiliation";
        "token_lobby_bypass";
    }
    admins = { "[email protected]" }
    muc_room_locking = false
    muc_room_default_public_jids = true

-- internal muc component
Component "internal.auth.jitsi-dev.therapie.de" "muc"
    storage = "memory"
    modules_enabled = {
      "ping";
    }
    admins = { "[email protected]", "[email protected]" }
    muc_room_locking = false
    muc_room_default_public_jids = true

VirtualHost "auth.jitsi-dev.therapie.de"
    ssl = {
        key = "/etc/prosody/certs/auth.jitsi-dev.therapie.de.key";
        certificate = "/etc/prosody/certs/auth.jitsi-dev.therapie.de.crt";
    }
    authentication = "internal_plain"

Component "focus.jitsi-dev.therapie.de" "client_proxy"
    target_address = "[email protected]"

Component "speakerstats.jitsi-dev.therapie.de" "speakerstats_component"
    muc_component = "conference.jitsi-dev.therapie.de"

Component "conferenceduration.jitsi-dev.therapie.de" "conference_duration_component"
    muc_component = "conference.jitsi-dev.therapie.de"

Component "jitsi-videobridge.jitsi-dev.therapie.de"
    component_secret = "xxxxxxxxxxxxxxxxx"

@damencho
Copy link
Member

@virtuaris if you are reproducing the issue, can you comment

Component "conferenceduration.jitsi-dev.therapie.de" "conference_duration_component"
    muc_component = "conference.jitsi-dev.therapie.de"

and see is it reproducible like that?

@virtuaris
Copy link

In the previous session, the timer remained at 00:00. After commenting out the component and restarting Prosody, the timer starts in a new session at the time of the duration of the previous session and continues to count up.

@damencho
Copy link
Member

In the previous session, the timer remained at 00:00. After commenting out the component and restarting Prosody, the timer starts in a new session at the time of the duration of the previous session and continues to count up.

And that is when using web?

@virtuaris
Copy link

In the previous session, the timer remained at 00:00. After commenting out the component and restarting Prosody, the timer starts in a new session at the time of the duration of the previous session and continues to count up.

And that is when using web?

Yes. Sorry for not mentioning that. We use Jitsi in web-context only.

@damencho
Copy link
Member

You can try debugging it, adding a print here:


which room and the value it adds.

Same here:

room.created_timestamp = os.time() * 1000; -- Lua provides UTC time in seconds, so convert to milliseconds

and put a print the int else if for some reason it was pre-set somewhere.

And see the values ... when you see a room with broken duration.

@virtuaris
Copy link

@damencho
Thx a lot. I'll do and let you know the outcome.

@virtuaris
Copy link

I add log statements for debugging in mod_conference_duration.lua:

function getMeetingCreatedTSConfig(room)
    module:log('info', 'getMeetingCreatedTSConfig() returns %s for room %s', room.created_timestamp or "", room);
    return {

and

function occupant_joined(event)
[...]
  if participant_count > 1 then
        if room.created_timestamp == nil then
            room.created_timestamp = os.time() * 1000; -- Lua provides UTC time in seconds, so convert to milliseconds
        else
            module:log('info', 'Hook occupant_joined() says timestamp is already set: %s', room.created_timestamp);
        end
    end

And this is prosody.log for a moderator opening a new session and one participant joining the session:

Jun 25 21:11:58 mod_bosh        info    New BOSH session, assigned it sid 'c13cd064-0e47-471a-a448-459b6a6c6f37'
Jun 25 21:11:58 boshc13cd064-0e47-471a-a448-459b6a6c6f37        info    Authenticated as [email protected]
Jun 25 21:11:59 jitsi-dev.therapie.de:muc_lobby_rooms   info    Lobby room jid = therapie-videositzung-id-mjz4hqgiihkj76jo@lobby.jitsi-dev.therapie.de created from:<nil>
Jun 25 21:12:00 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719342719000 for room MUC room (therapie-videositzung-id-mjz4hqgiihkj76jo@conference.jitsi-dev.therapie.de)
Jun 25 21:12:00 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719342719000 for room MUC room (therapie-videositzung-id-mjz4hqgiihkj76jo@conference.jitsi-dev.therapie.de)
Jun 25 21:12:41 mod_bosh        info    New BOSH session, assigned it sid '8a05caf3-8972-45a3-be19-3e73b5482c21'
Jun 25 21:12:41 bosh8a05caf3-8972-45a3-b3e73b5482c21        info    Authenticated as [email protected]
Jun 25 21:12:46 jitsi-dev.therapie.de:conference_duration       info    Hook occupant_joined() says timestamp is already set: 1719342719000
Jun 25 21:12:47 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719342719000 for room MUC room (therapie-videositzung-id-mjz4hqgiihkj76jo@conference.jitsi-dev.therapie.de)

Unix timestamp 1719342719000 is 21:11:59 for my timezone (gmt +2).

@damencho
Copy link
Member

And the UI was showing something else?

@virtuaris
Copy link

And the UI was showing something else?

To be honest, I don't understand the question. The UI does not show the time but the duration of the current session.

According to a logic that I don't understand yet, sometimes the counter at the beginning of a session is at 00:00 and gets stuck at this value, but sometimes the counter starts with the value of the length of a previous session and continues to count up.

Could you please explain to me how the counter works in principle? From mod_conference_duration.lua it is not clear to me with my limited knowledge of Prosody.

@damencho
Copy link
Member

damencho commented Jun 26, 2024

To be honest, I don't understand the question. The UI does not show the time but the duration of the current session.

I was asking with the provided logs, what was the experience in the UI?

Could you please explain to me how the counter works in principle? From mod_conference_duration.lua it is not clear to me with my limited knowledge of Prosody.

When the first occupant that is not jicofo (jicofo is the first to enter a meeting) joins and there is no created_timestamp for the room we store that value.

if room.created_timestamp == nil then

When a client queries the room disco-info we put that value in the response, and from there the client can see when the meeting started and can start the counter from that time.

table.insert(event.form, getMeetingCreatedTSConfig(event.room));

The room object is destroyed once the last participant leaves the room and so is the value that was stored.

@virtuaris
Copy link

Does this mean that the responsibility for increasing the counter is with the client?
Since the timestamps in my log look good to me, it might make sense to look at the parts of the code where the result from getMeetingCreatedTSConfig() is processed.
Do you know where this can be found?

@damencho
Copy link
Member

Does this mean that the responsibility for increasing the counter is with the client?

yes.

Since the timestamps in my log look good to me, it might make sense to look at the parts of the code where the result from getMeetingCreatedTSConfig() is processed.
Do you know where this can be found?

Yep, the disco-info response is handled here: https://github.com/jitsi/lib-jitsi-meet/blob/ec98b02095f806ca284d656965e2aba05bc0b2f8/modules/xmpp/ChatRoom.js#L377

@virtuaris
Copy link

To be honest, I don't understand the question. The UI does not show the time but the duration of the current session.

I was asking with the provided logs, what was the experience in the UI?

In that particular example the UI displayed a 00:00 counter without counting up. But i did not expect any changes anyway since my code does not change anything.

@damencho
Copy link
Member

In the 0:0 case, I wonder was the disco info received.

@damencho
Copy link
Member

When this happens again, you can execute in the js console of the browser: APP.conference.saveLogs(). This will save a file with all the signalling, where you can check about the replay of the disco info, and you can also check the console logs, are there any errors or something?

@virtuaris
Copy link

In the 0:0 case, I wonder was the disco info received.

I guess so since i don't see the No conference duration from backend warning in the console logs.

@virtuaris
Copy link

@damencho Sry for the late reply, too much other work to do.

I had to play around a bit because we start Jitsi via the iFrame API. Of course APP.conference.saveLogs() doesn't work in this context. But I managed to use the standard (web) way to start a session.

Starting the session the logs from mod_conference_duration.lua were:

Jun 26 23:35:40 mod_bosh        info    New BOSH session, assigned it sid '5a01eec9-9045-41e2-877a-3c9b38fc4e42'
Jun 26 23:35:40 bosh5a01eec9-9045-41e2-877a-3c9b38fc4e42        info    Authenticated as [email protected]
Jun 26 23:35:41 jitsi-dev.therapie.de:muc_lobby_rooms   info    Lobby room jid = therapie-videositzung-id-btbzld9w8fcy0i7g@lobby.jitsi-dev.therapie.de created from:<nil>
Jun 26 23:35:42 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719437741000 for room MUC room (therapie-videositzung-id-btbzld9w8fcy0i7g@conference.jitsi-dev.therapie.de)
Jun 26 23:35:42 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719437741000 for room MUC room (therapie-videositzung-id-btbzld9w8fcy0i7g@conference.jitsi-dev.therapie.de)
Jun 26 23:45:09 mod_bosh        info    New BOSH session, assigned it sid '862f1773-0683-4120-8022-b0dc8a0c1d34'
Jun 26 23:45:10 bosh862f1773-0683-4120-8022-b0dc8a0c1d34        info    Authenticated as [email protected]
Jun 26 23:45:11 jitsi-dev.therapie.de:conference_duration       info    Hook occupant_joined() says timestamp is already set: 1719437741000
Jun 26 23:45:11 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719437741000 for room MUC room (therapie-videositzung-id-btbzld9w8fcy0i7g@conference.jitsi-dev.therapie.de)
Jun 26 23:45:11 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719437741000 for room MUC room (therapie-videositzung-id-btbzld9w8fcy0i7g@conference.jitsi-dev.therapie.de)
Jun 26 23:45:15 jitsi-dev.therapie.de:conference_duration       info    getMeetingCreatedTSConfig() returns 1719437741000 for room MUC room (therapie-videositzung-id-btbzld9w8fcy0i7g@conference.jitsi-dev.therapie.de)

(I used the same JWT twice to join the session with two participants)

The counter was 00:00 and stayed that way.

Using APP.conference.saveLogs() i found within the output:

<field label="The meeting created_timestamp." type="text-single" var="muc#roominfo_created_timestamp"><value>1.71944e+12</value></field>

I assume that 1.71944e+12 is a unix timestamp in milliseconds. Converted it represents Wed Jun 26 2024 22:13:20 GMT+0000 whereas the timestamp from the logs (1719437741000) points to Wed Jun 26 2024 21:35:41 GMT+0000, which is indeed the (UTC) time i started the session.

@damencho
Copy link
Member

Good catch. Strange is that I cannot reproduce this. I set the same value in my local instance and tested it and I get:

<field type = 'text-single' label = 'The meeting created_timestamp.' var = 'muc#roominfo_created_timestamp'>
                <value>1719437741000</value>
            </field>

Seems it is some local lua locale setting or something ... strange.

@damencho
Copy link
Member

If you replace this line:

room.created_timestamp = os.time() * 1000; -- Lua provides UTC time in seconds, so convert to milliseconds

with: room.created_timestamp = string.format('%i', os.time() * 1000); do you still reproduce receiving values like 1.71944e+12?

@virtuaris
Copy link

Yesss! This fixes the problem. I see a valid integer expression in muc#roominfo_created_timestamp now. The counter in the UI works like expected.

@damencho , thank you so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants