Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Server doesn't listen" in pgAdmin III with postgreSQL

Tags:

postgresql

First of all : I'm a novice in what touches to databases.

I'm using postgreSQL with pgAdmin III, and it worked perfectly fine until some days ago : Some days ago, when I was not working on it, I saw in the "background process" of Windows that several identical postgreSQL programs (?) were running, and I decided to stop them, because I was not using them at the time. Mistake : Now, when I try to connect to the server (on localhost), I receive the error message :

"Server doesn't listen"

The server doesn't accept connections: the connection library reports could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

I already took a look on similar topics on stackoverflow, looked the listen_address file, the postgresql.conf and pg_hba.conf files, but everything seems to be "normal" (according to what I read in these topics).

I posted this because... well, I didn't find any other person that did what I did (stopping the background process, and then not being able to reconnect).

like image 396
Oscar Pasta Avatar asked Sep 09 '15 09:09

Oscar Pasta


People also ask

Why is pgAdmin not connecting to server?

If pgAdmin displays this message, there are two possible reasons for this: the database server isn't running - simply start it. the server isn't configured to accept TCP/IP requests on the address shown.

How do you make a server on pgAdmin 3?

in pgAdmin, right click 'Servers' and go Create>Server. On the 'Create - Server' pop up box, i type in Name: Localserver. For 'connection' I type localhost. Port I leave as default '5432', db: postgres, username: postgres password: empty.


1 Answers

Use Services (Start → Run → services.msc) and look for the postgresql-[version] service. Is it running?

  • If not, try to start it.
    • If that works, you can make it startup automatically by changing the Startup Type with Windows to Automatic; or perhaps Automatic, delayed start if you don't want it to slow down startup too much.
  • If you can't start it, you may have just installed pgAdmin and not installed PostgreSQL itself.
  • If it won't start open the Event Viewer (Start → Run → Eventvwr) and look for error messages relating to the PostgreSQL service.
like image 107
user6119673 Avatar answered Oct 12 '22 01:10

user6119673