Open h0jeZvgoxFepBQ2C opened 4 years ago
Someone here has the same problem: https://community.jitsi.org/t/focus-issue-on-a-jwt-secured-domain/52240
Same error.
Hi @h0jeZvgoxFepBQ2C and @fritzfr!
So, i'm not sure that this error is strictly related to this plugin, I know there is "extra config" to make Jibri works with authentication (any method) you can see #3 for more information and I have no idea about Jigasi.
I'm running this plugin with a fork of luajwt and its working flawless.
Try to remove the this plugin to see how Jitsi handle it, probably this is a misconfiguration of the authentication plugin.
I think this is the same problem as I was having. I managed to fix it by tweaking the code to match the normal Jitsi affiliation setting, which looks at the 'admins' setting. Added a pull request with that: https://github.com/nvonahsen/jitsi-token-moderation-plugin/pull/10
Have merged @GeoffRichards pull request, i'd noticed this error in the past but never noticed any problems caused by it but hopefully this gives a solution
it's still persist, i'm still encounter the problem with latest mod_token_moderation, any updates from @h0jeZvgoxFepBQ2C ?
No sorry, we moved to BigBlueButton anyway due to better performance/featureset..
Hi @ne018 !
Do you have any logs that you can share ?
Hi @ne018 !
Do you have any logs that you can share ?
here's my error log from jicofo:
Jicofo 2020-07-09 11:04:04.533 SEVERE: [29] org.jitsi.jicofo.ChatRoomRoleAndPresence.log() Failed to grant owner status to 61a03ffc-9f6e-4771-aa42-194a9ba6d0f5@jitsimeetdomain.com/VMizvxSK java.lang.RuntimeException: Failed to grant owner: <iq to='focus@auth.jitsimeetdomain.com/focus560766649013889' from='d6qa-45p-n7b@conference.jitsimeetdomain.com' id='zzdLw-728' type='error'><error type='modify'><not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq> at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.grantOwnership(ChatRoomImpl.java:808) at org.jitsi.jicofo.ChatRoomRoleAndPresence.grantOwner(ChatRoomRoleAndPresence.java:332) at org.jitsi.jicofo.ChatRoomRoleAndPresence.checkGrantOwnerToAuthUser(ChatRoomRoleAndPresence.java:357) at org.jitsi.jicofo.ChatRoomRoleAndPresence.memberPresenceChanged(ChatRoomRoleAndPresence.java:163) at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.lambda$notifyMemberJoined$1(ChatRoomImpl.java:917) at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.notifyMemberJoined(ChatRoomImpl.java:917) at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.processOtherPresence(ChatRoomImpl.java:1212) at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.processPresence(ChatRoomImpl.java:1261) at org.jivesoftware.smackx.muc.MultiUserChat$3.processStanza(MultiUserChat.java:251) at org.jivesoftware.smack.AbstractXMPPConnection$6.run(AbstractXMPPConnection.java:1263) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
then here's my config /etc/prosody/conf.avail/mydomain.com.cfg.lua
`Component "conference.mydomain.com" "muc" storage = "memory" modules_enabled = { "muc_meeting_id"; "muc_domain_mapper"; -- "token_verification"; "token_moderation"; } admins = { "focus@auth.mydomain.com" } muc_room_locking = false muc_room_default_public_jids = true
-- internal muc component `
Note: if i put back to normal usin token_verification (default), the grant ownership works properly, but if u put back the token_moderation , the error still persist.
Note: if i put back to normal usin token_verification (default), the grant ownership works properly, but if u put back the token_moderation , the error still persist.
Hi @ne018 !
As far as I remember you need both, since this plugin only checks the moderation field and does not check the token. That could be the problem.
Could you please send Prosody's log too?
Example of my server:
--- a lot of lines above
Component "conference.jitsi.domain.tld" "muc"
storage = "memory"
modules_enabled = {
"muc_meeting_id";
"muc_domain_mapper";
"token_verification";
"token_moderation";
"presence_logger";
}
admins = { "focus@auth.jitsi.domain.tld" }
muc_room_locking = false
muc_room_default_public_jids = true
--- a lot of lines below
even i put it both, the error still persist
did anyone found solution to this issue?
I sent a pull request for this issue
Hello @psi-4ward,
I closed the pull-request because it causes false possitive "Granted owner" messages on the jicofo log. According to the log, someone seems to gain the moderator status but it's not...
Thanks for your reply. Thats interesting and implies that there is no valid fix for the problem?
I checked the Jicofo log and it seems that the runtime exception is not harmful. It's not nice to see it on the logs but I think it's better than the false log.
And there is no clean way to circumvent this "harmless" error.
I think I found the clean way. It's to disable completely the auto ownership for jicofo
/etc/jitsi/jicofo/sip-communicator.properties
org.jitsi.jicofo.DISABLE_AUTO_OWNER=true
Hi, i played with
org.jitsi.jicofo.DISABLE_AUTO_OWNER=true
when i was trying to solve this thread Grant Moderator with JWT verification and token moderation enabled not working.
Jicofo starts with auto_owning disabled (org.jitsi.jicofo.JitsiMeetGlobalConfig.log() Automatically grant 'owner' role: false
), it might work to some extent, but i still see those errors in jicofo log, jicofo (focus user) is still trying to manage ownership for some reasons.
From my analysis of jicofo code, i think that it would need some jicofo modification here, to get rid of those errors in logs. But as you pointed out, it's just "cosmetic" log entry with no real meaning in this situation.
Or let's try another thing:
room.set_affiliation = function(room, actor, jid, affiliation, reason);
if actor == "token_plugin" then
return _set_affiliation(room, true, jid, affiliation, reason);
elseif affiliation == "owner" then
log('info', 'set_affiliation: room=%s, actor=%s, jid=%s, affiliation=%s, reason=%s', room, actor, jid, affiliation, reason);
if string.match(tostring(actor), "focus@auth") then
log('info', 'report set_affiliation to focus as ok');
return true;
else
return _set_affiliation(room, actor, jid, affiliation, reason);
end;
else
return _set_affiliation(room, actor, jid, affiliation, reason);
end;
end;
Here we report to jicofo user, that affiliation went ok, no error log entries in jicofo.
EDIT: The else part in if string.match
here is our modification to allow users to grant moderator to other users in their session.
I prepared a similar module with a different approch:
Do you have any idea why this doesn't work?