Erro ao conectar com o postgres: Server doesn't listen

Pessoal,

Meu postgres 8.3 tava funcionando ok até q instalei o sql server na mesma máquina.
Agora quando tento acessar o banco da minha propria máquina tenho o seguinte erro:

Server doesn’t listen
The server doesn’t accept connections: the connection library reposts
could not connect to server: Connection refused (0X0000274D/10061) Is the server running on host “127.0.0.1” and accepting TCP/IP connections on port 5432?

Se alguem tiver alguma ideia do que seja eu agradeço…
Valeu

qual a porta que o sql server ta rodando? e qual a porta que o PG ta rodando?

sql server: 1433

postgres: 5432

nao tem nda a ver, mas o problema ocorreu depois q eu instalei o gerenciador do sql server.

tbm to com essa bronca :oops:
como resolve-la?

abraço
:slight_smile:

Olá, aconteceu comigo a mesma coisa, tentei até mudar a porta do postgres, desinstalei e instalei outras versões, mas nada deu certo…A única coisa que funcionou foi formatar meu note e instalar o postgres denovo, daí funcionou beleza…Espero que haja outra forma de resolver mas se nada der certo essa é a saída. :frowning:

[]'s

Oi,

1 - Certifique-se se o servidor de banco de dados está iniciado.
2 - Verificar se o serviço está configurado para iniciar automaticamente com o Windows.
2.1 - Se sim, verifique se o mesmo está iniciado.
2.2 - Se não, você poderá inicia-lo manualmente.
3 - Abra o Gerenciador de tarefas e verifique se o programa postgre.exe está listando nos processos.
4 - Verifique as configurações do pg_hba.conf e postgresql.conf

Tchauzin!

Basta executar o passo 2.2 do tópico da lina que o problema será resolvido. Pelo menos comigo deu certo.

Meio velho o topico hehe mass la vai.

O passo 4 tambem é importante e é a causa de centenas de topicos criados pela net afora. Por default o PG só aceita conexoes localhost e outras coisitas mais, por isto estes 2 arquivos sao importantes de se ver.

Pessoal eu estou com esse problema e ninguem aqui sabe resolver…

tentei verificar o tal do arquivo Hosts e nada…

não sei como iniciar manualmente e o que ver nestes arquivos de configuração…

Meu erro é esse:


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? 
If you encounter this message, please check if the server you're trying to contact is actually running PostgreSQL on the given port. Test if you have network connectivity from your client to the server host using ping or equivalent tools. Is your network / VPN / SSH tunnel / firewall configured correctly? 
For security reasons, PostgreSQL does not listen on all available IP addresses on the server machine initially. In order to access the server over the network, you need to enable listening on the address first. 
For PostgreSQL servers starting with version 8.0, this is controlled using the "listen_addresses" parameter in the postgresql.conf file. Here, you can enter a list of IP addresses the server should listen on, or simply use '*' to listen on all available IP addresses. For earlier servers (Version 7.3 or 7.4), you'll need to set the "tcpip_socket" parameter to 'true'. 
You can use the postgresql.conf editor that is built into pgAdmin III to edit the postgresql.conf configuration file. After changing this file, you need to restart the server process to make the setting effective. 
If you double-checked your configuration but still get this error message, it's still unlikely that you encounter a fatal PostgreSQL misbehaviour. You probably have some low level network connectivity problems (e.g. firewall configuration). Please check this thoroughly before reporting a bug to the PostgreSQL community. 

Isso acontece, porque o serviço do postgre é interrompido, a solução é “startar” o processo novamente.

1 curtida

Uma dúvida de 2008 ?


Obrigado Megadeth, funcionou perfeitamente aqui.

1 curtida

Vejam ai como startar http://studentsql.blogspot.com.br/2013/07/start-stop-restart-postgresql-via-cmd.html

se mesmo fazendo estes procedimentos listado acima o serviço do postgres não iniciar
renomeie o arquivo postmaster.pid
após iniciar o serviço o postgres cria novamente o arquivo

onde se encontra esse arquivo postmaster.pid ?

Olá, o meu problema era parecido, mas o caso era que o servidor do PostgreSQL não estava iniciando.
Simplesmente startei ele como segue o tuto > http://tsdn.tecnospeed.com.br/base-de-conhecimento/post/comandos-para-start-stop-e-restart-do-servidor-de-banco-de-dados-postgre

Abraços.

Basta instalar o postgreSQL