Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005
    Posts
    2

    Unanswered: Connecting to Postgre from remotely

    Hello

    I have spent hours trying to make this work, but its still not working. I tried to connect using my Java program and using pgAdmin III. Postgre is hosted on a Debian 5 64 bit vps and here are the changes I made.

    I edited postgresql.conf
    and changed

    listen_addresses = 'local'

    to

    listen_addresses = '*'
    After that I edited pg_hba.conf and added the following line at the end of the file

    host all all 0.0.0.0/0 md5
    and I restarted postgresql by using

    Quote:
    /etc/init.d/postgresql-8.3 restart


    but I always get the following error

    Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

    Any idea how I can fix my problem?



    Best Regards!

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Try this:

    In postgresql.conf
    Code:
    listen_addresses = 'local,yourDebianHostname,*'
    In pg_hba.conf
    Code:
    host all all yourClienttcpipaddress/32 password
    host all all yourDebiantcpipaddress/32 password
    F. Celaia
    DBA Sybase/DB2/Oracle/MS-SQL

  3. #3
    Join Date
    Nov 2006
    Posts
    82
    Did you add any others lines to pg_hba.conf.
    What about firewalls, are there any?
    You sure you changed correct files, I mean you have only one instance of postgres server and one cluster, and
    /etc/init.d/postgresql-8.3 restart
    command reads the file you changed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •