-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Events no longer sent to application service, and no way to debug #13142
Comments
Hmm, do you have any rows containing your appservice ID in If you are sending events that should indeed be forwarded to your appservice, but none are being sent, then my theory is that unsent transactions in this table may be blocking new ones. Additionally, have you defined any |
I have nothing in
This hasn't caused any change in behavior. |
What else can I do to diagnose? |
I'd suggest turning Synapse's logging up to DEBUG level, if you haven't already. |
Any other things I can do? Still stuck. |
Can you do the following please?
If you can then send us the logs from the restart up to the end of step 3, we can take a look. (Given that they're debug logs, they will likely contain sensitive information that you may not want to publish. If so, please email them to |
Also:
was this just read-only poking, or were you altering/adding/delting rows during your investigation? |
@DMRobertson mostly read-only. At the very beginning when I started to experience this issue, there was a row in the So after being stuck for a while longer, I inserted a row there again to see if anything would change, and it didn't. Other poking was read-only. I'll try the steps you suggested above. |
Sent you the log and related info in chat. Thanks for your willingness to help! |
Thanks for the logs. I'm really not familiar with how application services work, but this looks to be the function which pushes events to ASes. There are no matches for synapse/synapse/appservice/api.py Lines 311 to 344 in 3371e1a
This is called by |
We can see that Synapse is looking to see if there are any events it should send to ASes:
Let's assume for now that this does pick up an event to send to your AS. Each such event is only sent to appservices which are "interested" in that event. synapse/synapse/handlers/appservice.py Lines 781 to 801 in c52abc1
The logic which controls whether or not an AS is interested in an event is here. synapse/synapse/appservice/__init__.py Lines 247 to 284 in 7bc08f3
|
In short an AS will only get told about events:
From the configuration posted in this issue's description:
This is an application service which is interested in
So I think you're not seeing events sent to that application service, because your application service hasn't registered an interest in seeing events for anyone whose ID doesn't begin with namespaces:
users:
exclusive: false
regex: ".*:cit.chat" and let me know if that helps. (The docs https://matrix-org.github.io/synapse/latest/application_services.html could probably be improved. It speaks of a group_id which I don't recognise from the source code??!) |
@aggieben: Have you managed to make progress here by changing the config? |
@DMRobertson yep, I updated the config as follows:
The alias and rooms regexes both indicate the same |
Great, thanks for following up. |
Description
Copying from #5957 (comment)
I'm trying to write an appservice, and when I first started I was getting transaction PUTs. The request would fail (the AS I'm writing is very much WIP), and I'd see logs emitted by the scheduler indicating increased waiting periods for trying again. But now I'm in a state where it doesn't even try, and I haven't been able to figure out how to make it try. #1834 isn't my issue as
appservice_stream_position.event_ordering
is the same asevents.stream_ordering
in my case.After poking around in the DB on my own trying to make sense of it, I no longer have a row in
application_service_state
(similarly to #5957 (comment)), even though synapse does still recognize it at startup. Restarting synapse hasn't made any difference.I haven't yet even figured out a way to begin troubleshooting, really.
One update from the original comment: I left everything running for a couple days and after I came back to it there was one more attempted PUT to my AS, but it failed and there haven't been any further attempts, and no logs indicate what the problem is.
Steps to reproduce
I have a homeserver that is configured mostly with defaults; no identity service is running, and I don't even understand most of the commented-out elements in the configuration file.
I did create and configure a registration for my appservice, and the homeserver appears to be recognizing the registration YAML correctly.
Homeserver
cit.chat
Synapse Version
1.61.0
Installation Method
Debian packages from packages.matrix.org
Platform
Azure VM, Standard B1ms (1 vcpu, 2 GiB memory)
Ubuntu 20.04
Synapse running under systemd. Current status:
Relevant log output
Anything else that would be useful to know?
Important to remember that the appservice I'm working on is in development, so it's expected that sometimes requests from the homeserver are going to fail.
The text was updated successfully, but these errors were encountered: