Network Adapter error when accessing a web app from my desktop on a container in the same network as the oracle database container


I’m running the latest oracle container and a tomcat container tomcat:9.0.22-jdk8 on my own network and I used the following commands:

docker network create mynetwork

docker run -dit -p 8080:8080 -e JPDA_ADDRESS=8000 -p 8000:8000 -e JAVA_OPTS=’-Dconfig.file=/usr/local/tomcat/temp/ -Xmx512m’ --name rcmc rcm-container:0.1 jpda run

docker run -dit -p 1521:1521 --name rcmdb rcmoracledatabase:0.1

docker network connect mynetwork rcmc
docker network connect mynetwork rcmdb

I can login from my desktop to the database container without any issues using these tnsnames.ora entries:


When I try to login from my webapp at http://localhost:8080/ I get a server 500 error with the following exceptions: The Network Adapter could not establish the connection
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

I’ve tried the following JDBC connection strings, but I can’t seem to connect to the oracle container.


These commands work on my co-worker’s laptop, but he’s running docker toolbox on his desktop

My docker info
Kernel Version: 4.9.184-linuxkit
Operating System: Docker Desktop
OSType: linux

His docker info
Kernel Version: 4.14.116-boot2docker
Operating System: Boot2Docker 18.09.6 (TCL 8.2.1)
OSType: linux

Am I missing something? Are there any settings that I need to look into?

Thanks in advance for any info.

In reading this documentation, the following worked