Resolving psql: error: could not translate host name to address: nodename nor servname provided, or not known
Written by
Updated at December 17, 2025
Issue description
You have no public access to a PostgreSQL cluster and get this error:
psql: error: could not translate host name to address: nodename nor servname provided, or not known
Solution
To fix this error, check whether public access to the PostgreSQL cluster hosts is enabled. A cluster host can be reached from outside Yandex Cloud if you enabled public access while creating or reconfiguring that host. If public access is disabled, enable it.
To learn how to connect to a database in a PostgreSQL cluster, see this Managed Service for PostgreSQL guide.