0
votes

I was trying to create a storage plugin configuration in apache-drill ( 1.6 ) for oracle jdbc. I have already copied ojdbc7.jar within the apache-drill-1.6.0/jars/3rdparty directory.

But am getting an error

Please retry: error (unable to create/ update storage)

while trying to create the storage plugin !

Here is the storage plugin configuration:

   {
      "type": "jdbc",
      "driver": "oracle.jdbc.OracleDriver",
      "url": "jdbc:oracle:thin:username/[email protected]:1521:***",
      "enabled": true
    }

& here is the drill-override.conf file :

drill.exec: {
  cluster-id: "drillbits1",
  zk.connect: "localhost:2181",
  sys.store.provider.local.path="/data/drill"
}

I have restarted drill after copying ojdbc7.jar file within the drill 3rd party directory !

I found some similar issues here in stackoverflow .. ( storage_plugin failure & drill-1.3&Oracle jdbc ) But nothing worked for me !!

Do you have any idea about this ?

[ I am using apache-drill version 1.6 in distributed mode , centOS 7 & java_version 1.8 ]

1
I am sure you must have verified your credentials and your password doesn't contains @. Did you find anything in logs?Dev
I have verified the login credentials... password doesn't contain '@'. I have tried to connect using the oracle SQL developer using the same details & it worked ! No more errors are showing in drill log files also ! :( Is there anything with the drill version ? I recently switched into drill 1.6 [ Initially I was using drill 1.4 & I was able to create configuration plugins there without much problems ]Arun Ramachandran
@devツ : I forgot to mention one thing ! I am doing this in a cloud server ( Microsoft Azure ) . So , do I have to open any port for this storage plugin creation purpose ? So far, I have opened ports 2181 (both inbound & outbound ), 5433 ( for jdbc driver - both inbound & outbound ) part from the ports for basic usage ! Do I have to open any other ports for establishing the connection between drill-server & oracle db ?Arun Ramachandran
I don't have any experience with cloud server Arun. But here is the detail about ports used by Drill.Dev
@devツ : What if the oracle db's time zone is different from the timezone of the server in which apache-drill is running ? Do you have any idea about this ? I just created a java code to connect to the same oracle db using the same credentials that I have mentioned in the question. This code failed when I ran this for the first time, by throwing an error : ORA-01882: timezone region not found . Then I added these two lines in my code - TimeZone timeZone = TimeZone.getTimeZone("Asia/Kolkata"); TimeZone.setDefault(timeZone); , then it started working & I was able to connect to the DB.Arun Ramachandran

1 Answers

2
votes

I solved this issue by myself. Here is the changes that I did to resolve this one :

  1. I changed my storage plugin configuration ( according to this POST )

    {    
      "type": "jdbc", 
      "driver": "oracle.jdbc.driver.OracleDriver",
      "url": "jdbc:oracle:thin:@<IP>:<PORT>:<SID>", 
      "username": "<USERNAME>", 
      "password": "<PASSWORD>",
      "enabled": true
    }
    
  2. Just changed drill-override.conf

    drill.exec: {
       cluster-id: "drillbits1",
       zk.connect: "localhost:2181",
      drill.exec.sys.store.provider.local.path="/data/drill"
    }
    

3 . Also, I replaced ojdbc7.jar with ojdbc6.jar ( I was trying to connect oracle DB version. 11.2.0.4 -