Home / Understand

Troubleshooting

The CLI and dash messages quoted below are shown as they appear today, in Brazilian Portuguese, with a translation in parentheses.

docker compose fails or cannot find Docker

The Collector does not start (config.yaml: is a directory)

Docker could not see the configuration file and created a folder in its place. With Colima only $HOME is shared: move the project inside it (or configure extra mounts in Colima). Then: obskitpy down and obskitpy up.

obskitpy up is slow or times out

Elasticsearch takes 30–60 s to become healthy and Kibana a bit longer. The CLI waits up to 5 minutes. If it times out, look at docker compose -p obskitpy-<service> logs elasticsearch kibana (not enough memory is the most common cause: give the Docker VM at least 4 GB).

zsh: command not found: obskitpy

The executable only exists inside the project environment. Use uv run obskitpy ... (uv), activate the venv (pip) or python -m obskitpy .... To use it from anywhere: uv tool install obskitpy.

Upgrading to the newest version

uv add -U obskitpy          # uv (updates the package and uv.lock)
pip install -U obskitpy     # pip
uvx obskitpy@latest init    # without installing anything

Old versions (0.1.x) do not have the wizard, run or the automatic fixes below.

unknown flag: --project-directory or docker: unknown command: docker compose

The Docker CLI is missing the Compose v2 plugin. In newer versions obskitpy solves it by itself (it uses the docker-compose binary if it exists, or offers to install it with Homebrew). Manually: brew install docker-compose.

obskitpy init does not start the stack

Run obskitpy doctor: it checks Docker, Compose v2, whether the daemon answers, the memory available to Docker (Elasticsearch asks for ~2 GB free; ≥ 4 GB recommended) and the ports. init does the same check and, if Docker is missing, creates the files anyway so you can start later with obskitpy up.

dash-obskitpy opens but shows no data

I want to use the same stack in another project

Run obskitpy init in the other project's folder: it detects the running stack and asks whether you want to add it. Without an interactive terminal: obskitpy init --join (or --join NAME if there is more than one). If the original stack is deleted or moves folders, the project warns you; recreate its own with obskitpy init --force --standalone.

I want to switch between Kibana and dash-obskitpy

obskitpy init --force --local kibana|dash-obskitpy|both and then obskitpy up. The data in Elasticsearch stays; only what starts changes. (--force recreates observability/: keep your dashboard.ndjson if you edited it.)

Port already in use

Another stack (or another program) uses 9200/5601/8600/4317/4318. init already picks the next free port by itself (and tells you). To choose by hand, bring the other one down (obskitpy down in it) or recreate with different ports: obskitpy init --force --kibana-port 5700 --es-port 9300 --otlp-grpc-port 4320 --otlp-http-port 4321 and set OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4320 in the Python process.

The panels are empty

Check, in this order:

  1. Did the program call shutdown()? Without it, the last batch may not have been sent.
  2. Service name: the one in obskitpy.setup("...") must equal OBSKITPY_SERVICE in .env.
  3. Kibana's time window: it may be on 24 h while the data is older (or the other way around).
  4. Refresh delay: wait ~30 s after the first send.
  5. Did the Collector receive it? docker compose -p obskitpy-<service> logs otel-collector.
  6. Can the app reach the port? Transient error StatusCode.UNAVAILABLE ... localhost:4317 warnings in the console mean the Collector is down or on a different port (adjust OTEL_EXPORTER_OTLP_ENDPOINT).
  7. Direct count: curl 'localhost:9200/logs-generic.otel-default/_count'.

The dashboard shows another project's panels

The browser kept the previous screen's state. Reload the page (⌘/Ctrl+R) or open the link in an incognito tab.

Failed to export ... UNAVAILABLE warnings on exit

The Collector went down or shutdown() was called after obskitpy down. Harmless; the data already sent is saved.

ModuleNotFoundError: pkg_resources

Install with the extra: pip install "obskitpy[requests]" (it pins a setuptools version compatible with opentelemetry-instrumentation-requests 0.48b0), or pip install "setuptools<81".

Python 3.14 and protobuf

If installing or importing OpenTelemetry fails on Python 3.14 because of protobuf, use Python 3.10–3.13.

Starting over from scratch

obskitpy down -v          # deletes containers and data
obskitpy up               # recreates everything and re-applies the dashboard

import obskitpy fails with Metaclasses with custom tp_new are not supported

You are on Python 3.14. The pinned OpenTelemetry stack needs a protobuf that cannot be imported there. obskitpy supports Python 3.10 to 3.13; create the environment with one of them (uv venv --python 3.12). obskitpy doctor reports the unsupported version.

✎ Edit this page on GitHub