Description
When using the Fully Managed PostgresSink/PostgresCdcSourceV2 connectors in Confluent Cloud, you might encounter the following error:
Connector failed with fatal error that the database is shutting down.
The connector will try to re-establish the connection once the database is up again.
Applies To
- PostgresCdcSourceV2
- PostgresSink
- Confluent Cloud
Cause
This error occurs when the connector fails to connect to the database because the database is shut down.
Resolution
- Verify Database Status: Check the status of your PostgreSQL database to confirm that it is indeed shutting down or already shut down. You can do this by logging into your database and executing relevant status commands.
- Restart Database: If the database is shut down, restart it to bring it back online. Ensure that the database is configured to start correctly and that there are no issues preventing its operation.
Example: PostgreSQL service status
postgres:/# ps aux | grep postgres
1 postgres 0:00 postgres
27 postgres 0:00 postgres: checkpointer
28 postgres 0:00 postgres: background writer
30 postgres 0:00 postgres: walwriter
31 postgres 0:00 postgres: autovacuum launcher
32 postgres 0:00 postgres: logical replication launcher
40 root 0:00 grep postgres
- Database Maintenance: If the shutdown was due to maintenance, schedule such activities during off-peak times to reduce impact and align the connector restart with database availability.
- Error Persistence: If the connector continues to show the same error after the database is confirmed to be online, review environmental factors such as network stability, user credentials, and database configurations to rule out any other connectivity issues
Note: For any persistent issues, contact Confluent Support for further assistance. Include relevant information and details about the database status when filing a support ticket.