synapse/changelog.d
Eric Eastwood d19d1edbcf
Print full startup/initialization error (#15569)
I found the error in the **Before** really vague and obtuse and didn't realize port `5432` corresponded to the Postgres port until searching the codebase. It says to check the logs but that wasn't my first instinct. It's just more obvious if we just print the full thing which gives context of the error type and the traceback to the relevant area of code.

#### Before

```
$ poetry run python -m synapse.app.homeserver -c homeserver.yaml
**********************************************************************************
 Error during initialisation:
    connection to server at "localhost" (::1), port 5432 failed: Connection refused
 	Is the server running on that host and accepting TCP/IP connections?
 connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
 	Is the server running on that host and accepting TCP/IP connections?
 
 There may be more information in the logs.
**********************************************************************************
```

#### After

```sh
$ poetry run python -m synapse.app.homeserver -c homeserver.yaml
**********************************************************************************
 Error during initialisation:
     Traceback (most recent call last):
       File "/home/eric/Documents/github/element/synapse/synapse/app/homeserver.py", line 352, in setup
         hs.setup()
       File "/home/eric/Documents/github/element/synapse/synapse/server.py", line 337, in setup
         self.datastores = Databases(self.DATASTORE_CLASS, self)
       File "/home/eric/Documents/github/element/synapse/synapse/storage/databases/__init__.py", line 65, in __init__
         with make_conn(database_config, engine, "startup") as db_conn:
       File "/home/eric/Documents/github/element/synapse/synapse/storage/database.py", line 161, in make_conn
         native_db_conn = engine.module.connect(**db_params)
       File "/home/eric/.cache/pypoetry/virtualenvs/matrix-synapse-xCtC9ulO-py3.10/lib/python3.10/site-packages/psycopg2/__init__.py", line 122, in connect
         conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
     psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused
     	Is the server running on that host and accepting TCP/IP connections?
     connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
     	Is the server running on that host and accepting TCP/IP connections?
 
 
 There may be more information in the logs.
**********************************************************************************
```
2023-05-11 11:50:46 -05:00
..
.gitignore
15025.misc Use oEmbed for YouTube Shorts (#15025) 2023-05-03 12:54:42 -04:00
15197.feature Add config option to prevent media downloads from listed domains. (#15197) 2023-05-09 14:08:51 -04:00
15224.feature Add config option to forget rooms automatically when users leave them (#15224) 2023-05-03 12:27:33 +01:00
15312.feature Add redis SSL configuration options (#15312) 2023-05-11 13:02:51 +01:00
15437.misc Set thread_id column to non-null for event_push_{actions,actions_staging,summary} (#15437) 2023-05-03 07:49:03 -04:00
15470.misc HTTP Replication Client (#15470) 2023-05-09 14:25:20 -04:00
15491.misc Remove worker_replication_* settings (#15491) 2023-05-11 11:30:56 +01:00
15509.misc Bump pyicu from 2.10.2 to 2.11 (#15509) 2023-05-03 23:45:42 +01:00
15516.feature Allow adding random delay to push (#15516) 2023-05-02 16:45:44 +00:00
15522.misc Remove references to supporting per-user flag for msc2654 (#15522) 2023-05-02 14:21:36 -07:00
15523.bugfix Handle DNSNotImplementedError in SRV resolver (#15523) 2023-05-05 15:54:32 +01:00
15527.misc Suppress the trusted key server warning for matrix.org in the demo scripts (#15527) 2023-05-03 12:07:49 +00:00
15528.feature Stabilize MSC2659 support for AS ping endpoint. (#15528) 2023-05-09 15:02:36 -04:00
15529.misc Speed up rebuilding of the user directory for local users (#15529) 2023-05-03 13:41:37 +00:00
15531.misc Speed up deleting of old rows in event_push_actions (#15531) 2023-05-03 13:42:43 +00:00
15532.misc Add mdbook to flake.nix (#15545) 2023-05-05 15:51:58 +01:00
15533.misc Add mdbook to flake.nix (#15545) 2023-05-05 15:51:58 +01:00
15534.misc Update the base rules to remove the dont_notify action. (MSC3987) (#15534) 2023-05-04 11:54:13 +00:00
15535.misc Move ThirdPartyEventRules into module_api/callbacks (#15535) 2023-05-04 14:18:22 +00:00
15536.feature Implement MSC4009 to widen the allowed Matrix ID grammar (#15536) 2023-05-05 12:13:50 -04:00
15539.misc Check appservices for devices during a /user/devices query. (#15539) 2023-05-05 15:18:47 -04:00
15542.misc Factor out an is_mine_server_name method (#15542) 2023-05-05 15:06:22 +01:00
15543.misc Allow running Complement integration tests via podman (#15543) 2023-05-05 13:27:51 +01:00
15544.doc Clean up and clarify "Create or modify Account" Admin API documentation (#15544) 2023-05-05 15:51:46 +01:00
15545.misc Add mdbook to flake.nix (#15545) 2023-05-05 15:51:58 +01:00
15548.misc Bump serde from 1.0.160 to 1.0.162 (#15548) 2023-05-08 07:29:55 -04:00
15549.misc Bump types-setuptools from 67.6.0.5 to 67.7.0.1 (#15549) 2023-05-08 07:15:10 -04:00
15550.misc Bump sentry-sdk from 1.19.1 to 1.22.1 (#15550) 2023-05-08 07:15:22 -04:00
15551.misc Bump ruff from 0.0.259 to 0.0.265 (#15551) 2023-05-08 07:14:52 -04:00
15552.misc Bump hiredis from 2.2.2 to 2.2.3 (#15552) 2023-05-08 07:57:40 -04:00
15553.misc Bump types-requests from 2.29.0.0 to 2.30.0.0 (#15553) 2023-05-08 07:13:47 -04:00
15554.bugfix Error if attempting to set m.push_rules account data, per MSC4010. (#15555) 2023-05-09 10:34:10 -04:00
15555.bugfix Error if attempting to set m.push_rules account data, per MSC4010. (#15555) 2023-05-09 10:34:10 -04:00
15560.doc Fix documented path to largest rooms statistics endpoint. (#15560) 2023-05-10 13:00:27 +00:00
15562.misc Add an unstable feature flag for MSC3391 to the /versions endpoint (#15562) 2023-05-11 10:38:32 +01:00
15566.bugfix Require at least poetry-core v1.2.0 (#15566) 2023-05-11 12:40:55 +01:00
15569.feature Print full startup/initialization error (#15569) 2023-05-11 11:50:46 -05:00
15570.misc Allow pip install to use setuptools_rust 1.6.0 (#15570) 2023-05-11 16:22:47 +00:00