Jigasi Exception with JWT Token In-place

Greeting,

I configured Jitsi Meet to work with JWT tokens, before I start using JWT Jigasi was working fine, However with JWT in place looks like it is not able to connect to Prosody or to the meetings anymore as Token is required, I am currently getting the below exceptions and error awhile inviting a Phone user into an existing meeting :

Prosody Logs :
Dec 26 01:11:35 general warn Error verifying token err:not-allowed, reason:token required

Jigasi Logs :
2018-12-26 00:49:22.104 WARNING: [86] org.jivesoftware.smack.sasl.SASLError.fromString() Could not transform string 'not_allowed' to SASLError java.lang.IllegalArgumentException: No enum constant org.jivesoftware.smack.sasl.SASLError.not_allowed at java.lang.Enum.valueOf(Enum.java:238) at org.jivesoftware.smack.sasl.SASLError.valueOf(SASLError.java:27) at org.jivesoftware.smack.sasl.SASLError.fromString(SASLError.java:51) at org.jivesoftware.smack.sasl.packet.SaslStreamElements$SASLFailure.<init>(SaslStreamElements.java:209) at org.jivesoftware.smack.util.PacketParserUtils.parseSASLFailure(PacketParserUtils.java:797) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1099) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016) at java.lang.Thread.run(Thread.java:748) 2018-12-26 00:49:22.107 SEVERE: [83] impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin().978 Failed to connect to XMPP service org.jivesoftware.smack.sasl.SASLErrorException: SASLError using ANONYMOUS: not-allowed at org.jivesoftware.smack.SASLAuthentication.authenticationFailed(SASLAuthentication.java:292) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1100) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016) at java.lang.Thread.run(Thread.java:748) 2018-12-26 00:49:22.132 SEVERE: [89] org.jivesoftware.smack.AbstractXMPPConnection.run() Exception in async packet listener java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106) at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097) at net.java.sip.communicator.impl.protocol.jabber.extensions.caps.EntityCapsManager.removeUserCapsNode(EntityCapsManager.java:362) at net.java.sip.communicator.impl.protocol.jabber.extensions.caps.EntityCapsManager$CapsPacketListener.processStanza(EntityCapsManager.java:941) at org.jivesoftware.smack.AbstractXMPPConnection$5.run(AbstractXMPPConnection.java:1233) 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) 2018-12-26 00:49:22.133 WARNING: [91] org.jivesoftware.smack.roster.Roster.processStanza() Roster not loaded while processing Presence Stanza [id=7Ozbv-30,type=error,]

It would be great if someone can advise what might be missing, I understand I need to use tokens for Jigasi connections However I am not clear where I should configure it to work with tokens.

Best Regards,
Abada

You can configure a separate virtualhost that does not require jwt and create a jigasi user there and configure authentication for jigasi. https://github.com/jitsi/jigasi/blob/master/jigasi-home/sip-communicator.properties#L84

1 Like

Thanks @damencho I managed to get it running.

Hi @Unixme_Egypt, how did you managed to fix it? I’m encountering some similar errors

Hi @gui-vieira

Share the error you’re facing please.

Best Regards,
Mohamed Abada