Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion develop-docs/self-hosted/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ To apply new Docker daemon configuration, restart your Docker service with `syst

<Alert title="Note" level="info">
The value `172.17.0.0/16` is the default IP pools for Docker. If you are customizing your Docker default IP pools, please modify the value accordingly.
Further information regarding Docker default IP pools can be found on the [Troubleshooting guide](/self-hosted/troubleshooting/#docker-network-conflicting-ip-address).
Further information regarding Docker default IP pools can be found on the [Troubleshooting guide](/self-hosted/troubleshooting/docker/#docker-network-conflicting-ip-address).
</Alert>

## Configuration
Expand Down
252 changes: 0 additions & 252 deletions develop-docs/self-hosted/troubleshooting.mdx

This file was deleted.

83 changes: 83 additions & 0 deletions develop-docs/self-hosted/troubleshooting/docker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Troubleshooting Docker
sidebar_title: Docker
sidebar_order: 3
---

## Container Healthcheck

There may be some circumstances which you may want to increase or decrease healthcheck interval, timeout or retries for your custom needs. This can be achieved by editing `HEALTHCHECK_INTERVAL`, `HEALTHCHECK_TIMEOUT`, `HEALTHCHECK_RETRIES` variables' values in `.env`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to be more specific about how to add these.


Occasionally, you might see an error like this
```
container for service "${servicename}" is unhealthy
```

This can usually be resolved by running `docker compose down` and `docker compose up --wait` or rerunning the install script.

## Docker Network Conflicting IP Address

Self-hosted Sentry is using Docker's bridge networking, in which use a specific private IP range. By default, Docker uses `172.17.0.0/16` range (`172.17.0.0`-`172.17.255.255`). This may cause conflict with your private network. You can change Docker's default IP range by configuring the `/etc/docker/daemon.json` file. If the file does not exists, you can create it yourself.

Assuming your safe IP range is `10.147.0.0/16` and `10.146.0.0/16`, your configuration would be:

```json
{
"default-address-pools": [
{
"base": "10.147.0.0/16",
"size": 24
},
{
"base": "10.146.0.0/16",
"size": 24
}
]
}
```

To apply new Docker daemon configuration, restart your Docker service with `systemctl restart docker`.

Make sure you are using [valid private IP ranges](https://en.wikipedia.org/wiki/Reserved_IP_addresses), that is between these ranges:
- `10.0.0.0/8` (address range of `10.0.0.0`–`10.255.255.255`)
- `100.64.0.0/10` (address range of `100.64.0.0`–`100.127.255.255`)
- `172.16.0.0/12` (address range of `172.16.0.0`–`172.31.255.255`)
- `192.0.0.0/24` (address range of `192.0.0.0`–`192.0.0.255`)
- `192.168.0.0/16` (address range of `192.168.0.0`–`192.168.255.255`)
- `198.18.0.0/15` (address range of `198.18.0.0`–`198.19.255.255`)

For further reading, you can see Matthew Stratiotto's article on [The definitive guide to docker's default-address-pools option](https://straz.to/2021-09-08-docker-address-pools/).

## Logs Disk Usage

If you are suspecting persisted logs from Docker container logs consumes a lot of your disk space, you can configure the amount of persisted logs on Docker by configuring the `/etc/docker/daemon.json` file. If the file does not exists, you can create it yourself.

```json
{
"log-driver": "local",
"log-opts": {"max-size": "10m", "max-file": "3"}
}
```

To apply new Docker daemon configuration, restart your Docker service with `systemctl restart docker`.

If you want to delete immediate Docker logs, you can execute this as `root` user:

```shell
truncate -s 0 /var/lib/docker/containers/**/*-json.log
```

## Image and Builder Cleanup

Executing `./install.sh` will build a new Sentry Docker container, executing it often might cause Docker to consume your disk space. You can safely prune old or unneeded Docker containers, image, or builder to re-acquire used disk space. Executing these will not affect current running containers and volumes.

```shell
docker container prune
docker builder prune
docker image prune --all
# WARNING: Executing "volume prune" might delete `sentry-vroom` volume as it's not an external volume.
docker volume prune
docker network prune
```

Append `-f` flag for no confirmation on deletions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't really advertise this :)

21 changes: 21 additions & 0 deletions develop-docs/self-hosted/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Self-Hosted Troubleshooting
sidebar_title: Troubleshooting
sidebar_order: 9000
---

Please keep in mind that the [self-hosted repository](https://github.com/getsentry/self-hosted) is geared towards low traffic loads (less than ~1 million submitted Sentry events per month). Folks needing larger setups or having event spikes can expand from here based on their specific needs and environments. If this is not your cup of tea, you are always welcome to [try out hosted Sentry](https://sentry.io/signup/).

## General

You can see the logs of each service by running `docker compose logs <service_name>`. You can use the `-f` flag to "follow" the logs as they come in, and use the `-t` flag for timestamps. If you don't pass any service names, you will get the logs for all running services. See the [reference for the logs command](https://docs.docker.com/compose/reference/logs/) for more info.

## Component Specific

Visit the following pages for troubleshooting guides for each component:

<PageGrid />

## Other

If you are still stuck, you can always visit our [GitHub issues](https://github.com/getsentry/self-hosted/issues) to search for existing issues or create a new issue and ask for help. You can also visit [Sentry Community Discord server](https://discord.gg/sentry) on #self-hosted channel. Please keep in mind that we expect the community to help itself, but Sentry employees also try to monitor and answer questions when they have time.
Loading
Loading