problems by configuring pt3 for network-use

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

problems by configuring pt3 for network-use

Postby smeagol » Thu Oct 16, 2008 4:35 am

hi,

first of all, i must say "sorry" for my bad english. i hope, i can manage to describe the problem i have in a way that you can understand ;-)
i use pt3 since a couple of weeks on a laptop and a desktop-pc at home. of course, i want pt3 to store data in one central database on
my fileserver which i run in my small network.
to configure pt3 on the server an the clients, i read the faq and tried to do as described. but obviously i made mistakes, and so the whole
thing doesn´t work :|.
i will try to tell you what i have done, and hopefully you will be able to help me understand :mrgreen: :

Please note: if you are not behind a router, this will not work for you.


ok, i have a router running in my network.
the ip-adresses are as follows:

- router: 192.168.0.1
- fileserver: 192.168.0.100
- client1 (desktop): 192.168.0.2
- client2 (laptop): 192.168.0.3

pt3 is installed and registered on all of these machines. the databases of client1 and client2 contain several data from the played sessions.

The general overview is to update your configuration files to let the server know that computers in your same subnet are allowed access to the server. To do this, goto start -> programs -> postgresql -> configuration files -> pg_hba.conf. Scroll to the bottom of the file. You will see something similar to this at the bottom:

# 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

Step A) simply add the line below to the bottom of your document:

host all all 192.168.0.0/24 md5

Save and exit.


that´s what i did. to confirm: i added this line in the pg_hba.conf on the SERVER.

Now, go back to start -> programs -> postgresql -> configuration files -> postgresql.conf and add the following line to the end of the file:

listen_addresses = '*'

This tells your server to listen to ALL addresses your computer has, not just localhost (which is only accessible from the local computer).


this is an action to be done on the server, too, right ?

Once saved, your computer will now send sql results to computer in your local network. To connect to that server remotely, you need to know that server's address.


as told above, the ip-adress of my fileserver is 192.168.0.100

My IP address here is 192.168.1.16, so my server's ip address is the same. Therefore, to log into this database from my other computers in the house the server:port:pass is - 192.168.1.16:5432:dbpass.


following this, the equivalent pass for my network should be 192.168.0.100:5432:dbpass, right ?

this is the part i have the most problems with:

Substitute your information to access your database from another computer in your local network.


where do i have to put this information to (which file) ? this is the action to be done on the clients, right ?

Also, if you have removed password authentication from your server, please substitute "trust" for "md5" in the line you are adding to your pg_hba.conf file.


i did not intentionally remove any password from the db-server, i just installed it with the standard-options. so i think, i can ignore this last command ?!?

thank you very much for taking your time to read and trying to understand my post. i would be very happy if someone could give me the hint which helps me solving this problem :)
smeagol
 
Posts: 5
Joined: Thu Oct 16, 2008 4:09 am

Re: problems by configuring pt3 for network-use

Postby WhiteRider » Thu Oct 16, 2008 5:00 am

I'll make sure someone looks at this thread for you.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: problems by configuring pt3 for network-use

Postby smeagol » Thu Oct 16, 2008 5:25 am

WhiteRider wrote:I'll make sure someone looks at this thread for you.


thank you very much ! :D
smeagol
 
Posts: 5
Joined: Thu Oct 16, 2008 4:09 am

Re: problems by configuring pt3 for network-use

Postby kraada » Thu Oct 16, 2008 9:32 am

The issue about md5 vs trust:

If you don't want to need to use a password, change the line in the pg_hba.conf from "host all all 192.168.0.0/24 md5" to "host all all 192.168.0.0/24 trust". Then it won't matter what password the computers on your local network use; they'll be able to access the database regardless. The user is still postgres, yes you are right that the IP address of the computer you're trying to connect to is 192.168.0.100 and the port is still 5432.

It sounds like you're almost there; what happens when you try to connect up?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: problems by configuring pt3 for network-use

Postby smeagol » Thu Oct 16, 2008 3:18 pm

kraada wrote:It sounds like you're almost there; what happens when you try to connect up?


my main problem is, that i don´t know where to put the connection string

192.168.0.100:5432:dbpass

i mean, i think, it has to be put in a file on the clients to let them know how
to connect to the db-server, right ?
i tried to put it into the pg_hba.conf on the client, but if i then start pokertracker,
i get the following message:

unable to login to database (pt3 db). reason: fatal: missing or erroneos pg_hba.conf file
hint: see server log for details.


so, this was wrong. i simply have to know how to configure the clients so that they will
connect to the server-db correctly. the last paragraph of the faq is not informative enough
for me...
smeagol
 
Posts: 5
Joined: Thu Oct 16, 2008 4:09 am

Re: problems by configuring pt3 for network-use

Postby smeagol » Fri Oct 17, 2008 6:18 am

well...

i think, i have done another step :-)
by searching for the configuration of the client,
i started the pgadmin.there i found the settings
for the db-connection...
after saving the ip-adress of my db-server,
the pgadmin seemed to connect to the right database.
but: starting the pokertracker, i instantly noticed that
pt was still connected to the lokal database. within pt3,
i was not able to "animate" pt3 to connect to the db on
my server :-(
any further hints ?
smeagol
 
Posts: 5
Joined: Thu Oct 16, 2008 4:09 am

Re: problems by configuring pt3 for network-use

Postby kraada » Fri Oct 17, 2008 12:20 pm

I think you're confused by what "192.168.0.100:5432:dbpass" means.

It means the IP address is 192.168.0.100 the port is 5432 and the password is dbpass.

When you start up PT3 for the first time it should prompt you for a database to connect to, that's where that information goes (the username is postgres).

When you're networking your database like this you do not need to install PostgreSQL on the local machine only on the server.

You can specify a new database from the Database Management window (Database --> Database Management) by clicking "New". If the database already exists, just click "Browse Databases" and you should be able to find it so long as the information is in the right spot.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: problems by configuring pt3 for network-use

Postby smeagol » Sat Oct 18, 2008 1:06 am

kraada wrote:I think you're confused by what "192.168.0.100:5432:dbpass" means.
It means the IP address is 192.168.0.100 the port is 5432 and the password is dbpass.


no, i know what that means...
...even though that didn´t help me ;-)

When you're networking your database like this you do not need to install PostgreSQL on the local machine only on the server.
You can specify a new database from the Database Management window (Database --> Database Management) by clicking "New". If the database already exists, just click "Browse Databases" and you should be able to find it so long as the information is in the right spot.


that´s exactly, what i needed, the last step to success :-)
i just tried this, and now it works ! i was sooooo stupid not finding this way myself :oops: .
browsing did not work, but after entering the information (ip-adress, db-name,...)
of the server-db, pokertracker almost instantly prompted me "successfully connected". and now pt3
writes data to the server-db - everything seems fine 8-)

thank you very much for your patience and help - i am so happy now :D
smeagol
 
Posts: 5
Joined: Thu Oct 16, 2008 4:09 am


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 77 guests

cron
highfalutin