networking PT3 with postgreSQL on both computers

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

networking PT3 with postgreSQL on both computers

Postby scbrigad » Sat Jun 14, 2008 8:57 pm

I have read the forums on accessing PT3 from a second computer but haven't gotten it to work. I edited the .conf files as stated in

viewtopic.php?f=45&t=4638

I currently have PT3 with Postgre SQL 8.3 Beta 13 installed on both computers (both have postgre). I'm hoping that I don't have to remove postgre from my laptop in order to get it to connect to the desktop, and still be able to import to my laptop. (I'd like to have a database on each computer).

It seems to find the remote database when I add a "new" "existing" database... but returns the following error:

Unable to connect to PostgreSQL database: PT3 DB
Reason: Unable to login to database (PT3 DB). Reason: FATAL: no pg_hba.conf entry for host "192.168.1.102", user "postgres", database "PT3 DB", SSL off

I am using the desktop server IP of 192.168.1.104 for the server address, not 192.168.1.102 (remote laptop connector). Is Postgre getting confused because I have an instance installed on the sever and remote computer? I've tried stopping the laptop's postgres service before attempting the connection but I'm not sure how well this works since the laptop must have an active DB in PT3 before the new desktop server database is connected to.

Can I have instances of PT3+postgre8.3 on both computers and still connect remotely? If not, do I need to remove just postgre from the laptop or do a complete reinstall of the PT3 version without postgre?

Thanks.
scbrigad
 
Posts: 28
Joined: Fri Apr 04, 2008 9:49 pm
Location: Phoenix, AZ

Re: networking PT3 with postgreSQL on both computers

Postby scbrigad » Sat Jun 14, 2008 10:07 pm

Adding on... for now in an effort to get remote connections working at all, I uninstalled Postgre 8.3 and PT3 and reinstalled PT3 w/o postgre on the laptop.

On the initial loading I get "Unable to connect to database. Check your configuration" instantly.

Server is "192.168.1.104" (desktop server IP)
User is "postgre"
Password is "dbpass" (I also tried leaving this blank, and changing md5 to trust on the desktop pg_hba.conf lines)
Port is 5432

I'm lost on what else I can try... Firewall is disabled. I can run Remote Desktop Connection to that computer just fine, so I know the laptop can see it.

Can anyone help? I'm going a little insane feeling stupid about not being able to figure this "simple" process out.
scbrigad
 
Posts: 28
Joined: Fri Apr 04, 2008 9:49 pm
Location: Phoenix, AZ

Re: networking PT3 with postgreSQL on both computers

Postby scbrigad » Sun Jun 15, 2008 12:19 am

Well i got it working with typing in my full IP address... I misread/misunderstood the error message thinking it was having trouble finding the .conf file when it was actually telling me my host wasn't in it.

I'm still not sure why I couldn't even get it to access the desktop server when I uninstalled everything and tried installing PT3 without any instance of postgre on it, but its working now the way i wanted it and I still feel like a newbie who can't read.
scbrigad
 
Posts: 28
Joined: Fri Apr 04, 2008 9:49 pm
Location: Phoenix, AZ

Re: networking PT3 with postgreSQL on both computers

Postby kalensc » Mon Jun 16, 2008 1:34 am

I'm having a similar problem as you, but I know nearly zilch about computers and networking and postgreSQL so I'm unsure how to resolve the error.

Laptop has the PT3 database, and I edited the laptop postgreSGL files like your link showed. Then I tried to access the database from my desktop (freshly installed PT3 + postgreSQL), and I get "Unable to create PostgreSQL database (stuff) Reason: Unable to login to database (template1). Reason: could not connect to server: connection timed out (stuff). Is the server running on host 192.168.0.101 and accepting TCP/IP connections on port 5432?"

I should mention that I am so clueless at PCs, that I'm unsure if I correctly found my laptop's IP address (There is a link-local IPv6 Address with a lot of characters, and below that the IPv4 Address). You mentioned using the "full network address" to solve your problems; what did you mean by that?

Anyways, thanks in advance for any advice.
kalensc
 
Posts: 5
Joined: Fri May 30, 2008 2:24 am

Re: networking PT3 with postgreSQL on both computers

Postby keggler » Mon Jun 16, 2008 10:31 am

post up your edited pg_hba.conf & postgressql.conf, along with ipconfig/all from DOS prompt on both m/c's in here and i'll take a look at them.

check your firewalls (including router) accepting 5432.

susan
keggler
 
Posts: 640
Joined: Sun Jun 01, 2008 4:53 am

Re: networking PT3 with postgreSQL on both computers

Postby kalensc » Mon Jun 16, 2008 7:01 pm

pg_hba.conf

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL listen
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#



# TYPE DATABASE USER CIDR-ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all 192.168.0.0/32 md5


postgresql.conf

#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------

#custom_variable_classes = '' # list of custom variable class names
listen_addresses = '*'

ipconfig/all

Windows IP Configuration

Host Name . . . . . . . . . . . . : Kalen-PC
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Wireless WiFi Link 4965AGN
Physical Address. . . . . . . . . : 00-13-E8-19-B9-CF
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::f5a1:2d6f:afa2:4bd6%10(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.101(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Monday, June 16, 2008 4:43:49 PM
Lease Expires . . . . . . . . . . : Monday, June 23, 2008 4:43:48 PM
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DHCPv6 IAID . . . . . . . . . . . : 218108904
DNS Servers . . . . . . . . . . . : 192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Controlle
r
Physical Address. . . . . . . . . : 00-18-8B-C8-05-04
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection* 6:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : isatap.{ABFAF26F-0E15-4DBB-A9D2-C027C8C24
0EA}
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection* 7:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : isatap.{AEE39016-CB68-414F-8BC3-01227944E
060}
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::5efe:192.168.0.101%12(Preferred)
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter Local Area Connection* 9:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 02-00-54-55-4E-01
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:0:4137:9e50:1099:3ede:3f57:ff9a(Pref
erred)
Link-local IPv6 Address . . . . . : fe80::1099:3ede:3f57:ff9a%11(Preferred)
Default Gateway . . . . . . . . . : ::
NetBIOS over Tcpip. . . . . . . . : Disabled

Firewall stuff

Yes, I had forgotten to accept port 5432 on my laptop (where the database is). Now that I've fixed that (allowed port 5432 to acces via TCP (correct?), I get the same error that the OP had: "Reason: Unable to login to database (template1). Reason: FATAL: no pg_hba.conf entry for host "192.168.0.105", user "postgres", database "template 1", SSL off.
kalensc
 
Posts: 5
Joined: Fri May 30, 2008 2:24 am

Re: networking PT3 with postgreSQL on both computers

Postby kalensc » Mon Jun 16, 2008 7:04 pm

Actually I've been thinking of making the desktop the main poker computer, and just using the laptop on occasion. In that case, I suppose it's best to move my current database over to the PC, and then set this up the other way (have laptop access PC IP)? Although I guess that once I understand what caused this problem, I should be able to create a remote database for the laptop fairly easily.
kalensc
 
Posts: 5
Joined: Fri May 30, 2008 2:24 am

Re: networking PT3 with postgreSQL on both computers

Postby keggler » Tue Jun 17, 2008 3:56 am

postgresql.conf looks ok.

i cannot tell from your ipconfig if this is from the server or client?

what needs to go in pg_hba.conf is the ip of the client accessing the server, and you edit the server's pg_hba.conf.

so if i assume i AM looking at the client's ipconfig in your post, is goes something like this:

host all all 192.168.0.101/32 trust

to answer your other post, yes you can have the postgres db wherever you want it - moving populated db's is not for the faint hearted though - make sure you have double backups via 2 different methods just in case...


susan
keggler
 
Posts: 640
Joined: Sun Jun 01, 2008 4:53 am

Re: networking PT3 with postgreSQL on both computers

Postby scbrigad » Tue Jun 17, 2008 4:03 am

looks like keggler has this covered... I assumed 192.168.0.0/32 was trying to globally accept incoming clients in your subnet, and I was just saying this didn't work for me... so I added three three specific entries to my server's pg_hba.conf:

host all all 192.168.1.101 255.255.255 trust
host all all 192.168.1.102 255.255.255 trust
host all all 192.168.1.103 255.255.255 trust

and it worked fine...
scbrigad
 
Posts: 28
Joined: Fri Apr 04, 2008 9:49 pm
Location: Phoenix, AZ

Re: networking PT3 with postgreSQL on both computers

Postby WhiteRider » Tue Jun 17, 2008 4:55 am

kalensc wrote:Actually I've been thinking of making the desktop the main poker computer, and just using the laptop on occasion. In that case, I suppose it's best to move my current database over to the PC, and then set this up the other way (have laptop access PC IP)? Although I guess that once I understand what caused this problem, I should be able to create a remote database for the laptop fairly easily.

Someone made a good point about this sort of thing a while ago - if you ever play poker away from home (i.e. away from your desktop PC) then you would be better to have the DB on the laptop so that you would have it with you whichever one you use.
Of course, that would mean that when playing on your main computer you would be accessing the DB over the network which could be slower..
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 32 guests

cron
highfalutin