When starting the system, postgres does not work. When writing service postgres status :

Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2017-08-19 12:41:17 MSK; 6h ago

After you restart the service, everything works fine. Without rebooting when starting psql writes:

psql: couldn’t connect to server: There is no such file or directory Is the server socket locally "/var/run/postgresql/.s.PGSQL.5432"?

In the logs here it is:

2017-08-19 12:41:17 MSK [1253-1] LOG: couldn’t translate host name "localhost", service "5432" to address: Temporary failure in name resolution
2017-08-19 12:41:17 MSK [1253-2] WARNING: couldn’t let you listen for "localhost"
2017-08-19 12:41:17 MSK [1253-3] FATAL: could not create any TCP / IP sockets

Ubuntu system

  • If it's not hard to attach, please also add the contents of your / etc / hosts - cheops file

0