-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
500 errors when leaving or kicking in a room #16191
Comments
Sounds like Relevant source: synapse/synapse/handlers/message.py Lines 1241 to 1265 in 40901af
This suggests that your What does the following SQL give you?
|
This is likely element-hq/element-web#24392
I'm afraid there's nothing in your logs that demonstrates this; can you see any errors or warnings corresponding to federated rooms? E.g. grep logs for |
couldnt find any events with that grep the output was
the last minute of logs after I've went into matrix.org rooms and scrolled up (which still haven't gotten any new messages through since thursday the 17th)
|
the output of the SQL query is
I didn't think I got any errors when porting from sqlite3 but maybe I missed something idk is there a way to like factory reset it or something? |
Try
If this was the case, I doubt Synapse would start; double check what tables you can see by running |
this is the output
sorry haven't really had to go into any of my db containers so this is kind of new to me, I've
|
I tried to send a message to the synapse admin room and it failed this is the logs:
|
You haven't managed to get into the database correctly. I think you'll have to read up on how to do this with the postgres container that you're running. E.g. it might be that you need to set a search path, or login as the right role. I think the best place to get advice is a) the documentation for your postgres docker image, and b) the Synapse Admins room. (Since it seems that your homeserver is inoperable at the moment, you can sign up for an account on the Matrix.org homeserver in order to reach the support room.) |
managed to figure it out (just had to switch db sry big noob) here is the output of
and the output of the original SQL query is now
|
That suggests that Synapse doesn't know about the latest set of events in that room. Again, this shouldn't normally happen. My best guess is that the porting from sqlite to postgres went wrong. Do you have any logs from the port_db script? Do you have a backup of the sqlite DB that you can rerun the query on? |
Are the logs from the port_db script saved anywhere or would I have had to save it after it ran cos if that the case then I dont have any logs, however I do still have the homeserver.db and the homeserver.db.snapshot files |
Unfortunately not. In that case, can you load up the most recent backup of the database ( |
Sry I'm probably doing something obviously wrong this is the output (I've done
|
is there a way for me to start again with a blank database? |
Ahh, I've just noticed a mistake of mine. The room ID in the query has SELECT e.event_id FROM event_forward_extremities AS f
INNER JOIN events AS e USING (event_id)
WHERE f.room_id = '!sRHNtYGJcSmVtNOtMu:matrix.tazy.xyz'
ORDER BY e.depth DESC
LIMIT 10; on postgres please? |
still give the same output:
however doing the same query on the sqlite3 homeserver.db I get the following output:
Thanks for helping me with this |
That's surprising. It suggests that your sqlite DB knew about the room in question, but your postgres DB doesn't. Have you tried to purge this room using the admin API after porting to postgres? Can you additionally run SELECT count(*) FROM current_state_events
WHERE room_id = '!sRHNtYGJcSmVtNOtMu:matrix.tazy.xyz' AND type = 'm.room.member' AND state_key LIKE '%:matrix.tazy.xyz'; against postgres and sqlite please? |
No im unsure how to do that ill give it a go but out rn managed to get the sql qurries run tho I ran the following curl command for the admin api
output for sqlite3
ill edit when i get back to pc |
It sounds like the porting process errored or didn't finish somehow then. You can try purging the room (https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#version-2-new-version) which will delete everything your server knows about this room. Be sure you want to do this: if there are no other homeservers in that room, that room's history will be gone forever. |
Thanks tbh I haven't really used matrix that much I did join a few rooms but haven't really sent that many messages to them I was hoping to migrate from discord but none of my friends want to so its just kind of sat there for a while too. I went back and edited the last comment I'll repeat I ran the following curl command for the admin api |
wrap the URL in quotes. |
edit: I don't think the purge goes at the end of the url but in the header so I've modified to I made a python script using Matrix Tutorial #5 on youtube import requests
host = "<Internal-IP>:8008"
access_token = "Admin User Access Token"
headers = {
"Authorization": "Bearer "+access_token,
"purge": "true"
}
r = requests.delete("http://"+host+"/_synapse/admin/v2/rooms/!GtIfdsfQtQIgbQSxwJ:archlinux.org/", headers=headers) the output of this is
BTW I'm using the internal room ID for the archlinux room |
import requests
host = "127.0.0.1:8008"
access_token = ""
headers = {
"Authorization": "Bearer "+access_token,
}
body = {
"purge": True
}
r = requests.delete("http://"+host+"/_synapse/admin/v2/rooms/!GtIfdsfQtQIgbQSxwJ:archlinux.org", headers=headers, json=body)
print(r.json()) This python script seems to have worked got this response
|
I can't send any messages to any local rooms This is logs from an attempt to send a message to a local room with my main admin account
when I tried to purge the sememcraft room (dm between my main tazy account and sememcraft account) I get the following error
|
Description
Constant failures when doing things like trying to leave rooms, removing users from rooms, notifications not going away after viewing messages, and federated rooms not loading consistently I get the following error:
and if you go to the link this is the raw data
Also federated rooms like the synapse admin room doesn't federate properly like ill open element and it'll load and I click on that room and the last message was from a week ago
Steps to reproduce
Removing users from rooms
Trying to leave rooms
Homeserver
https://matrix.tazy.xyz
Synapse Version
{"server_version":"1.90.0","python_version":"3.11.4"}
Installation Method
Docker (matrixdotorg/synapse)
Database
postgresql:latest
Workers
Single process
Platform
I have synapse running in a docker host with multiple other containers mostly activity pub instances, lemmy, peertube, mastodon but also wireguard and jellyfin, I have 6Gb RAM dedicated and 4cpus. I'm also running a discord bridge (thats kind of working some of the time) and a signal bridge I also attempted slinding sync but i dont think its working it infinitely syncs when I try to sign in on element x android. I'm accessing synapse through Nginx Proxy Manager with the following custom config in the advanced tab:
there is no custom config for the custom locations tab within nginx proxy manager just the advanced tab
Configuration
I haven't really done much with the config file other than the bridges previously mentioned.
Relevant log output
Anything else that would be useful to know?
I recently migrated from SQLite3 to postgres so I'm not sure if I fucked up with that and if I have how would I fix it?
The text was updated successfully, but these errors were encountered: