Skip to content

Diagnostics

Terminal window
curl -s localhost:9001/health
{ "status": "ok", "version": "0.2.1", "commit": "51749d42d340",
"uptime_secs": 18, "live_streams": 0, "errors": 0, "warnings": 0 }

Unauthenticated on purpose, so it can back a load balancer or a container healthcheck. commit identifies the exact build, which matters when a report says “0.2.1” and that version spans many commits.

jadarit --version prints the same version and commit without contacting the server, which is the quickest thing to include in a bug report.

The binary can also check itself, which is what the container healthcheck uses:

Terminal window
jadarit --health
Terminal window
jadarit doctor

Checks the things that stop a working install from being reachable, and says what to do about each one:

[ ok ] configuration /etc/jadarit/config.toml
[ ok ] ffmpeg ffmpeg version 6.1.1
[ ok ] licence evaluation, 30 days remaining
[ ok ] server answering on 0.0.0.0:9001
[ ok ] public address 203.0.113.10, discovered by STUN
[ warn ] webrtc udp range unset, so sessions use ephemeral ports
To reach this server from the internet, forward:
TCP 9001 dashboard, API and HLS
TCP 1935 RTMP ingest
UDP (unset) set webrtc.udp_port_min and udp_port_max first

It exits 0 when everything is healthy, 1 on warnings, and 2 when something is broken, so it can gate a deployment script.

Run this first when viewers cannot connect, and paste the output into a support request. It answers most of what we would otherwise have to ask.

  • Public address. WebRTC media is UDP straight to your server, so viewers need an address that reaches it. If webrtc.public_ip is unset, the server discovers one by STUN at startup and advertises that. If you have set one, doctor compares it against what the internet actually sees and warns when they disagree, which is legitimate behind a load balancer and a mistake far more often.
  • UDP range. Without udp_port_min and udp_port_max, sessions use ephemeral ports, and nothing can be forwarded because nobody knows which ports to forward. That limits WebRTC to the local network.
  • Carrier-grade NAT. If STUN reports an address that is not routable, your connection has a second layer of NAT in front of it and no amount of port forwarding will help. Doctor says so rather than letting you hunt for a firewall rule that does not exist.

The All applications page opens with how the machine is doing, updated every few seconds:

CPUThe whole machine, and how much of it Jadarit itself uses
MemoryIn use, of the total, and Jadarit’s own
Disk freeOn the disk holding the data directory, where recordings, VOD and ads go
Sending, receivingNetwork traffic, all interfaces together
TemperatureThe hottest sensor, with the processor’s clock against its rated speed
LoadThe system load average over 1, 5 and 15 minutes

The small charts show the last three minutes. The sidebar keeps the CPU figure in view from any page.

Temperature turns amber at 85 °C, and also when a busy processor runs well below its rated clock. Both mean the machine is slowing itself down to cool off: encoders fall behind and viewers see it, while CPU use can look modest. Check fans, dust and airflow before blaming the software.

The same numbers are at GET /api/v1/system for monitoring tools; see the API reference.

Logs go to stdout, to rotating files, and to an in-memory ring the dashboard reads live.

Terminal window
curl -b jar http://localhost:9001/api/v1/logs # recent events
journalctl -u jadarit -f # systemd
docker logs -f jadarit # container

Level, destination, rotation, and ring size are set in [logging]. RUST_LOG overrides the level when set, and takes per-module filters:

Terminal window
RUST_LOG=info,ms_egress=debug jadarit

Set json = true to emit JSON lines for a log collector. It is harder to read by eye, so leave it off unless something is consuming it.

A panic is captured to disk with its message and backtrace, rather than being lost to a restart.

Terminal window
curl -b jar http://localhost:9001/api/v1/crashes # list
curl -b jar http://localhost:9001/api/v1/crashes/<file> # read one
curl -b jar -X DELETE http://localhost:9001/api/v1/crashes/<file>

The server also notices when it exited uncleanly last time, using a run marker, so a crash that left no report is still visible after the fact.

Terminal window
curl -b jar -o diagnostics.json http://localhost:9001/api/v1/diagnostics

Describes the installation: version and commit, configuration, licence state, active streams, recent errors, and crash history. Attach this to a support request. It answers the first several questions we would otherwise have to ask.

Review it before sending if your configuration holds anything you would rather not share.

SymptomLook at
Publisher connects, nothing appearsLogs at publish time; check the application’s ingest mode and the key
Stream shows live but is frozenIt should end on disconnect. Check stats for time since the last frame
WebRTC works locally, not remotelypublic_ip and the UDP port range in [webrtc]
HLS plays, WebRTC does notAlmost always UDP reachability, not the server
Feature returns 402The licence lapsed past its grace period. See Licensing
Ad break never playsCheck the ad is conditioned via GET /apps/{app}/ads