0

I am on windows and have a scala application having a main class which I simply run in my IDE to launch the application, and in the process a locally running oracle DB instance is connected to and some initial migration operations are performed. And all works fine.

Now when I try to run same application using docker, I see error:

Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: IO Error: The Network Adapter could not establish the connection (CONNECTION_ID=BlX 0QibPQjm+0Xl/nMnyFA==)

DB url configured in env config file is:

ORACLE_MAIN_DB_URL=jdbc:oracle:thin:@localhost:1521/xepdb1

What is wrong in my configuration?

Mandroid
  • 6,200
  • 12
  • 64
  • 134
  • Does this answer your question? [From inside of a Docker container, how do I connect to the localhost of the machine?](https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach) – astentx Aug 01 '22 at 09:32
  • I tried with network="host", but still same issue. – Mandroid Aug 01 '22 at 09:59
  • Just to be clear you are trying to connect to a database instance running natively in the OS from an application running in a container? There's a lot to unwrap here. Have you tried installing instant/client in the docker container and trying to connect that way? – Dom G Aug 01 '22 at 10:02
  • Yes, application is running in docker container, and database instance is running in windows host. I haven't tried with installing instant/client. I have another observation though. When I try to run it in docker in wsl, then I get ORA-00955: name is already used by an existing object. – Mandroid Aug 01 '22 at 10:11

0 Answers0