Cannot connect to Oracle

Discussions related to using VirtualBox on Windows hosts.
Post Reply
VWTx2003
Posts: 5
Joined: 11. Jul 2018, 19:26

Cannot connect to Oracle

Post by VWTx2003 »

I have a small lab in my laptop where I have three Virtual Machines. All three virtual machines have Windows 2016 server as the OS. I created a NAT Network for them to "talk" to each other and have access to the internet. All three are using this Nat network and I can ping the other two from one of the machines and they all respond. So, they can communicate.

One of the machine is just a domain controller where I created a "mydomain.local" domain. Nothing else is here.

The second VM I called it "oracle" and it was added to the domain. I can ping it as "oracle.mydomain.local" from any f the other two machines and it responds. In this second VM I installed oracle XE and it works fine from within this "oracle" machine (localhost:1521 works just fine and so does oracle.mydomain.local:1521). The listener of the database is up and running and I can do "telnet oracle.mydomain.local 1521" just fine. So, that tells me there is nothing wrong with it. I also created a rule in the incoming firewall of Windows where I opened port 1521.

In the third machine I have installed a client to connect to my "oracle.mydomain.local:1521" server. I can ping oracle.mydomain.local and it responds. However, when I ping oracle.mydomain.local:1521 I get not response. If I try to connect to the database I cannot. So, it looks to me that the communication is being blocked at some point between the VM's.

So, it looks to me that I am missing something at some point and I think it is between the VM's. However, I cannot pinpoint it. So, please, let me know if I am missing something in my network or my VM's.

Thanks!
okiuss
Posts: 61
Joined: 7. Nov 2016, 14:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX,LINUX,WINXXX
Location: Austria

Re: Cannot connect to Oracle

Post by okiuss »

Depending on your Oracle DB version ... Oracle RDBMS on windows only uses port 1521 for the initial connect with the
listener and then spawns a new socket to an arbitrary port. So your port forwarding with a NAT network on port 1521
will NOT work.
Solution 1) Use bridged networking an disable the firewall at all.
Solution 2) set environment variable USE_SHARED_SOCKET=true -> all communication will be done by port 1521

OK
VWTx2003
Posts: 5
Joined: 11. Jul 2018, 19:26

Re: Cannot connect to Oracle

Post by VWTx2003 »

thanks for your response. I actually figured it out. It was something in the firewall. I ended up creating a rule where I opened all the ports (it is just a lab with no outside access, so it is ok to have low security) and it worked. But it was definitely strange that even though I had a rule for that specific port it was not working.
Post Reply