> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

noindex: true

Anaconda’s Data Science & AI Workbench provides detailed logs and monitoring information related to the Kubernetes services and containers it uses. Gravity-based installations can use the provided Operations Center and Kubernetes CLI to access this information, to help diagnose and debug errors that you or other users may encounter while using the platform.

## Gravity troubleshooting

Administrators can access the Operations Center to configure, monitor, and troubleshoot the platform.

**To access the Operations Center:**

1. Log in to Workbench, select <Icon icon="circle-user" iconType="light" /> **Menu** in the top right corner, and click the **Administrative Console** link displayed at the bottom of the slide out window.
2. Click **Manage Resources**.
3. Login to the Operations Center using the Administrator credentials [configured after installation](/docs/data-science/5.8.1/install/config).

**To view resource utilization:**

1. Select **Servers** in the menu on the left.

2. Click on the Private IP address of the Workbench master node, and select **SSH login as root**.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/u4MsRLDCM8Pedgc_/images/ssh_master_node.png?fit=max&auto=format&n=u4MsRLDCM8Pedgc_&q=85&s=8047348d82826e2b101435fbf6c62432" alt="" width="2032" height="960" data-path="images/ssh_master_node.png" />
   </Frame>

3. To display the current resource utilization of each *node* in the cluster, run this command:

   ```
   kubectl top nodes --heapster-namespace=monitoring
   ```

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/q5KdI2mr6ZKMYRZp/images/node_utilization.png?fit=max&auto=format&n=q5KdI2mr6ZKMYRZp&q=85&s=c5d51760a9081fe15781107167ab8487" alt="" width="1924" height="1014" data-path="images/node_utilization.png" />
   </Frame>

   <Note>
     This is actual resource utilization, not limits or requests.
   </Note>

4. To view utilization *and requests* for a particular node, run the `kubectl describe node` command against the IP address for the node (listed under `NAME`). For example:

   ```
   kubectl describe node 172.31.25.175
   ```

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/q5KdI2mr6ZKMYRZp/images/node_requests.png?fit=max&auto=format&n=q5KdI2mr6ZKMYRZp&q=85&s=dc5b200bdd57abed2256fe057e995046" alt="" width="2640" height="1494" data-path="images/node_requests.png" />
   </Frame>

5. To view the resource utilization per *pod*, run this command:

   ```
   kubectl top pods --heapster-namespace=monitoring
   ```

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/GAawxvWy-HUVSCqf/images/pod_utilization.png?fit=max&auto=format&n=GAawxvWy-HUVSCqf&q=85&s=47007926120c9a332678eb9d0386fdec" alt="" width="2018" height="946" data-path="images/pod_utilization.png" />
   </Frame>

6. To view the current status of all pods in the cluster, run `kubectl get pods`.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/opbTXGcYjx4zM8zO/images/get_pods.png?fit=max&auto=format&n=opbTXGcYjx4zM8zO&q=85&s=6e3c770713da21027cfece2eadb56dc4" alt="" width="2510" height="1236" data-path="images/get_pods.png" />
   </Frame>

   The following table summarizes common pod states:

   | Status                | Description                                                              |
   | :-------------------- | :----------------------------------------------------------------------- |
   | Running               | The pod has been bound to a node, and at least one container is running. |
   | Pending               | The pod is waiting for one or more container images to be created.       |
   | Terminating           | The pod is in the process of being terminated.                           |
   | Error                 | An error has occurred with the pod.                                      |
   | Init:CrashLoopBackoff | The pod failed to start, and will make another attempt in a few minutes. |

7. To view information for a particular pod, run the `kubectl describe pod` command against the pod (listed under `NAME`). For example:

   ```
   kubectl describe pod anaconda-session-89747d7fdb154b89b182d5eaa25b2e59-7f497db55wl9g
   ```

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/atV1FF4bOzhiwIx6/images/describe_pod.png?fit=max&auto=format&n=atV1FF4bOzhiwIx6&q=85&s=f454ec630bf772401aea2191cc24fb64" alt="" width="2634" height="1588" data-path="images/describe_pod.png" />
   </Frame>

   You can also use the Operations Center **Logs** to gain insights into pod behavior and troubleshoot issues. See [logging](/docs/data-science/5.8.1/admin/resources/gravity/logging) for more information.

