PDA

View Full Version : Remote database



punks
10-10-2011, 02:17 AM
I am using remote database (postgresql 8.3)

HM2 cannot create new database.

28601
28611
28621
28591

HM1 works good.

Sarek
10-10-2011, 04:49 AM
This is worked on.
HM2 uses not only database for storing information, but also a dedicated folder.
For performance reason and for other things
When you create DB - you can see path to it as "DB parent" - and you can change this path, btw..
And without it you can't use database.

punks
10-10-2011, 05:05 AM
Ok.
Same problem. HM2 cannot create database.So when HM2 creat it - when I press "Finish"?
28641
28651

udbrky
10-10-2011, 04:42 PM
In the first pic, it looks like postgres is not running. Did you make sure it's running in the services (control panel - admin - services)

punks
10-11-2011, 01:25 AM
Posgres is running always!! on remote debian server. Hm1 works fine. Hm2 has problem with creating new database :(
When i press "retry connection" - success pls click next :mad: I press "next" and HM2 tells me that "HM cannot connect to the postgres", when it try's to make new own database (see pics above)

punks
10-11-2011, 01:50 AM
check this video Zippyshare.com - capture-1.mp4 (http://www66.zippyshare.com/v/65869580/file.html)

Sarek
10-11-2011, 04:46 AM
Try to change DB name (backspace one symbol for example).
Also try to untick and tick again "Use dafeult DB parent"

punks
10-11-2011, 05:52 AM
not work

Zippyshare.com - 2.mp4 (http://www13.zippyshare.com/v/72806689/file.html)

I changed location "DB parent" - same problem ((

punks
10-11-2011, 02:38 PM
In the evening tried on another server on FreeBSD (postgresql 8.3)
HM1 - works fine. HM2 - nope//// :(

udbrky
10-12-2011, 02:51 AM
I'm checking with someone for more info.

netsrak
10-12-2011, 03:24 AM
Last time i tried this it worked without problems. I'll test it later today with the latest HM2 releases.

punks
10-12-2011, 05:42 AM
I'm checking with someone for more info.
ok.waiting for solution! )

netsrak
10-12-2011, 11:19 AM
I just tried again with latest build and had no problems. The only difference i see is that you are using postgresql 8.3.
Can you try with a postgresql 8.4 installation?

punks
10-12-2011, 02:01 PM
i play with hm1 and have big database on postgresql 8.3. cannot "simply" migrate to 8.4 :(
maybe tomorrow i'll install new server and try 8.4 on it

Sarek
10-13-2011, 04:09 AM
Think I know where is the problem: postgres user name is non-default. Please see this

A. If Posgres user is non-default, there must be a Database (any), named exactly as this user.
B. For HM2 can create databases, anyway we need user/role "postgres"
To do this:
1. Run PGAdmin, connect to server
2. Right-click on Databases - Create new DB
3. In window opened we nave to enter database name equal to postgres user name. If user is named "poker" - DB name have to be "poker". If user is names "elephant", DB name have to be "elephant". Etc.
4. Click on Plus in Login roles and check if there is user "postgres"
If not exists: right-click Login Roles - New login role,
set field Role name as "postgres" (without quotes), set Connection limit as "-1" (also without qoutes)
then set all flags in Role privileges Tab (see picture for PG9, in PG8 these flags are on first tab)

28991

punks
10-13-2011, 07:32 AM
wow!! it works! thanks!!!
so can I make many databases with hm2?

Sarek
10-13-2011, 12:38 PM
As you wish, but leep in mind: HM2 uses not only database for storing information. Also "DB parent" folder - for performance reason. And this DBParent contains lot of small files - and eats HDD space very well

punks
10-13-2011, 01:33 PM
HM2 eats memory very well too ;)

Sarek
10-13-2011, 01:54 PM
HM does this for performance reason. If PC has a lot of memory - why not to use it?

Rappel
11-08-2011, 11:50 AM
Is there some kind of FAQ or tutorial on how to set up a remote database with HM2?

udbrky
11-10-2011, 02:32 AM
I just asked nestrak if he can help with that.

netsrak
11-10-2011, 05:07 AM
There is no specific FAQ for remote databases.
But its generally the same as a local one: http://hm2faq.holdemmanager.com/questions/1431/How+is+a+new+database+created+in+Holdem+Manager+2% 3F

The difference is the IP adress and probably user/password.
After adjusting this values click on "Test connection". If this is successful you can continue with creating the new remote database.
But please be aware that at the moment you can only access this remote database from the computer where you created it and not from a 2nd computer in the network.

pokecancer
11-10-2011, 06:13 AM
But please be aware that at the moment you can only access this remote database from the computer where you created it and not from a 2nd computer in the network.

Does that mean there are plans to change this somehow despite the addition of the new caching folder? I do not want to have to pay for hm sync to have an updated database on both of my computers. Additionally, having a redundant database taking up space on my secondary computer seems pointless when it can be accessed over my network. I understand that performance issues were cited earlier in this thread, but this seems like a problem that should be reconsidered.

Stasek
01-25-2012, 11:31 AM
But please be aware that at the moment you can only access this remote database from the computer where you created it and not from a 2nd computer in the network.

Has this been resolved?
In HM1 I can create DB on a host computer and access it from other computers on a network.

In HM2 im trying to follow this guide (http://hm2faq.holdemmanager.com/questions/1791/How+can+a+database+be+accessed+by+two+or+more+comp uters+with+Holdem+Manager%3F), but when I try to add DB on a remote, it says "A database named 'testDB' already exists".
Of course it exists, because I created it first on the host.

So the question is: how to access the same DB from multiple computers (2 for simplicity - host and remote)?

Sarek
01-27-2012, 07:15 AM
You can try to create "mapped network drive" with the same path on both computers.
And then edit Settings table in DB (via PGadmin) - change path to Parent like this
Z:/DBparent
!!! but NOT "Z:/" !!!
This way HM on both PCs will use same path for that DB

Stasek
01-27-2012, 09:05 AM
This is the situation:
I have DB on host.
parent folder is mapped (on the guest)to z:\Database\
The only way to add DB on guest is to click little green plus icon (but tooltip says: create new database), and enter DB name.
But then I get the error that db already exists.

How do I make the db appear on the list in the first place (guest)?
Without it, even if i change parent folder in the Setings table, guest will not know that it should use this db...

Sarek
01-29-2012, 06:18 AM
1) If you change path to parent in Settings table - HM will see this DB
2) Please do this: Press green plus to create new DB, but:
change path to Parent to this "mapped" - HM should remember this path and when you will try to create DB next time will use it as new default
and: turn ON your fantasy when naming DB :)

Stasek
01-29-2012, 05:47 PM
1) If you change path to parent in Settings table - HM will see this DB
2) Please do this: Press green plus to create new DB, but:
change path to Parent to this "mapped" - HM should remember this path and when you will try to create DB next time will use it as new default
and: turn ON your fantasy when naming DB :)

