oracle / weblogic-kubernetes-operator

WebLogic Kubernetes Operator

Home Page:https://oracle.github.io/weblogic-kubernetes-operator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WLS Operator: No way to enable java remote debugging ports on wl deployments

motmot80 opened this issue · comments

Background

We are also using WL Operator in test and development environments and need a way to attach a remote java debugger to our container deployments.

Problem

It is possible to deploy cluster nodes with

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n

But there seems to be no way to enforce a domain deployment with a container port on 9999 so it's possible to attach a java debugger. F.e. with port forwarding.

The ServerTemplate.NetworkAccessPoint domain configuration seems to support T3 channels only.

The remoteDebugNodePortEnabled values configuration is for operator remote debugging.

So how to enable external java remote debugging on the wls nodes?

Thanks to @jshum2479 for providing this answer.

After the pod has been started with the relevant JAVA_OPTIONS (See https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-resource/ for differences options of NM, and WLS server to avoid conflict).
User can expose or create a service to expose the pod's port so that the debugger can connect to it.

Check the doc on kubectl expose or kubectl explain service spec

@motmot I assume this issue is resolved.