For a college project, I have to set up a RAC Instance and an application, I already managed to configure my RAC lab by using virtual machines by using this video guide, now I just need to program an application to connect to my RAC instance but... I'm not sure how to do it! I suppose I have to connect to the SCAN network? But I had configured it as a private network in each machine's network adapter... I didn't configure DNS (I was stuck for 4 days and the video guide didn't actually show how to configure it), so now I'm stuck trying to connect to this database from DBeaver before I program my node app.
Here's some information regarding my lab.
I have two instances: node1 and node.
Service status:
$ /crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
Scan config?
$ ./srvctl config scan
SCAN name: node-scan, Network: 1
Subnet IPv4: 192.168.24.0/255.255.255.0/enp0s3, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.24.41
SCAN VIP is enabled.
SCAN 2 IPv4 VIP: 192.168.24.42
SCAN VIP is enabled.
SCAN 3 IPv4 VIP: 192.168.24.43
SCAN VIP is enabled.
Scan listener
$ ./srvctl config scan_listener
SCAN Listeners for network 1:
Registration invited nodes:
Registration invited subnets:
Endpoints: TCP:1521
SCAN Listener LISTENER_SCAN1 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN2 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN3 exists
SCAN Listener is enabled.
Since there is no DNS I had to configure /etc/host like so for both nodes.
# Default
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
# Public
192.168.24.1 node1.localdomain node1
192.168.24.2 node2.localdomain node2
# Private
192.168.10.1 node-priv.localdomain node1-priv
192.168.10.2 node2-priv.localdomain node2-priv
# Virtual
192.168.24.31 node1-vip.localdomain node1-vip
192.168.24.32 node2-vip.localdomain node2-vip
# SCAN
192.168.24.41 node-scan.localdomain node-scan
192.168.24.42 node-scan.localdomain node-scan
192.168.24.43 node-scan.localdomain node-scan