Ok. I'm confused.

both remote and host have postgres installed

host has db already created.
how can remote know where to look in the first place (local or host DB)?

Also: if my db name is abc, what is the parent folder?
\path\Database or \path\Database\abc?

I think the former one, because by default HEM2 suggests \path\Database.
and then subfolder abc wuld be created there.

I mapped \...\HoldemManager\ folder as Z:
and used parent folder as Z:\Database

when on remote, and i try to craete new DB, i get error message "hm cannot connect to pgsql database"
but DB is actually created on the host.

netsrak
01-30-2012, 04:14 AM
Steps on the 2nd PC:
1. Enter the server connection data and click on connect
2. Create a new "dummy" database using this connection and your Z:\ database parent folder.
3. After successful completion you should restart HM2 and now you should see your new dummy database and the already existing database which you can choose now.

Stasek
01-30-2012, 11:22 AM
Steps on the 2nd PC:
1. Enter the server connection data and click on connect
2. Create a new "dummy" database using this connection and your Z:\ database parent folder.
3. After successful completion you should restart HM2 and now you should see your new dummy database and the already existing database which you can choose now.

Step 1 works.
Step 2 fails. Error "HM can't connect to postgreSQL database"

But the database is actually created on the host and I can access it from host's HM2

Here is the relevant part of the error log




00:22.181 [Main:PostgresqlDatabaseManager.TestConnection] connectionString=SERVER=192.168.1.65;PORT=5432;UID =postgres;PWD=postgrespass;POOLING=False;
00:22.702 [Main:PostgresqlDatabaseManager.TestConnection] Success
00:30.804 [Main:PostgresqlDatabase.Open] Finished Opening connection with SERVER=127.0.0.1;PORT=5432;UID=postgres;PWD=postgr espass;DATABASE=postgres;POOLING=False; in 20 ms
00:30.814 [Main:PostgresqlDatabase.Open] Finished Opening connection with SERVER=127.0.0.1;PORT=5432;UID=postgres;PWD=postgr espass;DATABASE=postgres;POOLING=False; in 10 ms
00:30.834 [Main:PostgresqlDatabase.Open] Finished Opening connection with SERVER=127.0.0.1;PORT=5432;UID=postgres;PWD=postgr espass;DATABASE=postgres;POOLING=False; in 10 ms
00:30.844 [Worker:PostgresqlDatabaseManager.CreateDatabaseAsy nc] Creating database dummydatabase
00:30.884 [Worker:PostgresqlDatabase.Open] Finished Opening connection with SERVER=192.168.1.65;PORT=5432;UID=postgres;PWD=pos tgrespass;POOLING=False;;DATABASE=postgres in 40 ms
00:33.948 [Worker:DatabaseBase.Open] FATAL: 3D000: database "dummydatabase" does not exist
00:33.958 [Main:PostgresqlDatabase.Open] Finished Opening connection with SERVER=127.0.0.1;PORT=5432;UID=postgres;PWD=postgr espass;DATABASE=postgres;POOLING=False; in 40 ms
00:33.998 [Worker:DatabaseBase.Open] Second attempt failed: FATAL: 3D000: database "dummydatabase" does not exist
00:34.008 [Worker:DatabaseBase.HandleDatabaseConnectionExcept ion] 1: Npgsql.NpgsqlException:
database "dummydatabase" does not exist
Severity: FATAL
Code: 3D000
at Npgsql.NpgsqlState.<ProcessBackendResponses_Ver_3>d__a.MoveNext()
at Npgsql.NpgsqlState.IterateThroughAllResponses(IEnu merable`1 ienum)
at Npgsql.NpgsqlConnectedState.Startup(NpgsqlConnecto r context)
at Npgsql.NpgsqlConnector.Open()
at Npgsql.NpgsqlConnectorPool.GetNonPooledConnector(N pgsqlConnection Connection)
at Npgsql.NpgsqlConnectorPool.RequestConnector(Npgsql Connection Connection)
at Npgsql.NpgsqlConnection.Open()
at HoldemManager.Modules.Services.Poker.Database.Data baseBase.Open(DbConnection connection, Boolean promptUserOnError, Int32 connectionID)


Can I change default settings somewhere (registry?) so it looks for the remote db by default, instead of 127.0.0.1 ?

netsrak
01-31-2012, 03:05 AM
When you create the new dummy database on the remote server you need to set it to default.

jelozano
02-25-2012, 04:47 AM
http://forums.holdemmanager.com/general-support/105201-connect-exixting-database-2.html