Debug Shell deprecated

Debugging a OX App Suite Middleware container

This document outlines steps to create a debug shell within an OX App Suite Middleware container.

Prerequisites

  • An active shell to a running Toolkit Container within the cluster. See Starting.

Debug

The mwctl debug shell command creates an ephemeral debug container in the given pod.

This is essentially useful for acting as a "debug shell", having access to a target container's processes and filesystem. Since the ephemeral container starts with its own Debian-based image, many tools are available for debugging purposes (e.g., vim, iputils, openjdk, etc).

To debug an OX App Suite Middleware container, use the mwctl debug shell command:

mwctl debug shell <POD>

Tip:

You can also use the --image flag to specify a custom image for the ephemeral debug container to start with.


Tip:

When entering a command, you can use the Tab key to autocomplete the pod name for convenience and accuracy.

The command starts a new ephemeral container in the given pod with process namespace sharing enabled. This allows to debug the target container, view its processes and access its filesystem via procfs.

In the debug shell, verify that you can see the processes of the target container:

ps aux 

You can also access the target container's filesystem via procfs:


Example: Accessing the filesystem of the OX App Suite Middleware container:
# Determine the PID of the OX App Suite Middleware process
pgrep -f '/opt/java.*open-xchange.*org.eclipse.osgi.*'
# Accessing the file system of the container via procfs
ls /proc/7/root/opt/open-xchange/

See Also

Refer to "debug shell" for a detailed explanation and a list of all available options.