OPENSHIFT , JBOSS

OpenShift JBoss EAP

#jboss-clis.sh , #log , #logging , #EAP , #thread , #dumps

OpenShift JBoss EAP

Logging

To update the server on-the-fly, if you are debugging and don’t want your change to be persistent:

oc exec $POD_NAME -- /opt/eap/bin/jboss-cli.sh -c "/subsystem=logging/logger=org.keycloak:add(level=TRACE)"

Note that the above requires the server to already be booted. If you are troubleshooting the boot sequence you’ll need to update the standalone configuration. You may also want changes on a more permanent basis.

  1. Get the existing configuration:

    oc exec $POD_NAME cat /opt/eap/standalone/configuration/standalone-openshift.xml > standalone-openshift.xml
  2. Edit the file as needed.

  3. Mount the updated file as a ConfigMap:

    oc create cm standalone --from-file=standalone-openshift.xml
  4. Add the ConfigMap to your DeploymentConfig

    oc set volume dc $DC_NAME --add --name=standalone --mount-path=/opt/eap/standalone/configuration/standalone-openshift.xml --sub-path=standalone-openshift.xml --type=configmap --configmap-name=standalone

Thread Dumps

$ oc exec $POD_NAME -- jstack -l $(oc exec $POD_NAME -- ps -ef | grep "bin/java" | awk '{print $2}') > tdump.out