## User errors

If a user experiences issues within a Notebook session, have them send you the name of the pod associated with their project session. They can obtain this information by running the `hostname` command from within a Jupyter Notebook or terminal window.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/q5KdI2mr6ZKMYRZp/images/notebook_hostname.png?fit=max&auto=format&n=q5KdI2mr6ZKMYRZp&q=85&s=969baba74d252658ea0640c49285348b" alt="" width="2132" height="826" data-path="images/notebook_hostname.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/u4MsRLDCM8Pedgc_/images/terminal_hostname.png?fit=max&auto=format&n=u4MsRLDCM8Pedgc_&q=85&s=2fde8aa2cb719fc7fa214a17acc709f0" alt="" width="1886" height="626" data-path="images/terminal_hostname.png" />
</Frame>

You can then use the commands described above or the Operation Center’s **Monitoring** and **Logs** features to investigate the issue. See [Monitoring sessions and deployments](/docs/data-science/5.8.1/admin/resources/gravity/monitor-sessions-deps) for more information.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/eSsEBS6xLmJK8V-1/images/monitoring-pods.png?fit=max&auto=format&n=eSsEBS6xLmJK8V-1&q=85&s=369fdeed7682a324430dcb7ee738f1ca" alt="" width="2216" height="1236" data-path="images/monitoring-pods.png" />
</Frame>

<Tip>
  As an Administrator, you can also use the Authentication Center to impersonate a user to try to reproduce the problem they are experiencing.
</Tip>

**To access the Authentication Center:**

1. Log in to Workbench, click <Icon icon="circle-user" iconType="light" /> **Menu** in the top right corner, then click the **Administrative Console** link in the bottom of the slideout menu.

2. Click **Manage Users**.

3. In the Manage menu on the left, click **Users**.

4. On the **Lookup** tab, click **View all users** to list every user in the system, or search the user database for all users that match the criteria you enter, based on their first name, last name, or email address.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/QCWY8EsGZWJYinOU/images/impersonate_users.png?fit=max&auto=format&n=QCWY8EsGZWJYinOU&q=85&s=ee2ca511ac1816a5a5e435273c1616b9" alt="" width="1948" height="1102" data-path="images/impersonate_users.png" />
   </Frame>

5. Click **Impersonate** in the row of **Actions** for the user to display a table of all **Applications** this user has interacted with on the platform, including editor sessions and deployments.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/kBuj3mPdZoBk8YoG/images/user_applications.png?fit=max&auto=format&n=kBuj3mPdZoBk8YoG&q=85&s=3ee7806b4e164866930bd58359ab89fc" alt="" width="2368" height="1422" data-path="images/user_applications.png" />
   </Frame>

6. Click the **Anaconda Platform** link to interact with Workbench as the user.

See [Managing users](/docs/data-science/5.8.1/admin/user-mgmt/users) for more information on managing users.

## Editor sessions

To help you troubleshoot issues with editor sessions, it might be helpful to understand what is happening "behind the scenes".

* When a user starts a session, Workbench launches the appropriate editor for them to work with their project files. In the background, the editor environment and other services are running in Docker containers.
* To improve startup time for projects, the editor container includes conda environments for each of the [project template environments](/docs/data-science/5.8.1/data-science-workflows/projects/project-templates) provided by the platform. These environments are stored in `/opt/continuum/anaconda/envs`, along with any custom environments created *during the editor session*.
* The project repository is cloned into `/opt/continuum/project`. (Only changes to files in this directory can be saved to the repository.)
* The `anaconda-project prepare` command runs, scans the project's `anaconda-project.yml` file for new packages and environments, and installs them into the running session.

  During this phase, you can monitor the progress by watching the output of `/opt/continuum/preparing`.

  When this process completes, the `/opt/continuum/prepare.log` is created.

<Warning>
  Any changes made to the container image will be lost when the session stops, so any packages installed from the command line are available during the current session only. To persist package installs across sessions, they must be added to the project's `anaconda-project.yml` file.
</Warning>
