Skip to content
Install

Read logs and open a shell

When an app misbehaves, its logs and a shell inside its container are usually the fastest way to find out why. Use the console on the app’s Overview tab to follow what the app is doing now, read the output of a container that crashed, or run commands in a container. To search older logs, use Observe > Logs, described in Monitor an app.

  1. Open the app.
  2. Go to Overview.
  3. In the console, select Logs.
  4. To follow one replica, open the source menu.
  5. Select a pod and container.

Past logs include replicas that have since been replaced. They come from the instance’s log store. If the view is empty, refer to Configure logs and request data.

  1. Open the app.
  2. Go to Observe > Logs.
  3. Select a time range.

Orchard captures the final output of a container that was killed, including out-of-memory (OOM) kills. It attaches the output to the app.

  1. Open the app.
  2. Go to Overview.
  3. In the console, open the source menu.
  4. Select the entry for the container labeled Output from before the last crash.

In a crash loop, a container starts and exits, and Kubernetes restarts it. Read the exit reason and the last logs.

SymptomLikely causeWhat to do
Exits immediately with a module or import errorThe image is missing a dependency, or the build used the wrong stageCheck the build stage
Exits after a few seconds with connection refusedThe app cannot reach its databaseCheck the internal host and the credentials
Killed with exit code 137The container ran out of memoryRaise the memory limit or fix the leak
Runs but never becomes readyThe health check path or port is wrongCheck health checks

A shell opens a terminal inside a running container. It uses the same authentication as the dashboard.

  1. Open the app.
  2. Go to Overview.
  3. In the console, select Shell.
  4. If the app has more than one pod or container, select one.

Changes you make in a shell are lost on the next restart. A command that uses too much memory can cause Kubernetes to kill the container.

A database has the same console on its Overview tab.

  • Logs streams the logs of an instance.
  • Killed lists containers killed in the last 24 hours, with their final output.
  • Shell opens a terminal in an instance.

To open psql from the CLI, run orchard db psql <id>.

Observe > Events lists crashes and Kubernetes warnings for the app’s pods, newest first. It includes failed scheduling, image pull problems, probe failures, and volume mounts. It also shows how many times each one repeated.

The alert banner above an app’s tabs shows only problems that exist now. Kubernetes keeps warning events for about an hour after a problem clears, so the history can show warnings the banner does not.