On my production Matterbridge install, I noticed that the XMPP user had disconnected. Looking at my systemd logs showed the following:
Jun 28 15:54:55 strugee-net-failover matterbridge-0.15.0[18735]: <message type='groupchat' to='[email protected]/56f3bc79-fe64-4835-8404-096e99ce113a' from='[email protected]/irc-social' xml:lang='en'><body><cwebber2> q?</body></message>
Jun 28 15:54:55 strugee-net-failover matterbridge-0.15.0[18735]: <message type='groupchat' to='[email protected]/56f3bc79-fe64-4835-8404-096e99ce113a' from='[email protected]/irc-social' xml:lang='en'><body><Zakim> Zakim sees no one on the speaker queue</body></message>
Jun 28 15:54:56 strugee-net-failover matterbridge-0.15.0[18735]: <message type='groupchat' to='[email protected]/56f3bc79-fe64-4835-8404-096e99ce113a' from='[email protected]/irc-social' xml:lang='en'><body><puckipedia> it'd show the summary</body></message>
Jun 28 15:55:20 strugee-net-failover matterbridge-0.15.0[18735]: <message type='groupchat' to='[email protected]/56f3bc79-fe64-4835-8404-096e99ce113a' from='[email protected]/irc-social' xml:lang='en'><body><puckipedia> scribenick: puckipedia</body></message>
Jun 28 15:55:23 strugee-net-failover matterbridge-0.15.0[18735]: <stream:error><not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>
Here's my config file:
[irc]
[irc.w3c]
Server="irc.w3.org:6667"
Nick="xmpp-social"
RemoteNickFormat="[{NICK}] "
[xmpp]
[xmpp.koderoot]
Server="im.koderoot.net:5222"
Jid="[email protected]"
Password="<password redacted>"
Muc="muc.im.koderoot.net"
Nick="irc-social"
RemoteNickFormat="<{NICK}> "
[[gateway]]
name="gateway1"
enable=true
[[gateway.inout]]
account="irc.w3c"
channel="#social"
[[gateway.inout]]
account="xmpp.koderoot"
channel="w3social"
If really necessary I can adjust my systemd unit to invoke Matterbridge with -debug, but I'd rather not as it will probably take a while for this to happen again and in the meantime my logs will fill up.
For reference, the last IRC message sent before the bridge disconnected was from user puckipedia, who said: scribenick: puckipedia. The message that seemed to cause the malformed packet is here: https://chat.indieweb.org/social/2017-06-28#t1498665324747000
It includes some funky Unicode, perhaps that was it? Happy to file a separate issue if you want to track the buggy XMPP packet generation code separately from the error-handling. Note that nothing was said on the XMPP side at the time.
I'm running version 0.15.0 822605c as reported by matterbridge -version.
Just confirmed that the Unicode was the problem - filed #210 to track the fact that Matterbridge is generating malformed stanzas. I think this one should probably be kept open though - if another bug like this happens in the future, it really shouldn't break everything. The program should just handle the error.
The problem here is with the underlaying library. Maybe it's better to open a bug report there.
I fixed the charset/unicode issue though, so your problem should be fixed for now
@42wim I can definitely file this upstream. What XMPP library does Matterbridge use?
@strugee that would be https://github.com/mattn/go-xmpp
Thanks!
This completely dropped off my radar lol, but I just filed mattn/go-xmpp#96 :thumbsup:
Sorry for the (extreme) delay!
Thanks!
Most helpful comment
Thanks!