1

I have oracle database instance up and running on vmware player on Redhat linux(Guest OS). This virtual machine is running on on windows 7 computer(Host OS). I am able to connect to the database instance running on vm using sql developer which is running on my windows7 computer.

But when I try to connect to this database instance from my mac os, sql developer running on mac os can not connect to this database instance.

but , I am able ping my windows7 ip address from my mac os,

I am able to telnet port 80 on my windows7 computer from mac computer.

But I am unable to telnet port 1521 from the mac os.

Could anybody help me to configure my macos and windows7 computers to connect to database instance which is running on vmware player.

Thanks in advance for any help

Edit 1: Following is the output from netstat -an |grep 1521 from redhat linux virtulal machine instance

[ora112@localhost ~]$ netstat -an|grep 1521
tcp        0      0 0.0.0.0:1521                0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:1521              127.0.0.1:41677             ESTABLISHED
tcp        0      0 127.0.0.1:41677             127.0.0.1:1521              ESTABLISHED
unix  2      [ ACC ]     STREAM     LISTENING     17671  /var/tmp/.oracle/sEXTPROC1521

Following output is from windows7 pc

$ netstat -an|grep 1521
  TCP    127.0.0.1:1521         0.0.0.0:0              LISTENING
  TCP    [::1]:1521             [::]:0                 LISTENING

Ip configuration on windows7 computer

 Connection-specific DNS Suffix  . :
 Link-local IPv6 Address . . . . . : fe80::94b0:30a1:5c95:2e75%12
 IPv4 Address. . . . . . . . . . . : 192.168.1.23
 Subnet Mask . . . . . . . . . . . : 255.255.255.0
 Default Gateway . . . . . . . . . : 192.168.1.1

Ip configuration on macos computer

en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether e4:ce:8f:32:37:f6 
    inet6 fe80::e6ce:8fff:fe32:37f6%en1 prefixlen 64 scopeid 0x5 
    inet 192.168.1.19 netmask 0xffffff00 broadcast 192.168.1.255
    media: autoselect
    status: active

ip configuration on my vmware instance

[ora112@localhost ~]$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:C4:D3:5C
          inet addr:192.168.15.133  Bcast:192.168.15.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1938 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1222 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:219505 (214.3 KiB)  TX bytes:163937 (160.0 KiB)
2
  • 1
    Couple of questions. Overall good 1st post. Is the database listening only on the 127.9.0.1 interface or is it listening on either your VMs ip address or 0.0.0.0 (all). You can confirm with the command netstat -an and look for something listening on port 1521.
    – slm
    Dec 30, 2012 at 14:15
  • I have updated the question with the output for netstat -an|grep 1521 command
    – KItis
    Dec 30, 2012 at 15:35

2 Answers 2

2

Check what network configuration you are using in your guest. You'd probably rather use bridged mode to get the guest on its own IP address.

Check the firewall on your guest isn't blocking and the Oracle listener to make sure it's bound to the IP address.

3
  • on my vmware instance, i am using NAT
    – KItis
    Dec 30, 2012 at 16:01
  • Your answer solved my problem. I changed the the network configuration on my virtual machine to Bridge Mode. But I would like to understand what difference it make based on which network configuration i am using. Could you direct me to a source where i can get more knowledge on NAT, Bridge and hostonly configuration
    – KItis
    Dec 30, 2012 at 16:23
  • Chapter 7 of this document vmware.com/pdf/vmware_player40.pdf is pretty good. Dec 31, 2012 at 0:41
1

I assume the problem is that you're using an internal network (hostonly or other stuff like that) on your windows7 pc, e.g. a 192.168.56.0/24 subnet for that while your normal local subnet is 192.168.178.0/24.

So what you need to do is to implement a traffic redirection / forwarding on the windows7 pc for this specific port to the vm to your database instance. Doing this on windows where nothing comperable to the unix tools like netfilter/iptables exists seems like quite a hard job to me. My only idea would be to try your luck with netsh but there are good chances that things become worse.

A more easier way would be to bridge an existing network interface (maybe you have more than one at your windows7-pc?).

1
  • Yes, as you said, I am using internal network. I have updated the question with my ip configuration
    – KItis
    Dec 30, 2012 at 15:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .