matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
166 stars 146 forks source link

Failed to start Sygnal/Matrix Pusher #232

Closed tom-zemingo closed 3 years ago

tom-zemingo commented 3 years ago

It seems like the Sygnal process is constantly 'activating'. Tried to change the port number via the sygnal.yaml file, tried to stop & start the sygnal process (and the server) and tried to kill the process. All attempts were no useful and the service is still not running.

I get the following: Jun 20 15:04:24 ip-10-0-1-29 bash[3425]: 2021-06-20 15:04:24,025 [3425] INFO [_legacy.py:154] twisted SygnalLoggedSite starting on 8008 Jun 20 15:04:24 ip-10-0-1-29 bash[3425]: 2021-06-20 15:04:24,026 [3425] INFO [_legacy.py:154] twisted Starting factory <sygnal.http.SygnalLoggedSite object at 0x7f240e8c3ad0> Jun 20 15:05:53 ip-10-0-1-29 systemd[1]: sygnal.service: Start operation timed out. Terminating. Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: 2021-06-20 15:05:53,747 [3425] INFO [_legacy.py:154] twisted Received SIGTERM, shutting down. Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: 2021-06-20 15:05:53,748 [3425] INFO [_legacy.py:154] twisted (TCP Port 8008 Closed) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: 2021-06-20 15:05:53,748 [3425] INFO [_legacy.py:154] twisted Stopping factory <sygnal.http.SygnalLoggedSite object at 0x7f240e8c3ad0> Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: Unhandled error in Deferred: Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: 2021-06-20 15:05:53,763 [3425] CRITICAL [_legacy.py:154] twisted Unhandled error in Deferred: Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: Traceback (most recent call last): Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 460, in callback Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: self._startRunCallbacks(result) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: self._runCallbacks() Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: current.result = callback(current.result, *args, **kw) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 1475, in gotResult Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: _inlineCallbacks(r, g, status) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: --- --- Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: result = g.send(result) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/sygnal/sygnal.py", line 175, in _make_pushkins_then_start Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: self.reactor.listenTCP(port, pushgateway_api.site, interface=interface) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/posixbase.py", line 495, in listenTCP Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: p.startListening() Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/tcp.py", line 1363, in startListening Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: raise CannotListenError(self.interface, self.port, le) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: twisted.internet.error.CannotListenError: Couldn't listen on :::8008: [Errno 98] Address already in use. Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: 2021-06-20 15:05:53,768 [3425] CRITICAL [_legacy.py:154] twisted Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: Traceback (most recent call last): Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/tcp.py", line 1361, in startListening Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: skt.bind(addr) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: OSError: [Errno 98] Address already in use Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: During handling of the above exception, another exception occurred: Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: Traceback (most recent call last): Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: result = g.send(result) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/sygnal/sygnal.py", line 175, in _make_pushkins_then_start Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: self.reactor.listenTCP(port, pushgateway_api.site, interface=interface) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/posixbase.py", line 495, in listenTCP Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: p.startListening() Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: File "/home/ubuntu/work/therapicx-sygnal/venv/lib/python3.7/site-packages/twisted/internet/tcp.py", line 1363, in startListening Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: raise CannotListenError(self.interface, self.port, le) Jun 20 15:05:53 ip-10-0-1-29 bash[3425]: twisted.internet.error.CannotListenError: Couldn't listen on :::8008: [Errno 98] Address already in use. Jun 20 15:05:53 ip-10-0-1-29 systemd[1]: sygnal.service: Failed with result 'timeout'. Jun 20 15:05:53 ip-10-0-1-29 sudo[3421]: pam_unix(sudo:session): session closed for user root Jun 20 15:05:53 ip-10-0-1-29 systemd[1]: Failed to start Sygnal/Matrix Pusher.

What am I missing?

clokep commented 3 years ago

This looks like it is trying to bind in an in-use port.

There's a #sygnal:matrix.org channel which can be used for discussion, please redirect support queries there!

tom-zemingo commented 3 years ago

@clokep where can I find #sygnal:matrix.org channel? Can you send a link?

clokep commented 3 years ago

Can you send a link?

https://matrix.to/#/#sygnal:matrix.org

It should be joinable from any Matrix channel.