Host to VM networking for Oracle connection

Discussion in 'Windows Virtual Machine' started by ZoltanG, Dec 29, 2010.

  1. ZoltanG

    ZoltanG Bit poster

    Messages:
    5
    Hello,

    I am running Oracle 11g on a Windows 7 guest and cannot connect to the Oracle instance using SQL*Net on port 1521 on the VM from the host. I am configured to use "Bridged Ethernet" networking and can ping the VM from the host and vice versa. The firewall on Windows is disabled. Any tips or ideas would be appreciated. If anyone has this configuration working, I would love some input on what your successful configuration looks like.

    Thanks,
    Zoli
     
  2. Joe Ney

    Joe Ney Bit poster

    Messages:
    9
    set-up

    I haven't used this configuration, but worked with Oracle on a linux system. On Windows check that the listener is running and make sure that listener.ora is configured correctly. On the host make sure that tnsnames.ora is configured correctly. You can use tnsping on the host to be sure the set-up is correct before actually trying to connect with oracle. Information on the correct configuration for listener.ora and tnsnames.ora can be found at the Oracle site and other sites on the web.
     
  3. ZoltanG

    ZoltanG Bit poster

    Messages:
    5
    Thanks for the response Joe. I'm afraid the listener is running and set up correctly. I'm able to connect to the Oracle instance from within the VM without issue using Oracle*Net. As for the tnsnames.ora, I don't have one on the host because I'm using SQLDeveloper to connect using a direct connection to the database by specifying the host, port and SID in the connection request. I'm able to connect to other instances this way without issue, just not to the VM instance.
     
  4. Joe Ney

    Joe Ney Bit poster

    Messages:
    9
    set-up

    On Mac try going to applications/utilities/network utility and tab port scan. See if the port is open. I often went from developer in windows to the Oracle database in linux. To do that I had to set up ODBC to make the connection. I don't know what the OS X equivalent to do this is.
     
  5. ZoltanG

    ZoltanG Bit poster

    Messages:
    5
    The port doesn't appear to be open. However, I'm not sure what this means or why this is. Can you advise on how I would open this port or make it available? I have Windows' firewall disabled altogether to make sure it wasn't causing problems with the connection.
     
  6. Joe Ney

    Joe Ney Bit poster

    Messages:
    9
    Did you use the IP address for the Windows VM? Try nc <IP Address for windows> 1521 . You should be able to connect to windows. (You will see no responce. If you use an unused port it will just return you to your prompt.)
     
  7. Joe Ney

    Joe Ney Bit poster

    Messages:
    9
    Another thought. If your are in Parallels shared network, try bridged network instead. I couldn't ping my windows VM in shared network. But I could ping in in bridged network.

    Also, I am in the process of installing 11g on a Linux using Parallels. I'll see if I can get it to work and let you know the results.
     
  8. ZoltanG

    ZoltanG Bit poster

    Messages:
    5
    Thanks so much for the suggestions. I'm afraid I'm still having no luch though.

    I tried running the "nc <ip address for windows> 1521 and it returned me to the prompt indicating an unused port as you suggested. Also, I am in bridged network mode and am able to successully ping the VM. That's why I'm confused. If I can ping the VM and Oracle is running and the listener is running, why can't I get to port 1521 on the VM? As I mentioned before, no firewall is enabled on the VM.

    When I run netstat in the VM, I see this line for port 1521...

    TCP 127.0.0.1:59669 zoli-mac-VM:1521 ESTABLISHED

    Not sure if this helps at all. I tried nc <ip address> 59669 and that also did nothing.
     
  9. soundevolution

    soundevolution Member

    Messages:
    62
    Are there other network services that you can service from the Windows VM to the Mac host, eg file sharing, and see if they work?

    If you run `ping zoli-mac-VM` in windows, does it show an ip4 or ip6 address? Wondering if there's some ip4/6 issue here...

    Can you also try connecting to the windows service from windows, but explicitly use the same ip address that the may sees (that was used in Network Utility). Wondering if perhaps the service is bound to a wrong interface in windows, such that it can be reached in windows, but not to the bridged interface (and to the rest of the network).
     
  10. ZoltanG

    ZoltanG Bit poster

    Messages:
    5
    Thanks for the reply.

    When I ping zoli-mac-VM from within Windows, it displays an ipV6 address...

    C:\Users\Zoli>ping zoli-mac-VM

    Pinging zoli-mac-VM [fe80::c0dd:1a13:b28e:c41%11] with 32 bytes of data:
    Reply from fe80::c0dd:1a13:b28e:c41%11: time<1ms
    Reply from fe80::c0dd:1a13:b28e:c41%11: time<1ms
    Reply from fe80::c0dd:1a13:b28e:c41%11: time<1ms
    Reply from fe80::c0dd:1a13:b28e:c41%11: time<1ms

    Ping statistics for fe80::c0dd:1a13:b28e:c41%11:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms


    From within Windows, I am able to connect to the oracle instance with a direct connection using any of the following
    1. localhost
    2. zoli-mac-VM
    3. 10.1.8.213 (the ip address of the VM)
     

Share This Page