PostgreSQL problem - Connection refused.

2 posts / 0 new
Last post
#1 Thu, 02/21/2008 - 13:49
avedave

PostgreSQL problem - Connection refused.

Hello

I tried to connect to PostgreSQL from my simple java code (on the same server), but received following error:

[code:1]Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.[/code:1]

What should I do to succesfully connect to the database? PostgreSQL has been installed via Webmin and works properly (I can add tables etc. using virtualmin).

Few details: Same error message for local and remote calls. When I type: netstat -ln --tcp I don't see any open 5432 port. Does postgres installed by webmin run on another port? I have a latest stack of virtualmin/webmin/usermin installed automatically on Debian 40 etch minimal. Besides I know this is not a local/remote access problem I set this special "any network host" in webmin/servers/PostgreSQL Database Server/Allowed Hosts but there is no difference - error still exists.

Thanks in advance for help!

Tue, 05/06/2008 - 17:28
hobbes006

Hi avedave,

I had a similar problem a while ago but I resolved it by modifying the pg_hba.conf file in my shell console.

If you could post up your pg_hba.conf, I might be able to tell you what is wrong with your configuration.

Regards,
Calvin

Topic locked