G
G
grepfreecd grepfreecd2016-06-17 08:15:59
linux
grepfreecd grepfreecd, 2016-06-17 08:15:59

How to solve PostgreSQL access problem?

Hello, I am raising the OSM server. Previously, I did not work with PostgreSQl, but I understand slowly. I do everything according to the official manual. But I'm stuck on the osm2pgsql utility, which produces the following:

osm2pgsql SVN version 0.88.1 (64bit id space)

Using built-in tag processing pipeline
Osm2pgsql failed due to ERROR: Error: Connection to database failed: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

In which direction should you dig? What could be the problem. I did not find the .sPHSQL.5432 file.
I searched in Google, somewhere they advised me to check whether the process is running, I don’t know if I checked it correctly, but I didn’t find the process running. Checked with the following command:
sudo ps axf | grep postgres
Tried to start manually via service postgresql start, still does not appear.
But at the same time, the psql utility - works fine, i.e. I can easily connect.
Ubuntu 16.04 system, DB - PostgreSQL 9.5

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-06-17
@sim3x

Finger in the sky - the socket has not been updated

sudo systemctl stop postgres
sudo systemctl start postgres
sudo systemctl status postgres

A
Azazel PW, 2016-06-17
@azazelpw

/var/lib/postgresql/***/pg_hba.conf
Check connection permissions.
make trust everywhere, if it works on the basis of this, you will disable it.
Most likely there is a check on localhost
This happens because of this and backups are not made from the console. Standard utilities at the same time pass and work.
After changing the parameters, you will need to restart the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question