# Portainer

## Error 500

Issue mounting hardware or with ports

1. Check the container in Portainer and take note of what ports it uses
2. SSH into VM and `Sudo -i` into the root account
3. Run the below commands and confirm

   ```
   clear
   sudo lsof -i:PORT
   ```
4. If the ports are in use you will see an output similar to this;\ <img src="/files/ogg2r9wjXxRX409jhZFj" alt="" data-size="original">\
   \&#xNAN;*Please note: This screenshot is for port 22, which is used for SSH. This is an EXAMPLE ONLY screenshot. Do NOT disable port 22.*
5. Investigate why these ports are in use. Some suggestions;
   1. Reboot VM
   2. Refer to Google (eg looking up whatever is in the 'name' category)

### Error 500 (with GPU passthrough)

Refer to the Docker Compose file for 'runtime: nvidia'

#### Reinstall the Nvidia Drivers

1. SSH into Latte and *Sudo -i* into the root account
2. Run the below command and next through the prompts

   ```
   ./NVI
   ```
3. Try starting Plex

#### Remove and re-add the GPU

1. Connect to Proxmox and log in with an Admin account
2. On the left, Expand Macaroni and select Latte
3. Click on 'Shutdown' and wait for the VM to stop
4. Click on the Hardware tab
5. Remove 2 'PCI Device' devices
   1. Click on the first PCI Device
   2. Click on Remove
   3. Repeat
6. Add the Nvidia GPU back
   1. Click on Add > PCI Device
   2. Under the Devices dropdown, locate 'NVIDIA Corporation'
   3. Click on Add
   4. Repeat for any other 'NVIDIA Corporation' devices
7. Click on 'Start'
8. You may need to reinstall the drivers[ per above](#reinstall-the-nvidia-drivers)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.trentbauer.com/guides/troubleshooting/portainer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
