PDA

View Full Version : PostGRE on OSX, HoldemManager via Parallels



InTheCards
12-05-2009, 02:46 AM
I have a Macbook Pro which has a Windows VM running via Parallels (Windows 7). I installed PostgreSQL in OSX with the plans on running the SQL Server locally in OSX while running Hold'em Manager in Windows at the same time.

I modified the pg_hba.conf config file to accept connections from the IP range that the Virtual Machine uses, but I dont think I did it correctly; does anyone have experience with this configuration? Do you see any errors that I did not catch? The IP address for the Virtual Machine is 10.211.255.8 currently but the computer gets the IP address via DHCP, with the subnet mask of 255.255.255.0 on the 10.211.255.0 subnet.

host all all 10.211.255.0/32 md5

thanks in advance for your help!

netsrak
12-05-2009, 03:03 PM
Please add the exact IP adress of your vm to the conf file:

host all all 10.211.255.8/32 md5


If it doesn't work please try to "ping" your host from your vm and try to connect via pgadmin from the vm to the postgresql server.

For further help please post your complete pg_hba.conf file.

InTheCards
12-05-2009, 05:13 PM
as per your recommendation I revised the IP to the exact IP used by the VM, but I get the same results. I installed PGADMIN III on the VM to test the setup, the error message I get is


Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "10.211.55.8" and accepting TCP/IP connections on port 5432?

I checked the "listen_addresses" parameter in the postgresql.conf file, it is set to "*" by default and is not commented out.

here is the exact pg_hba.conf config file I used (minus the commented text of course)

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 10.211.55.8/24 md5
# IPv6 local connections:
host all all ::1/128 md5

Thanks for your help!

netsrak
12-06-2009, 07:56 AM
This is the one that works for me:


# Database administrative login by UNIX sockets
local all postgres ident

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
#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


192.168.209.205 is my virtual machine
I think the /24 md5 is wrong in your configuration

InTheCards
12-06-2009, 11:58 AM
I revised the conf file as shown below but it did not solve the problem. Any other ideas?



# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 10.211.55.8/32 trust
# IPv6 local connections:
host all all ::1/128 md5

netsrak
12-06-2009, 02:38 PM
Any firewalls in use?

InTheCards
12-06-2009, 02:39 PM
Any firewalls in use?


I am very tech-savvy, I disabled the firewall before testing because I am aware that this could be an issue. Are there any threads I can read that you may be aware of that discuss similar setups, Postgre SQL on OSX and client in VM?

InTheCards
12-07-2009, 03:12 PM
I FOUND THE SOLUTION!

I discovered that we cannot address the host machine's POSTGRE SQL server via the computer name when using a Parallels VM, the name is not routable. Instead the IP address 10.211.55.2 should be used because it is the host address which is directly accessible for the Host server while the VM works in SharedNetworking mode.

I hope my discovery helps someone else in the future.

jakob
12-15-2009, 08:38 PM
did you change the login name or the port number because I tried 10.211.55.2 and I still have connection errors?