matrix-appservice-discord icon indicating copy to clipboard operation
matrix-appservice-discord copied to clipboard

Matrix messages not getting relayed to Discord

Open jannis3005 opened this issue 4 years ago • 6 comments

I've setup the discord bridge for some time now and it has been working great so far. but for some time now, when a matrix user joins/leaves a discord channel, it get's announces on the discord server accordingly, but whenever a matrix user sends a message, it doesnt appear in discord, and the log just contains [DiscordBot] warn: Failed to send message . Messages from Discord get shown in matrix room as expected and bot is in the channel and shown online.

I've tried readding the bot to the server, leaving and then joying again and i've tried sending messages to two different discord servers and none of that worked. `

Could someone point me to where i find more info on why it doesnt work other than failed to send message / Does anybody have a clue on why it might not be working?

jannis3005 avatar Apr 21 '21 08:04 jannis3005

We have an unresolved issue with Discord bridge. It seems some event has caused bridge to stop relaying and Synapse is trying to send messages to it into queue that is never sent.

Situation seems to be: push_bulk fails due to 504, and nothing is logged by the bridge. Bridge ignores all new events so nothing is sent m->d. Synapse backs off exponentially and we don't know of a way to trigger it to debug further.

If you find this kind of error in synapse logs, you probably found the same issue:

synapse.http.client - 454 - INFO - as-sender-discord-bridge-165 - Error sending request to PUT http://localhost:9005/transactions/429303?access_token=: RequestTimedOutError 504: Timeout waiting for response from remote server

In reality the bridge is running and answers port 9005. This started happening few weeks ago without any changes done to bridge.

Currently there is no known solution expect decommission the bridge and use t2bot.io one which still seems to work. You can't even !discord unbridge as the bridge doesn't respond to any new events.

vranki avatar Apr 21 '21 09:04 vranki

Im not seting timeout errors but im seeing connection refused erros for push_bulk "Connection was refused by other side: 111 : Connection refused." And my bot responds to !discord help and !discord unbridge commands

jannis3005 avatar Apr 21 '21 09:04 jannis3005

We have an unresolved issue with Discord bridge. It seems some event has caused bridge to stop relaying and Synapse is trying to send messages to it into queue that is never sent.

Situation seems to be: push_bulk fails due to 504, and nothing is logged by the bridge. Bridge ignores all new events so nothing is sent m->d. Synapse backs off exponentially and we don't know of a way to trigger it to debug further.

If you find this kind of error in synapse logs, you probably found the same issue:

synapse.http.client - 454 - INFO - as-sender-discord-bridge-165 - Error sending request to PUT http://localhost:9005/transactions/429303?access_token=: RequestTimedOutError 504: Timeout waiting for response from remote server

In reality the bridge is running and answers port 9005. This started happening few weeks ago without any changes done to bridge.

Currently there is no known solution expect decommission the bridge and use t2bot.io one which still seems to work. You can't even !discord unbridge as the bridge doesn't respond to any new events.

Fairly sure this started happening to me after i botched my network setup for a good week. Not sure how to fix, but that's an idea for triggering it.

theAeon avatar Dec 09 '21 19:12 theAeon

As a meta-answer, I suggest using mx-puppet-discord instead of this bridge if self-hosting. It is capable for same type of non-puppeted bridging and seems to be more robust. https://github.com/matrix-discord/mx-puppet-discord

vranki avatar Dec 10 '21 08:12 vranki

is there any progress to this bug? i'm having the same issue? i see its listed as a defect now, but is it being looked into? mx-puppet-discord looks outdated which is why i'm here

Mrs-Feathers avatar Aug 06 '23 00:08 Mrs-Feathers

any fix? nothing is delivering

Wamy-Dev avatar Nov 09 '23 03:11 Wamy-Dev