Bug 290877 - net-im/py-matrix-synapse failure on boot
Summary: net-im/py-matrix-synapse failure on boot
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yusuf Yaman
URL:
Keywords:
Depends on: 292129
Blocks:
  Show dependency treegraph
 
Reported: 2025-11-07 18:34 UTC by ATAG
Modified: 2026-04-08 07:41 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (ports)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ATAG 2025-11-07 18:34:13 UTC
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
Comment 1 ATAG 2025-11-07 18:44:23 UTC
Side note: I use a remote pgsql server, probably that's why I got the error...
Comment 2 Sascha Biberhofer 2026-01-02 11:07:41 UTC
Interesting, I use a remote postgres server but never encountered the issue. Regardless, I've added the networking requirement to the synapse init script with the update to 1.144.0 in bug #292129. :)
Comment 3 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2026-03-22 16:33:42 UTC
I am closing this bug because maintainer ports@skyforge.at confirmed the missing NETWORKING rc dependency was fixed in the update to synapse 1.144.0 (bug #292129). The boot failure issue is resolved.
Comment 4 Yusuf Yaman freebsd_committer freebsd_triage 2026-04-08 07:41:35 UTC
Fixed by bug #292129.