Unmanaged Postgres, single node, repmgr fails on boot

Out of the blue Im getting this error and the machine won’t start:

  • repmgr tries to connect to 48ed1eeb303078.vm.my-app-db.internal from inside the same VM and that hostname doesn’t resolve.

  • Log line: could not translate host name “48ed1eeb303078.vm.my-app-db.internal” to address: No address associated with hostname.

Does anyone have an idea on what’s happening?

Any help would be much appreciated

Hm… Is 48ed1eeb303078 definitely the Machine’s own ID? Possibly you had multiple nodes in the past, and this is a remnant of that older configuration, :thinking:.

If this persists, then I would try the volume-forking technique (with explicit volume ID) and see whether that new Machine boots successfully…


Aside: This might be a good time to reassess whether single-Machine Legacy Postgres is really the right fit for the data you have in there. The next glitch like this could very well wipe out the data itself, :dragon:

Thanks folks. It is a stage environment, so no issue with the single node unmanaged PG, but I was (am) concerned that could happen in prod. Thanks for pointing it out though.

48ed1eeb303078 is a machine I own.

After wasting a afternoon playing with Postgres user authentication for `repmgr`, the solution was to add it on my db.toml:

[env]
#Force self-connection via localhost (postgres-flex expects this for single-node)
FLY_PRIVATE_IP = ‘127.0.0.1’

Thanks for your help

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.