skip to Main Content

I am working with postgresql on a remote server via a vpn connection.

My debian buster postgresql 12 installation doesn’t allow me to create a local server and ask me to verify I’m allowed to connect to the unix domain socket /var/run/postgresql/.s.PGSQL.5432

Pgadmin says:

timeout expired

su
Password: 
root@mycomputer:/home/me# su - postgres
postgres@mycomputer:~$ psql
psql: error: could not connect to server: File o directory non esistente
    Verifica che il server locale sia in funzione e che
    accetti connessioni sul socket di dominio Unix "/var/run/postgresql/.s.PGSQL.5432"

What is the file missing?
Can you help me?

2

Answers


  1. Chosen as BEST ANSWER

    I tried the sequence of commands of: https://www.postgresql.org/docs/12/creating-cluster.html

    root# mkdir /usr/local/pgsql root# chown postgres /usr/local/pgsql root# su postgres postgres$ initdb -D /usr/local/pgsql/data

    The last reply is: bash: pg_ctl: comando non trovato (command not found)


  2. I purged postegresql* and pgadmin4
    I installed back everything
    psql starts from terminal but

    mycomputer@user:$ pgadmin4
    pgadmin4
    Python path: "/usr/lib/python3/dist-packages"
    Python Home: ""
    Webapp path: "/usr/share/pgadmin4/web/pgAdmin4.py"

    • Serving Flask app "pgadmin" (lazy loading)
    • Environment: production
      WARNING: Do not use the development server in a production environment.
      Use a production WSGI server instead.
    • Debug mode: off
      and finally says

    "The application server could not be contacted."

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search