Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't connect to oracle DB from outside the VM.

3065370Nov 4 2015 — edited Nov 4 2015

So I have a MacOS machine and I installed the Oracle Developer Day VM from this link:

http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html

inside the VM, in unix, i can play with the DB using the SQL Developer tool.

it works, but that's not what I need.

I'm working on a java Spring API and I'm developing it in my Mac OS environment.

The oracle DB would be the datastore of that API and therefore I must connect to the running oracle DB from my mac, not from the VM.

the problem is I don't know how to do that. What IP? What Port?

In the mac terminal, to get the vm IP, i typed:

$ VBoxManage guestproperty get "Oracle DB Developer VM" "/VirtualBox/GuestInfo/Net/0/V4/IP"

Value: 10.0.2.15

and the port seems to be 1521 in SQL developer.

Virtual Box seems to have a port forwarding rule configured as follow:

name: sqlnet

protocol: tcp

Host IP:

Host port: 1521

guest IP:

Guest port: 1521

But it doesn't seem to work.

I can't ping the vm from the host machine with: pingĀ  10.0.2.15

my java API can't connect with: spring.datasource.url=jdbc:oracle:thin:@10.0.2.15:1521/orcl

What should i do to connect to the oracle DB running in the unix VM from my Mac?

Thanks

Comments
Post Details
Added on Nov 4 2015
3 comments
5,152 views