oraclebase / vagrant

Vagrant Builds
https://oracle-base.com/
GNU General Public License v3.0
190 stars 167 forks source link

Can't connect to RAC instances from host #32

Closed mmhh1910 closed 2 years ago

mmhh1910 commented 2 years ago

The public network is defined like this in the Vagrantfiles of the machines:

config.vm.network "private_network", ip: var_public_ip, virtualbox__intnet: "public"

This creates an "internal network" which does not allow host->guest connections.

The alternative of connecting to one of the forwarded ports (1521 on the two nodes forwarded to 1521 and 1522 on the host) does not work - I suspect because the actual connection is moved to a different port after the initial connection to the listener and that will simply not work since communication on an arbitrary port is not allowed between guest and host.

I think this "public" network should be a virtualbox "host-only" network, which allows communication between all guests and the host.

This can be achieved by removing the virtualbox__intnet name from the definition of the network in all Vagrantfiles:

config.vm.network "private_network", ip: var_public_ip

With this change, I can successfully connect to an instance from the host, e.g. by using one of the scan listener IPs and port 1521.

oraclebase commented 2 years ago

I don't know if you are running with an old copy of the repo, but when I check the VagrantFile files for all the RAC builds they are already defined the way you mentioned. The last commit for some of these were 2 years ago, and they have that definition.

Which build are you actually looking at?

mmhh1910 commented 2 years ago

OMG... sorry. :-) I didn't notice I was using an outdated clone. Thanks for the answer and publishing these builds!

oraclebase commented 2 years ago

No worries. Have a good one! 😉