I have this error in my phoenix application when i try to start my server. I think its something on my DB but i dont know exactally what it is. Can someone help me?
The #PID<0.220.0> part of the message, is more or less random, it can change over subsequent tries. It is just a stringrepresentation of the name that BEAM uses for the particular process trying to connect to the database (PID = process ID).
Without knowing anything about your configuration and setup, all I can do is to guess.
Your posted message says that the connections gets refused by the server. This may be because of a firewall rule, or by configuring the postgres to dissallow tcp-connections and only accept pipes or socket-files as connections.
So if this is not helping you, please provide more context.
First things first, make sure your Postgresql is running, and you have configured correct host and port. There would be different message if it was problem with credentials.
I just set up a server(debian7) with posgres-9.6 and a phoenix project.
It might be a postgres configuration issue (I’m not an expert at all in sysops stuff) but I tried a lot of solutions and none of them worked.
I continue to investigate but if I don’t find anything, I’ll gladly share a root access to that server to someone of the Core team for further investigation.
100% sure the problem is stupid, but it drives me crazy
I reinstalled everything from scratch and it worked like a charm .
I had issue when installing postgres the first time (had 2 different version at the same time, messed up with pg_hba.conf and the list goes on…), I guess my error came from here.
When the server crashes or is killed like that, you have to remove this file before you can restart the server. Make sure that the database process is definitely not runnnig anymore, otherwise your data directory will be corrupted. /usr/local/var/postgres then delete the postmaster.pid file
Sometimes this error occurs when there is a “missing / corrupted database’s role”. for exple: “postgres”
Nothing in this thread mentions postgresql beeing crashed. We tried to figure out if it is even installed locally or remote and if the command line client is able to connect using TCP connection and same credentials, but the questioners didn’t came back and it was very silent here for 10 months. According to what we know so far, a pid file has nothing to do with it.
There are many reasons possible (not running, remote in other network, wrong configuration of the client, etc) that was what we tried to discover before we simply tell him to randomly delete stuff.
Anyway, the topic was dead for nearly a year, and I do not think, that one of both questioners will re-read this.