[Bug 290877] net-im/py-matrix-synapse failure on boot

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 07 Nov 2025 18:34:13 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290877

            Bug ID: 290877
           Summary: net-im/py-matrix-synapse  failure on boot
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: atagster@gmail.com
                CC: ports@skyforge.at
                CC: ports@skyforge.at
             Flags: maintainer-feedback?(ports@skyforge.at)

Hi,

The problem in short: rc script missing NETWORKING dependency causes startup
failure on boot

boot log:

Starting synapse.
This server is configured to use 'matrix.org' as its trusted key server via the
'trusted_key_servers' config option. 'matrix.org' is a good choice for a key
server since it is long-lived, stable and trusted. However, some admins may
wish to use another server for this purpose.

To suppress this warning and continue using 'matrix.org', admins should set
'suppress_key_server_warning' to 'true' in homeserver.yaml.
--------------------------------------------------------------------------------
**********************************************************************************
 Error during initialisation:
     Traceback (most recent call last):
       File
"/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 375,
in setup
         hs.setup()
       File "/usr/local/lib/python3.11/site-packages/synapse/server.py", line
363, in setup
         self.datastores = Databases(self.DATASTORE_CLASS, self)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File
"/usr/local/lib/python3.11/site-packages/synapse/storage/databases/__init__.py",
line 78, in __init__
         with make_conn(
              ^^^^^^^^^^
       File
"/usr/local/lib/python3.11/site-packages/synapse/storage/database.py", line
193, in make_conn
         native_db_conn = engine.module.connect(**db_params)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       File "/usr/local/lib/python3.11/site-packages/psycopg2/__init__.py",
line 122, in connect
         conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     psycopg2.OperationalError: connection to server at "192.168.1.211", port
5432 failed: Operation timed out
        Is the server running on that host and accepting TCP/IP connections?


 There may be more information in the logs.
**********************************************************************************
/etc/rc: WARNING: failed to start synapse


The solution is to add NETWORKING to requirements in the rc script:
# PROVIDE: synapse
# REQUIRE: NETWORKING LOGIN postgresql
# KEYWORD: shutdown

-- 
You are receiving this mail because:
You are the assignee for the bug.