Dataiku not able to connect to oracle database

suraj1012
Level 2
Dataiku not able to connect to oracle database

Hi, 

I have installed dataiku 9.0.7 on RHEL 7 EC2 server, but I am not able to connect to any oracle remote database.

I have downloaded the odbc8.jar to dataiku-data/lib/jdbc, and restarted dss. Also installed oracle instant client and odbc drivers. 

Error -
Failed to reach database: Failed to connect, caused by: SQLRecoverableException: IO Error: The Network Adapter could not establish the connection, caused by: NetException: The Network Adapter could not establish the connection, caused by: IOException: Connection refused.

 

0 Kudos
10 Replies
Turribeach

Are you sure there is connectivity from your AWS EC2 VM to this Oracle database? Trying pinging your database hostname from your server.

suraj1012
Level 2
Author

There is connectivity from EC2 server to Database, pinging database hostname works properly.

0 Kudos
Turribeach

Try using nmap to test if you can connect to the database port.

Install nmap in RHEL:

yum install nmap --enablerepo=epel

Then test the connection using nmap:

nmap -vv -Pn -p database_port database_host

And paste the outpout of that here.

suraj1012
Level 2
Author

$ nmap -vv -Pn -p 1521 <hostname>

Starting Nmap 6.40 ( http://nmap.org ) at 2022-09-13 04:01 EDT
Initiating Parallel DNS resolution of 1 host. at 04:01
Completed Parallel DNS resolution of 1 host. at 04:01, 0.01s elapsed
Initiating Connect Scan at 04:01
Scanning <hostname> (<IP>) [1 port]
Completed Connect Scan at 04:01, 0.02s elapsed (1 total ports)
Nmap scan report for <hostname> (<IP>)
Host is up (0.020s latency).
rDNS record for <host>
Scanned at 2022-09-13 04:01:52 EDT for 0s
PORT STATE SERVICE
1521/tcp closed oracle

Seems like 1521 post is closed. How do I open it?

0 Kudos
Turribeach

Closed doesn't always mean the port is closed but can also mean you can't get to it. Most likely there is a firewall in the middle, so speak to your networks team. The fact that ping works doesn't mean traffic on TCP 1521 port will work as ping runs on a different port and is generally allowed internally. Here is what I see when I nmap to one of our Oracle databases from the Dataiku server:

PORT STATE SERVICE REASON
1622/tcp open ontime syn-ack

suraj1012
Level 2
Author

There is no firewall running. 
I have actually migrated dataiku Data directory from an old server to a new one. 
Oracle connection is proper in the old one. I am comparing all kinds of settings and configs between the two.
Security groups are also exactly same. 

0 Kudos
Turribeach

What do you mean there are no firewall running? If you are on AWS you got firewalls all over the place. Do you have your Oracle database on the same AWS project as the Dataiku VM? Do they use the same subnet IP?

0 Kudos
suraj1012
Level 2
Author

I mean firewalld/firewall-cmd are disabled on the server.
What other firewall can I check?

Oracle database is not on AWS.  Correct Inbound security rules have been added for the same. 

0 Kudos
Turribeach

I didn't mean a software firewall in your VM but firewalls along your network connection. If your Oracle database is on-prem and your Dataiku VM on-cloud you will have a number of firewalls in the middle. You need to speak with your networks team, we can't help you here. 

0 Kudos
suraj1012
Level 2
Author

I have reached out to the networks team, will get it resolved. Thank you @Turribeach 

0 Kudos