Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Print full startup/initialization error #15569

Merged

Commits on May 11, 2023

  1. Print error type to give more context

    ```
    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.
    **********************************************************************************
    ```
    
    ```
    poetry run python -m synapse.app.homeserver -c homeserver.yaml
    **********************************************************************************
     Error during initialisation:
        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-10 22:53:56,000 - synapse.app._base - 214 - ERROR - main - Exception during startup
    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?
    ```
    MadLittleMods committed May 11, 2023
    Copy the full SHA
    809ecf4 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    bb8b30c View commit details
    Browse the repository at this point in the history
  3. Add changelog

    MadLittleMods committed May 11, 2023
    Copy the full SHA
    d524803 View commit details
    Browse the repository at this point in the history
  4. Fix lint

    MadLittleMods committed May 11, 2023
    Copy the full SHA
    47ad987 View commit details
    Browse the repository at this point in the history
  5. Fix type

    MadLittleMods committed May 11, 2023
    Copy the full SHA
    0642ee1 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    fcad296 View commit details
    Browse the repository at this point in the history
  7. Fix typo

    MadLittleMods committed May 11, 2023
    Copy the full SHA
    08554a7 View commit details
    Browse the repository at this point in the history