PDA

View Full Version : Network database problem



richlizard
11-03-2009, 04:57 PM
Please excuse me for posting yet another thread on using Postgres across a network.

I know there have been numerous threads and have read just about all of them. Unfortunately, none of them seem to work for me so I hope someone may be able to help out with my specific problem.

Although I have allowed access through port 5432, I have tried most things with firewall off, so please assume it is not a firewall problem.

I have a PC where I have installed HEM (1.09 on Vista) and also Postgresql (8.3).

I have a laptop where I have installed just HEM (1.09 on Vista).

I had to set up Postgresql on PC using postgresuser as the username as it would not accept postgres (as advised on the pages here).

IP for the PC is 192.168.2.3
IP for the laptop is 192.168.2.2
IP for the router is 192.168.2.1

I have modified the pg_hba.conf file on the PC (stolen and adjusted from a thread here) so that it reads


# TYPE DATABASE USER CIDR-ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 192.168.2.0/24 trust
# IPv6 local connections:
host all all ::1/128 trust
host all all 192.168.2.0/24 trust
host all all 192.168.2.0 trust
host all all 192.168.2.1 trust
host all all 192.168.2.2 trust
host all all 192.168.2.3 trust
host all all 192.168.2.0/24 trust
host all all 192.168.1.1 255.255.255.255 trust
host all all 192.168.1.100 trust
# IPv6 local connections:
host all all ::1/128 md5

So now to the laptop...

I start up HEM and am first given the mssg that it cannot connect to 127.0.0.1 of course. So I change 127.0.0.1 to 192.168.2.3 and am given the error message "A connection to PostgreSQL could not be made. Would you like... etc.,". Accepting the kind offer, it still refuses to connect.

So I then remember that I had to use login name postgresuser so I change to that. Exactly the same procedure occurs.

As I mentioned, this also happens with firewall off. I can ping 192.168.2.3 without a problem.

Is there something blatantly obvious I am doing wrong?

I have spent 2 days now trawling the forum for a solution and uninstalling/reinstalling the software but no joy.

Would very much appreciate any help.

richlizard
11-03-2009, 05:09 PM
ps I have also added listen_addresses = '*' to the postgresql.conf file

Tims1501
11-03-2009, 05:27 PM
I've been having the same problems connecting with PostSQL. I've also closed wall my firewall and antiviruses program and even tried adding in port in windows firewall/defender yet I still can't connect. I think its the postSQL's problem as I tried starting the service but it still can't connect, is there another solution for this??

thanks

fozzy71
11-03-2009, 06:45 PM
ps I have also added listen_addresses = '*' to the postgresql.conf file

I have never used HEM on a network so I will have to defer this to my colleagues.


I've been having the same problems connecting with PostSQL. I've also closed wall my firewall and antiviruses program and even tried adding in port in windows firewall/defender yet I still can't connect. I think its the postSQL's problem as I tried starting the service but it still can't connect, is there another solution for this??

thanks

Are you on a network, or are you just talking about a problem with a typical installation on a single PC. You should have probably started your own thread.

This is usually a firewall or windows update issue.

First try to delete the \postgresql\8.x\data\postmaster.pid file, if you see it, and reboot.

If no help, try this:

Start > Programs > PostgreSQL > 8.x > Stop Service

Start > Programs > PostgreSQL > 8.x > Start Service

Add exceptions to the windows firewall, even if it is off. If you have a 3rd party firewall, do the equivalent or uninstall it temporarily - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=171

Please try following all of these FAQs, step by step:

1) http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=34
2) reinstall the same version of postgresql, using the same \data folder - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177
3) http://www.holdemmanager.net/forum/showthread.php?t=8261

If that doesn't help you will probably have to reinstall PostgreSQL completely and reimport your hands.

richlizard
11-04-2009, 10:24 AM
Thanks Fozzy.

Look forward to the reply.

netsrak
11-04-2009, 03:00 PM
I think your configuration is wrong, a valid configuration should look like this:



#local all all ident
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.209.205/32 trust

# IPv6 local connections:
host all all ::1/128 md5



i added the 192 address.

delete all your test entries and start with one of your ip addresses.

richlizard
11-04-2009, 03:11 PM
Netsrak you are a star.

All connected. Thanks!