matrix-org / sygnal

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

Service not starting when fcm configured #164

Closed kueueue closed 3 years ago

kueueue commented 3 years ago

Got two configured apns and sygnal starts and works correctly. When I add to sygnal.yaml third one - type gcm - systemctl start returns no error, but service not running (endpoint _matrix/push/v1/notify returns 502). Running it with python -m sygnal.sygnal returns:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/lib/python2.7/runpy.py", line 119, in _get_module_details
    code = loader.get_code(mod_name)
  File "/usr/lib/python2.7/pkgutil.py", line 281, in get_code
    self.code = compile(source, self.filename, 'exec')
  File "/home/user/sygnal_push_service/sygnal-0.8.2/sygnal/sygnal.py", line 38
    CONFIG_DEFAULTS: dict = {
                   ^

My config for FCM (type gcm):

com.my.app.id: type: gcm api_key: xx

clokep commented 3 years ago

@kueueue I think some the exception is missing from the logs you showed. Are there any more lines there?

You might try asking in #sygnal:matrix.org for support.

reivilibre commented 3 years ago

You need to use Python 3 rather than Python 2.7 :)

kueueue commented 3 years ago

You need to use Python 3 rather than Python 2.7 :)

Running

python3 -m sygnal.sygnal

returns

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/user/sygnal_push_service/sygnal-0.8.2/sygnal/sygnal.py", line 24, in <module>
    import opentracing
ModuleNotFoundError: No module named 'opentracing'
clokep commented 3 years ago

@kueueue You need to properly install the requirements for your python 3 virtualenv.