LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-23-2010, 01:11 PM   #1
allanwiese
LQ Newbie
 
Registered: Jul 2009
Distribution: Debian
Posts: 14

Rep: Reputation: 1
Postgresql-8.4 server doesn't listen


Hello everyone!

I'm getting some problems setting up a Postgresql-8.4 server (using Debian Lenny).
After have installed the PGSQL server, I've changed the following files as bellow:

pg_hba.conf:
Code:
host   all   all   0.0.0.0/0   trust
postgresql.conf:
Code:
listen_addresses = '*'
Basically these are the configs that are required to connect to a server, but when I've tried to connect to server through PGAdmin, I've got the follow message:
Code:
Server doesn't listen
The server doesn't accept connections: the connection library reports 
could not connect to server: Conexão recusada Is the server running on host "192.168.0.22" 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.
This is the same configuration that I have in other Lenny server, which works well.

May I have forgotten some step.

Any tips?

Thanks.

Last edited by allanwiese; 11-24-2010 at 05:10 AM.
 
Old 11-24-2010, 05:46 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
Hi,

Please see if your firewall and selinux is disabled

Also confirm whether postgre listening or not using using

Code:
 netstat -antu | grep "5432"

Last edited by prayag_pjs; 11-24-2010 at 05:52 AM.
 
Old 11-24-2010, 06:05 AM   #3
allanwiese
LQ Newbie
 
Registered: Jul 2009
Distribution: Debian
Posts: 14

Original Poster
Rep: Reputation: 1
Thanks prayag_pjs by your reply.
My Firewall is OK.

Actually I made another check in my config files and I noticed that I've left one line commented.

The configs I've made (pg_hba.conf and postgresql.conf) are enough.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why server socket listen() is not listening seungtaeh Linux - Networking 1 03-09-2007 04:32 AM
listen to internet radio through a socks server legolin Linux - Software 2 01-05-2005 04:51 PM
Listen to music on my laptop from my server... pAn1k Linux - Networking 4 12-31-2004 02:03 PM
why my DNS server needs listen-on-v6 { any; }; ? cccc Linux - Networking 0 08-21-2004 07:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration