PG::ConnectionBad error

marcamillion

I quit my rails s and went to restart it quickly and all of a sudden I am getting this weird error:

2016-11-11 18:59:59 -0500: Rack app error handling request { GET /profiles }
#<PG::ConnectionBad: could not connect to server: Connection refused
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>

I did some research but nothing helps me properly.

I tried looking for a .pid file in my /usr/local/var/postgres/ folder, because some answers suggested I deleted, but my folder doesn't have that.

I even saw something about checking my server.log and I didn't have that in that folder either.

Eventually I stumbled across this command, which I ran successfully:

$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
server starting

However, that doesn't solve my issue. What it does do though is create a server.log file for me.

That file has the following contents:

LOG:  skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"
FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.4.

I am running the Postgres App from Heroku on macOS Sierra.

What could be causing this and how do I fix it?

marcamillion

Not sure that this is a fix, but I restarted my machine and everything works like normal.

If someone has a more complete answer, that would be good.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Switched to PG! DB migration error: PG::ConnectionBad:

From Dev

Docker - PG::ConnectionBad

From Dev

Ruby TCP server - ERROR:PG::ConnectionBad: FATAL: remaining connection slots are reserved for non-replication superuser connections

From Dev

postgresql database migration error: PG::ConnectionBad: fe_sendauth: no password supplied

From Dev

PG::ConnectionBad: could not translate host name error after running export DATABASE_URL=postgres://$(whoami)

From Dev

postgresql database migration error: PG::ConnectionBad: fe_sendauth: no password supplied

From Java

PG::ConnectionBad - could not connect to server: Connection refused

From Dev

Temporary failure in name resolution (PG::ConnectionBad)

From Dev

PG::ConnectionBad: could not connect to server (heroku)

From Dev

PG::ConnectionBad upgrade to Yosemite and postgresql 9.4.4

From Dev

PG::ConnectionBad FATAL: role "Myname" does not exist

From Dev

PG::ConnectionBad: fe_sendauth: no password supplied

From Dev

PG::ConnectionBad: could not connect to server: Connection refused

From Dev

could not connect to server: No such file or directory (PG::ConnectionBad)

From Dev

PG::ConnectionBad FATAL: role "Myname" does not exist

From Dev

PG::ConnectionBad: could not connect to server: Connection refused

From Dev

PG::ConnectionBad fe_sendauth: no password supplied

From Dev

capistrano, rails, PG::ConnectionBad: fe_sendauth: no password supplied

From Dev

Rails - Postgres - could not connect to server: Connection refused (PG::ConnectionBad)

From Dev

Frequent PG::ConnectionBad: connection is closed errors with RDS and rails / activerecord

From Dev

PG::ConnectionBad FATAL: role "BetBook3" is not permitted to log in

From Dev

PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

From Dev

Heroku: PG::ConnectionBad: could not connect to server: Connection refused

From Dev

rake aborted! PG::ConnectionBad: fe_sendauth: no password supplied sinatra

From Dev

rake aborted! PG::ConnectionBad: fe_sendauth: no password supplied sinatra

From Dev

capistrano, rails, PG::ConnectionBad: fe_sendauth: no password supplied

From Dev

PG::ConnectionBad: FATAL: Ident authentication failed for user "rails_dev"

From Dev

Heroku + Rails + PG: ActiveRecord::StatementInvalid (PG::ConnectionBad: PQconsumeInput() SSL connection has been closed unexpectedly

From Dev

Receiving "ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() could not receive data from server: Connection timed out" in rake task

Related Related

  1. 1

    Switched to PG! DB migration error: PG::ConnectionBad:

  2. 2

    Docker - PG::ConnectionBad

  3. 3

    Ruby TCP server - ERROR:PG::ConnectionBad: FATAL: remaining connection slots are reserved for non-replication superuser connections

  4. 4

    postgresql database migration error: PG::ConnectionBad: fe_sendauth: no password supplied

  5. 5

    PG::ConnectionBad: could not translate host name error after running export DATABASE_URL=postgres://$(whoami)

  6. 6

    postgresql database migration error: PG::ConnectionBad: fe_sendauth: no password supplied

  7. 7

    PG::ConnectionBad - could not connect to server: Connection refused

  8. 8

    Temporary failure in name resolution (PG::ConnectionBad)

  9. 9

    PG::ConnectionBad: could not connect to server (heroku)

  10. 10

    PG::ConnectionBad upgrade to Yosemite and postgresql 9.4.4

  11. 11

    PG::ConnectionBad FATAL: role "Myname" does not exist

  12. 12

    PG::ConnectionBad: fe_sendauth: no password supplied

  13. 13

    PG::ConnectionBad: could not connect to server: Connection refused

  14. 14

    could not connect to server: No such file or directory (PG::ConnectionBad)

  15. 15

    PG::ConnectionBad FATAL: role "Myname" does not exist

  16. 16

    PG::ConnectionBad: could not connect to server: Connection refused

  17. 17

    PG::ConnectionBad fe_sendauth: no password supplied

  18. 18

    capistrano, rails, PG::ConnectionBad: fe_sendauth: no password supplied

  19. 19

    Rails - Postgres - could not connect to server: Connection refused (PG::ConnectionBad)

  20. 20

    Frequent PG::ConnectionBad: connection is closed errors with RDS and rails / activerecord

  21. 21

    PG::ConnectionBad FATAL: role "BetBook3" is not permitted to log in

  22. 22

    PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

  23. 23

    Heroku: PG::ConnectionBad: could not connect to server: Connection refused

  24. 24

    rake aborted! PG::ConnectionBad: fe_sendauth: no password supplied sinatra

  25. 25

    rake aborted! PG::ConnectionBad: fe_sendauth: no password supplied sinatra

  26. 26

    capistrano, rails, PG::ConnectionBad: fe_sendauth: no password supplied

  27. 27

    PG::ConnectionBad: FATAL: Ident authentication failed for user "rails_dev"

  28. 28

    Heroku + Rails + PG: ActiveRecord::StatementInvalid (PG::ConnectionBad: PQconsumeInput() SSL connection has been closed unexpectedly

  29. 29

    Receiving "ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() could not receive data from server: Connection timed out" in rake task

HotTag

Archive