Thread: Connecting to Postgres under Linux in VMWare from WindowsXP!!! (fwd)
Connecting to Postgres under Linux in VMWare from WindowsXP!!! (fwd)
From
lutscher2002@t-online.de (Bernd Wollny)
Date:
Hi! I think, this is my last chance to get a solution form my problem. And this is the following: background: postgres running under linux as guest in VMWare. Windows XP as host. Trying to connect from pgadmin under Win XP. Now i can't connect to postgres! There's always the following error message: 2002-12-18 22:44:59 - ************************************************* 2002-12-18 22:44:59 - Error(s) 2002-12-18 22:44:59 - ************************************************* 2002-12-18 22:44:59 - Error in pgAdmin II:frmConnect.cmdConnect_Click: -2147467259 - Could not connect to the server; Could not connect to remote socket. 2002-12-18 22:44:59 - Windows Version: Windows XP v5.1 build 2600 2002-12-18 22:44:59 - pgSchema Version: 1.4.1 2002-12-18 22:44:59 - MDAC Version: 2.7 2002-12-18 22:44:59 - cnPostgreSQL.State = adStateClosed Where's the fault? I started Postgres with the -i option for tcp/ip sockets! Hope for answers! Thanx and Greets Bernd
Re: Connecting to Postgres under Linux in VMWare from WindowsXP!!! (fwd)
From
Jean-Michel POURE
Date:
Le Vendredi 20 Décembre 2002 15:07, vous avez écrit : > Where's the fault? > I started Postgres with the -i option for tcp/ip sockets! > Hope for answers! 1) Try modifying /var/lib/pgsql/data/postgresql.conf and set TCP_IP socket to true. This will start PostgreSQL with -i option automatically. 2) Modify /var/lib/pgsql/data/pg_hba.conf and set the following line # TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT local all trust host all 127.0.0.1 255.255.255.255 trust host all client_ip 255.255.255.0 trust repace client_ip with your client IP. This will accept all connections from your client_ip. 3) Type "/etc/init.d/postgresql restart" You should be able to connect using psql under Linux and pgAdmin under Windows. Does it make it? /Jean-Michel
> -----Original Message----- > From: Bernd Wollny [mailto:lutscher2002@t-online.de] > Sent: 20 December 2002 14:07 > To: pgadmin-support@postgresql.org > Subject: [pgadmin-support] Connecting to Postgres under Linux > in VMWare from WindowsXP!!! (fwd) > > > Hi! > > I think, this is my last chance to get a solution form my > problem. And this is the following: > background: > postgres running under linux as guest in VMWare. > Windows XP as host. Trying to connect from pgadmin under Win > XP. Now i can't connect to postgres! There's always the > following error message: > > > 2002-12-18 22:44:59 - > ************************************************* > 2002-12-18 22:44:59 - Error(s) > 2002-12-18 22:44:59 - > ************************************************* > 2002-12-18 22:44:59 - Error in pgAdmin > II:frmConnect.cmdConnect_Click: -2147467259 - Could not > connect to the server; Could not connect to remote socket. > > 2002-12-18 22:44:59 - Windows Version: Windows XP v5.1 build 2600 > 2002-12-18 22:44:59 - pgSchema Version: 1.4.1 > 2002-12-18 22:44:59 - MDAC Version: 2.7 > 2002-12-18 22:44:59 - cnPostgreSQL.State = adStateClosed > > Where's the fault? > I started Postgres with the -i option for tcp/ip sockets! > Hope for answers! From a command prompt on your XP box, if you telnet to port 5432 on your linux VM and hit return a couple of times, what do you see? For example, here I get (pg 7.2): C:\>telnet postgresql 5432 Trying 192.168.1.43... Connected to nibbler.vale-housing.co.uk. Escape character is '^]'. EFATAL 1: invalid length of startup packet Connection closed by foreign host. C:\> Regards, Dave.
> -----Original Message----- > From: Bernd Wollny [mailto:lutscher2002@t-online.de] > Sent: 20 December 2002 14:53 > To: Dave Page > Subject: Re: [pgadmin-support] Connecting to Postgres under > Linux in VMWare from WindowsXP!!! (fwd) > > > Hi Dave! > > Its in german but i will translate it shortly: > > C:\>telnet postgresql 5432 > Verbindungsaufbau zu postgresql...Es konnte keine Verbindung > mit dem Host herges tellt werden, auf Port 5432: Verbinden > fehlgeschlagen > > That means as you thougt: > Connection refused to host on port 5432! > Not able to connect. No, they're subtly different. different. Your message was connection refused, but mine was invalid packet size. In other words, I connected to the PostgreSQL server (but it didn't like what I said), but you didn't. Are you sure you have a working network connection between XP and your Linux VM? Can you ping the VM from XP? Regards, Dave.
Re: Connecting to Postgres under Linux in VMWare from WindowsXP!!! (fwd)
From
Jean-Michel POURE
Date:
Dear lutscher, I understand the problem a little bit more. Each virtual machine should have a separate IP, even if you are not connected to a network or on the Internet. Therefore, each OS will be able to see each other. For example : - Linux : 192.168.0.1 - Windoze : 192.168.0.2 You should be able to ping from one virtual machine to another. Can you do that? If you don't know Linux and want to configure it, the best thing is to download and install Webmin from http://www.webmin.com Cheers, Jean-Michel POURE
Re: Connecting to Postgres under Linux in VMWare from WindowsXP!!! (fwd)
From
Jean-Michel POURE
Date:
Le Vendredi 20 Décembre 2002 16:14, Dave Page a écrit : > Can you ping the VM from XP? +1 Jean-Michel POURE
> -----Original Message----- > From: Bernd Wollny [mailto:lutscher2002@t-online.de] > Sent: 20 December 2002 15:56 > To: Dave Page > Subject: RE: [pgadmin-support] Connecting to Postgres under > Linux in VMWare from WindowsXP!!! (fwd) > > Are you sure you have a working network connection > between XP > >and your Linux VM? Can you ping the VM from XP? > > How can i do that, i know what ping is and so on, but how > should i ping (params?)? I must have a working network > direction, linux is connected with internet... Hi Bernd, That's where I can't really help as I don't have or know VMWare. If I remember correctly though, it provides a virtual network adaptor that you must configure in Linux. From XP you would simply: C:\> ping linuxbox For example, one of my servers is called nibbler: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\>ping nibbler Pinging nibbler.vale-housing.co.uk [192.168.1.43] with 32 bytes of data: Reply from 192.168.1.43: bytes=32 time=147ms TTL=253 Reply from 192.168.1.43: bytes=32 time=119ms TTL=253 Reply from 192.168.1.43: bytes=32 time=111ms TTL=253 Reply from 192.168.1.43: bytes=32 time=113ms TTL=253 Ping statistics for 192.168.1.43: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 111ms, Maximum = 147ms, Average = 122ms The replies indicate that we are communicating OK. However, this is not the place to get help getting your network or VMWare going. Regards, Dave.
Re: Connecting to Postgres under Linux in VMWare from WindowsXP!!! (fwd)
From
"Vikram Khurana"
Date:
Bernd, Try connecting using your IP. You can get the IP of VMWare using /sbin/ifconfig in Linux under root Vikram > -----Original Message----- > From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support- > owner@postgresql.org] On Behalf Of Bernd Wollny > Sent: Friday, December 20, 2002 4:07 AM > To: pgadmin-support@postgresql.org > Subject: [pgadmin-support] Connecting to Postgres under Linux in VMWare > from WindowsXP!!! (fwd) > > Hi! > > I think, this is my last chance to get a solution form my problem. And > this is the following: > background: > postgres running under linux as guest in VMWare. > Windows XP as host. Trying to connect from pgadmin under Win XP. > Now i can't connect to postgres! > There's always the following error message: > > > 2002-12-18 22:44:59 - ************************************************* > 2002-12-18 22:44:59 - Error(s) > 2002-12-18 22:44:59 - ************************************************* > 2002-12-18 22:44:59 - Error in pgAdmin II:frmConnect.cmdConnect_Click: - > 2147467259 - Could not connect to the server; > Could not connect to remote socket. > > 2002-12-18 22:44:59 - Windows Version: Windows XP v5.1 build 2600 > 2002-12-18 22:44:59 - pgSchema Version: 1.4.1 > 2002-12-18 22:44:59 - MDAC Version: 2.7 > 2002-12-18 22:44:59 - cnPostgreSQL.State = adStateClosed > > Where's the fault? > I started Postgres with the -i option for tcp/ip sockets! > Hope for answers! > > Thanx and Greets > Bernd > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org