Closed worldowner closed 1 year ago
Thanks for your issue. One of your error messages is Due to the open files/sockets limitation
and you use coturn, I want ask you if you can disable this service.
I'm not sure how to disable coturn
in your image without rebuilding it. README doesn't mention any option to control that.
Also this message looks like a warning and "max supported number of TURN Sessions possible is: 524000 (approximately)" is more than enough. In fact I don't even use it, my synapse is configured to use different TURN server so I'd be happy to get rid of it :)
Thats good, then we can just remove the coturn config file and remove the ports forward in the docker command. I only want to be sure that it's not an coturn issue. To be honest, no one of us contributors use coturn in this image we took over from Silvio. We just keep it inside for compatibility reasons. But if that one start to mess up something. It's a good time to remove it. :sweat_smile:
Deleting config file and removing ports forward doesn't prevent coturn
from starting :)
BTW. someone reported a problem with coturn
version that you use in the image (4.5.2) that looks the same as I encounter:
https://github.com/coturn/coturn/issues/683
Thats right, but it will run with default values. So, please remove the file and the forward ports.
But the coturn PR is interesting. :+1:
I tried running coturn
with default values (by deleting my config file and removing port forwarding from docker service) and synapse
still doesn't start.
Messages the same as before? Next step would be, to share your homeserver.yaml config file and information about your host system (linux version, docker version). Please be sure that you remove credentials, tokens server name and IP's from the config file.
Same issue here, all Version above 1.64.0 don't start Synapse. I use Coturn. Last lines when starting the container:
synapse_1 | 0: : ===========Discovering listener addresses: ========= synapse_1 | 0: : Listener address to use: 127.0.0.1 synapse_1 | 0: : Listener address to use: 172.29.0.2 synapse_1 | 0: : ===================================================== synapse_1 | 0: : Total: 1 'real' addresses discovered synapse_1 | 0: : ===================================================== synapse_1 | 0: : NO EXPLICIT RELAY ADDRESS(ES) ARE CONFIGURED synapse_1 | 0: : ===========Discovering relay addresses: ============= synapse_1 | 0: : Relay address to use: 172.29.0.2 synapse_1 | 0: : ===================================================== synapse_1 | 0: : Total: 1 relay addresses discovered synapse_1 | 0: : ===================================================== synapse_1 | 0: : Cannot create pid file: /var/run/turnserver.pid synapse_1 | 0: : pid file created: /var/tmp/turnserver.pid synapse_1 | 0: : IO method (main listener thread): epoll (with changelist) synapse_1 | 0: : WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided synapse_1 | 0: : Wait for relay ports initialization... synapse_1 | 0: : relay 172.29.0.2 initialization... synapse_1 | 0: : relay 172.29.0.2 initialization done synapse_1 | 0: : Relay ports initialization done matrix_synapse_1 exited with code 255
It looks like Coturn hangs at "Relay ports initialization done", or its initialization is completed and Synapse doesnt start. Rolling the container back to v1.64.0 and everything works again and I dont get any of the above Coturn logs.
Ok, with the next release, I will add a feature to disable coturn and flag it as deprecated. I will also add these feature to version 1.69.x. Only to give you a working update path to the 1.7x version.
I looked into it, and it looks like the coturn server is fine. If i disable the turnserver in "start.sh", and only start synapse and remove the "&" to actually see the output, i get the following error from synapse:
synapse_1 | 2022-11-01 10:13:45,649 - synapse.federation.federation_server - 1385 - INFO - main - Registering federation query handler for 'profile'
synapse_1 | 2022-11-01 10:13:45,650 - synapse.federation.federation_server - 1365 - INFO - main - Registering federation EDU handler for 'm.presence'
synapse_1 | 2022-11-01 10:13:45,651 - synapse.federation.federation_server - 1365 - INFO - main - Registering federation EDU handler for 'm.typing'
synapse_1 | 2022-11-01 10:13:45,652 - synapse.federation.federation_server - 1385 - INFO - main - Registering federation query handler for 'directory'
synapse_1 | 2022-11-01 10:13:45,653 - twisted - 274 - INFO - main - Redirected stdout/stderr to logs
synapse_1 | 2022-11-01 10:13:45,653 - synapse.app.homeserver - 167 - INFO - sentinel - Running
synapse_1 | 2022-11-01 10:13:45,655 - synapse.app.homeserver - 29 - INFO - sentinel - Set file limit to: 1048576
synapse_1 | 2022-11-01 10:13:45,657 - twisted - 274 - CRITICAL - sentinel - Unhandled Error
synapse_1 | Traceback (most recent call last):
synapse_1 | File "/usr/local/lib/python3.10/dist-packages/twisted/internet/base.py", line 498, in fireEvent
synapse_1 | DeferredList(beforeResults).addCallback(self._continueFiring)
synapse_1 | File "/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py", line 497, in addCallback
synapse_1 | return self.addCallbacks(callback, callbackArgs=args, callbackKeywords=kwargs)
synapse_1 | File "/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py", line 477, in addCallbacks
synapse_1 | self._runCallbacks()
synapse_1 | File "/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py", line 857, in _runCallbacks
synapse_1 | current.result = callback( # type: ignore[misc]
synapse_1 | ---
It looks like Synapse cant start new threads. This is only true for V1.65.0, V1.64.0 can start these threads! I dont have any systemd or docker limits enabeld (at least that I'm aware of).
:thinking: Looks like a limits issue from your system. May I ask where/how you run docker-matrix?
Sure i run it on a Debian 10 Server, Docker version 20.10.3
with the following docker-compose.yaml:
synapse:
image: avhost/docker-matrix:v1.64.0
ports:
- "127.0.0.1:8008:8008"
- "3478:3478"
volumes:
- /opt/matrix/synapse:/data
restart: always
I dont see limits in systemd or docker itself. cat /proc/sys/kernel/threads-max gives me 128106 Number of currently running threads is 1342, this includes Synapse 1.64.0.
Are there other limits i need to check? And why is it that only from v1.65.0 on, that Synapse has suddenly problems spawning threads?
Strange.... Yeah that's a good question. :man_shrugging: I do not have an answer right now and my own instance is also not affected by that. I will ask in our docker-matrix room if someone have an idea.
+1
No feedback from the community. But I add the possibility to disable coturn. (docker tag v1.65.0_av1). If you set the environment COTURN_ENABLE="false"
then it should be disable. Please try and give me feedback. Also do not forget to remove the exposed coturn ports from your docker command. Sorry, I have no other idea. :-(
Unfortunately this did not work for me :(
:-( but thanks for feedback @neurosys-zero
Update: The host was running Debian 9 / Stretch I did a dist-update on her to 10 / Buster, updated the old docker to docker-ce and now any tags later than 1.64 run correctly. :)
:partying_face: thats a great feedback. Thanks a lot @neurosys-zero :-D
I can confirm that it works on Debian 10 or higher. I successfully upgraded to 1.84.1.
@worldowner thanks for feedback.
I start synapse using
avhost/docker-matrix
as a service:Any image newer than 1.64.0 doesn't seem to try to start synapse:
1.64.0 works perfectly fine.