I have written below Dockerfile for Metabase installation in GCP for connecting to Oracle database.
FROM metabase/metabase
COPY ./ojdbc8.jar /plugins/
RUN chmod 777 /plugins/ojdbc8.jar
ENTRYPOINT ["/app/run_metabase.sh"]
EXPOSE 3000
I have build this dockerfile and deployed the image to GKE(Google Kubernetes Engine), but the Oracle database is not getting connected and getting below exceptions,
[eb5ac13a-5bdd-4525-a28a-e487c736758c] 2022-09-08T18:41:34+05:30 ERROR metabase.api.database Cannot connect to Database clojure.lang.ExceptionInfo: IO Error: Connection closed, connect lapse 237 ms., Authentication lapse 0 ms. {:message "IO Error: Connection closed, connect lapse 237 ms., Authentication lapse 0 ms."} at metabase.driver.util$can_connect_with_details_QMARK_.invokeStatic(util.clj:153) at metabase.driver.util$can_connect_with_details_QMARK_.doInvoke(util.clj:126) at clojure.lang.RestFn.invoke(RestFn.java:442) at metabase.api.database$test_database_connection.invokeStatic(database.clj:540) at metabase.api.database$test_database_connection.doInvoke(database.clj:530)
I also tried configuring Mongo DB in Metabase and its working fine. But only issue is with this Oracle DB in Metabase.
Also, i tried deploying same image in my local machine and its working fine there.
The oracle port is open in GCP and also we checked connectivity between GCP and Oracle DB server, its fine.
Can anyone please assist ASAP as to why we are facing issues with Oracle DB in Metabase in GCP.
Hi @techietalkie007
Post "Diagnostic Info" from Admin > Troubleshooting.
And which version of ojdbc you are using.
If it is working on your local machine, but not on GKE, then there must be something that is different, so look through the entire log and compare.
Also i see below error messages in the metabase logs. I already checked the network connectivity between Metabase in GKE(Google Kubernetes Engine) and Oracle DB, connectivity is fine.
[eb5ac13a-5bdd-4525-a28a-e487c736758c] 2022-09-08T18:41:34+05:30 ERROR metabase.api.database Cannot connect to Database clojure.lang.ExceptionInfo: IO Error: Connection closed, connect lapse 237 ms., Authentication lapse 0 ms. {:message "IO Error: Connection closed, connect lapse 237 ms., Authentication lapse 0 ms."} at metabase.driver.util$can_connect_with_details_QMARK_.invokeStatic(util.clj:153) at metabase.driver.util$can_connect_with_details_QMARK_.doInvoke(util.clj:126) at clojure.lang.RestFn.invoke(RestFn.java:442) at metabase.api.database$test_database_connection.invokeStatic(database.clj:540) at metabase.api.database$test_database_connection.doInvoke(database.clj:530) at clojure.lang.RestFn.invoke(RestFn.java:425) at metabase.api.setup$fn__77030.invokeStatic(setup.clj:177) at metabase.api.setup$fn__77030.invoke(setup.clj:171) at compojure.core$wrap_response$fn__28102.invoke(core.clj:160) at compojure.core$wrap_route_middleware$fn__28086.invoke(core.clj:132) at compojure.core$wrap_route_info$fn__28091.invoke(core.clj:139) at compojure.core$wrap_route_matches$fn__28095.invoke(core.clj:151) at compojure.core$routes$fn__28114$f__28115.invoke(core.clj:198) at compojure.core$routes$fn__28114$f__28115$respond_SINGLEQUOTE___28116.invoke(core.clj:197) at compojure.core$wrap_route_matches$fn__28095.invoke(core.clj:152) at compojure.core$routes$fn__28114$f__28115.invoke(core.clj:198) at compojure.core$routes$fn__28114$f__28115$respond_SINGLEQUOTE___28116.invoke(core.clj:197) at compojure.core$wrap_route_matches$fn__28095.invoke(core.clj:153) at compojure.core$routes$fn__28114$f__28115.invoke(core.clj:198) at compojure.core$routes$fn__28114.invoke(core.clj:200) at compojure.core$routes$fn__28114$f__28115.invoke(core.clj:198) at compojure.core$routes$fn__28114.invoke(core.clj:200) at compojure.core$make_context$handler__28142.invoke(core.clj:289) at compojure.core$make_context$fn__28146.invoke(core.clj:299)