1

I have a containerized WebLogic server which is running on my docker host mapped with three port: 5556, 6001, 7001. I have deployed my java product and everything is successful. I have also assaign a debug port on 8453 based on this article on WebLogic:

https://docs.oracle.com/en/cloud/paas/java-cloud/jscug/enable-jvm-debug-port.html#GUID-C83E051D-3A28-4FE7-8333-20F40A06DAEA

In Intellij IDE, I configured my debug port on localhost port 8453 in ‘Edit Configuration…’ . here everything seems extremly OK and good. But as I am going to debug connection gets failed.

"unable to open debugger port (localhost:8453): java.net.connectException "Connection refused: connect"

I am a little bit naive in WebLogic server. It might be because somehow given port not mapped causes this error. Please help me if anybody there had such experience before.
  • you are trying to connect localhost:8453 which looks incorrect, as far as I know docker has its own IP, check https://stackoverflow.com/a/46310428/175554 – ozkanpakdil Feb 22 '21 at 22:09

1 Answers1

1

The environmental variable JAVA_OPTIONS is typically being set on startWeblogic.sh. With using a dockerized weblogic, the same variable needs to be set with the debug options and the address.

For example, you can set the variable on your Dockerfile. The following will set the debug port for the Weblogic applications to 4000 :

ENV JAVA_OPTIONS $JAVA_OPTIONS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n

Also this port needs to be exposed. For example on docker-compose.yml:

ports:
        - 4000:4000

On IntelliJ IDEA, the handshake is succesful without using IP Address of the container.

enter image description here

Manuel Pap
  • 1,309
  • 7
  • 23
  • 52