1

I am trying to test the connectivity between the local personal computer and the virtual machine by running a client-server socket program.

here is what i am doing :

1) i am running the Kubuntu 10.10 on vm player. 2) Installed java 6 3) Ran a simple java program connectionServer through konsole specifying a port number 7114. 4) Kubuntu shows that its conected with this ip address : 192.168.206.129 5) then on my win 7 machine i ran a java program connectionClient but it gives me the following error : Network is unreachable

I tried pinging the IP adress through dos and it works perfectly but im not able to connect it through my java program. ( Program is correct ). Disabled all the firewalls on my win machine.

please help me or suggest me some troubleshoot steps. I'll be highly grateful to you.

Regards

Shashank.Kr
  • 77
  • 3
  • 12

2 Answers2

0

In order to use sockets in virtual machine, virtual sockets are to be created instead of normal sockets as virtual machine lies in its own machine, look for virtual socket programming API suitable for your virtual machine software you are using

0

First check firewall. Typically you have Windows firewall on windows and some firewall on linux. For example if it is iptables say /etc/iptables stop. Then try again.

AlexR
  • 114,158
  • 16
  • 130
  • 208
  • thanks a lott for the reply however, i cant turn off the firewall on kubuntu 10.10 this is the dos error which i am getting C:\Program Files\Java\jdk1.7.0_01\bin>java connectionClient 192.168.206.129 7114 welcome java.net.SocketException: Network is unreachable: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI mpl.java:69) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja va:337) – Shashank.Kr Oct 24 '11 at 20:49
  • and this is the bash error : /etc/iptables: no such file or directory – Shashank.Kr Oct 24 '11 at 20:51