0

I have been getting this error recurrently when my server refuses connections. I usually did a fresh installation of postgres to delete all configuration files and restart the server but now its not working.

Una=

Here is a screenshot of the terminal using ps aux | grep postgres :

terminal image

Aneek Roy
  • 43
  • 2
  • 9
  • 3
    The default port is 5432, not 9090 –  May 08 '19 at 11:28
  • This happens randomly and the reason which is floated around in the net is that the postgres server shut down inappropriately. I always checked for shutting down all processes involving postgres, after I have ensured that the postgres instances are shut down properly do I shut down my laptop. Still I keep getting this error randomly – Aneek Roy May 08 '19 at 11:28
  • @a_horse_with_no_name yes its working fine with the default port. I have another server runnning at port 5432 – Aneek Roy May 08 '19 at 11:29
  • 2
    I have been working with Postgres for over 10 years now and it has never shut down "inappropriately" –  May 08 '19 at 11:33
  • So, you do have a Postgres instance that is configured to listen on 9090? Is it actually running? Are there any errors in the logfile for that instance? How do you start and stop it? Which operating system is this? –  May 08 '19 at 11:34
  • As you keep adding the pgAdmin tag: does this mean you only get the error with pgAdmin, but not with `psql`? –  May 08 '19 at 11:42
  • I attached a screenshot of the processes running currently in my laptop now. niether **sudo lsof -i tcp:9090** nor **netstat -vanp tcp | grep 9090** are giving me any results. I usually start the postgresql through pgadmin 4 server and I on a MAC OSX machine. – Aneek Roy May 08 '19 at 11:45
  • @a_horse_with_no_name No if i use a psql shell I am getting the same error – Aneek Roy May 08 '19 at 11:46
  • 1
    Well, maybe it is not running, or not listening on TCP port 9090? -->> check listen_address (or maybe: firewall) – wildplasser May 08 '19 at 12:01
  • Yes I realised my mistake I had to run an ssh instance for the port for spinning up the server for remotely connecting through the port. – Aneek Roy May 08 '19 at 12:06

0 Answers0