feathers icon indicating copy to clipboard operation
feathers copied to clipboard

ECONNREFUSED when db container is moved/recreated to a new node

Open esune opened this issue 2 years ago • 0 comments

Original issue (https://github.com/feathersjs-ecosystem/feathers-mongodb/issues/207) was closed when the repo was archived, reopening as it looks like it might not have been addressed.

Steps to reproduce

I am running https://github.com/bcgov/issuer-kit in OpenShift (Kubernetes) and I am getting the same error as what described https://github.com/feathersjs/feathers/issues/1385 when the database pod is moved to a different node and the currently active connection becomes unusable (because the targeted endpoint is not valid anymore).

Expected behavior

When a connection to the DB fails, the driver should try and open a new connection. If opening a new connection fails, the node process (and the container as a consequence) should be put in an unhealthy state.

Actual behavior

See https://github.com/feathersjs/feathers/issues/1385 This happens even if the connection is referencing a k8s service (which abstracts from the actual ip address of the database).

System configuration

See package.json and package-lock.json here. The Docker container is built using source-to-image

esune avatar Apr 12 '23 16:04 esune