Suddenly - tcp connect (localhost: 5432): connection refused -: econnrefused

For several months everything was fine, but now I have a lot:

mix phoenix.server

[error] Postgrex.Protocol (#PID<0.302.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused                                    
[error] Postgrex.Protocol (#PID<0.303.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused 

      

on the local host.

But:

  • Postgresql works
  • Its configuration is the same
  • My phoenix / elixir app config too.
  • Systemctl postgresql status shows everything is ok
  • nothing wrong with the magazine
  • I can connect to Pg via Pg GUI tool

What's the matter?

$ netstat -tulnp

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp6       0      0 ::1:5432                :::*                    LISTEN      -                   
udp        0      0 192.168.1.37:68         0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           25117/libpepflashpl 
udp6       0      0 :::5353                 :::*                                25117/libpepflashpl 

      

+3


source to share





All Articles