> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/self-managed-enterprise-edition/troubleshooting-and-resources/troubleshooting/quick-reference-to-commands.md).

# Quick command reference

This topic provides a short list of commands that are useful for troubleshooting Harness Self-Managed Enterprise Edition.

{% hint style="info" %}
**NOTE**

Variables are enclosed in angle brackets (< >).
{% endhint %}

### Retrieve your MongoDB password <a href="#retrieve-your-mongodb-password" id="retrieve-your-mongodb-password"></a>

To print your MongoDB password to the command line, use `kubectl get secret`:

```
kubectl get secret -n <namespace> mongodb-replicaset-chart -o jsonpath={.data.mongodb-root-password} | base64 --decode | awk '{print $1}'
```

### Shell into MongoDB <a href="#shell-into-mongodb" id="shell-into-mongodb"></a>

Use the `kubectl exec` command to start a shell session in the container that runs MongoDB. Modify the command for your MongoDB configuration:

```
kubectl exec -it mongodb-replicaset-chart-0 -n <namespace> -- /bin/sh
```

* If the MongoDB replica is SECONDARY, try `mongodb-replicaset-chart-1` or `mongodb-replicaset-chart-2`.
* If the MongoDB replica is PRIMARY, use `admin`:

  ```
  db.auth('admin', <password>)
  ```

### Shell into TimescaleDB <a href="#shell-into-timescaledb" id="shell-into-timescaledb"></a>

Use the following commands to access your installation of TimescaleDB:

{% hint style="info" %}
**NOTE**

Check the name of the TimescaleDB pod.
{% endhint %}

1. Use the `kubectl exec` command to open a shell session in the TimescaleDB pod:

   ```
   kubectl exec -it harness-timescale-0 -n <namespace> -- /bin/sh
   ```
2. Connect using the default user role:

   ```
   psql -U postgres
   ```
3. Enter your password and return.

### Shell into postgres <a href="#shell-into-postgres" id="shell-into-postgres"></a>

Use the `kubectl exec` command to open a shell session in your postgres pod:

```
kubectl exec --stdin --tty postgres-0 -n <namespace> -- /opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash
```
