Closed Ivansete-status closed 8 months ago
The moment the node got blocked it wasn't because of the Postgres connection being stopped. It happened due to other reasons, that I didn't capture properly.
I tried to replicate the issue in the following way:
Start the docker container with Postgres database.
Start the nwaku
node which establishes a connection with the database.
Disconnect the Postgres docker container from the network (command: docker network disconnect nwaku_default 66172f2e7dac
.
After this, the nwaku
node stops immediately with the following message:
ERR 2024-01-10 20:24:37.053+01:00 Unrecoverable error occurred topics="wakunode app" tid=437665 file=app.nim:498 error="postgres health check error: error in asyncpool query: error in dbConnQuery calling waitQueryToFinish: error in query: FATAL: terminating connection due to administrator command\nserver closed the connection unexpectedly\n\tThis probably means the server terminated abnormally\n\tbefore or while processing the request.\n"
Then, if I try to restart the node again, it clearly fails with the error:
ERR 2024-01-10 20:47:39.887+01:00 4/7 Mounting protocols failed topics="wakunode main" tid=441078 file=wakunode2.nim:89 error="failed to setup archive driver: error creating table: error in createMessageTable: connRes.isErr in query: failed to stablish a new connection: exception opening new connection: connection to server at \"localhost\" (127.0.0.1), port 5432 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?\n"
I will close this issue because I couldn't replicate it. I'll reopen it again, with better detail, if this happens again.
( cc @chair28980 )
Problem
The node doesn't start and it gets stuck without giving clear evidence of the error. That happened when using the
status.test
nodes with postgres configured and for any reason, the firewall rule was broken and therefore, the waku node didn't have access to the database host.Impact
Critical
To reproduce
If you can reproduce the behavior, steps to reproduce:
nwaku
in machine B and configure it as Store node and point the Postgres database to the host A.nwaku
. It will get stuck.Expected behavior
The waku node should stop immediately stating that it cannot connect to the database server.
Screenshots/logs
nwaku version/commit hash
Commit 11e0e1cf2820345dede50d5f3da3d43e5a9587b3 , feature/status-test-dogfooding branch