Remote Debugging with JPDA won't connect to Tomcat through eclipse when using Docker-Compose -


i'm new docker simple i'm doing wrong. solutions out there i've been able remote debugging working eclipse when using 'docker run' launch tomcat container.

docker run -it --rm -e jpda_address=8000 -e jpda_transport=dt_socket -p 8888:8080 -p 8000:8000 tomcat:8.0-jre8 /usr/local/tomcat/bin/catalina.sh jpda run

however when using docker-compose, "failed connect remote vm. connection refused" dialog.

docker-compose up

docker-compose.yml settings:

tomcat: image: tomcat:8.0-jre8 # start - remote debugging settings # didn't work or without network_mode setting. bridge settings seen 'docker container inspect *cid*' looks identical working solution network_mode: bridge environment: - jpda_address:8000 - jpda_transport:dt_socket entrypoint: /usr/local/tomcat/bin/catalina.sh jpda run # end - remote debugging settings deploy: restart_policy: condition: on-failure placement: constraints: [node.role == manager] ports: - 8888:8080 # remote debugging settings jpda port - 8000:8000

my eclipse settings work 'docker run' are:

remote java application: host: localhost port: 8000

note: docker-compose settings see expected print in startup output:

listening transport dt_socket @ address: 8000

and both deployments can access web service's functionality through exposed port 8888. ie. simple link returns 'hello'.

http://localhost:8888/myemulatorservice/rest/mes/

any thoughts on why can't remote debug when launching way? suspect there's subtle difference in way network configuration setup.

a buddy of mine figured out. though startup output makes appear working , default port , transport used catalina.sh 8000, dt_socket.

the environment variables not being passed container , causing breakage. maybe else can explain how impacts .sh script?

this problem detected tunneling container , listing environment variables.

docker exec -it *cid* bash env 

the change docker-compose.yml file looks like:

   environment:      jpda_address: 8000      jpda_transport: dt_socket 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -