service-logs.adoc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. [#service-logs]
  2. = Service logs (OliveTin process troubleshooting)
  3. :experimental:
  4. **Service logs** are the lines OliveTin prints while it runs—startup messages, configuration load, errors, and action output. They are separate from xref:troubleshooting/browser-console-logs.adoc[browser console logs], which come from the WebUI in your browser.
  5. When something fails on the server (OliveTin will not start, actions error, API or auth problems), sharing **recent service log output** helps others see what the process reported. You do **not** need to be a Linux expert to copy logs from Docker, Podman, or `journalctl`.
  6. TIP: Before posting publicly, scan the log text for passwords, API tokens, cookies, or internal hostnames. Remove or replace those strings if needed. If you enable xref:troubleshooting/log-debug-options.adoc[extra debug logging], output can be more sensitive than usual.
  7. [#where-logs-go]
  8. == Where logs come from
  9. How you read logs depends on how OliveTin is installed:
  10. * **Container (Docker / Podman):** logs are what the container runtime captured from OliveTin’s standard output.
  11. * **systemd service:** logs are stored by the system journal for the `OliveTin` unit.
  12. * **Manual / binary** (for example `./OliveTin` in a terminal): messages print to that terminal—copy them from there, or redirect output to a file when testing.
  13. [#manual-binary]
  14. == Manual or binary run
  15. If you start OliveTin directly in a terminal window, **scroll back** and copy the text from startup through the error, or run it again and capture output:
  16. [source,shell]
  17. ----
  18. ./OliveTin 2>&1 | tee olivetin-run.log
  19. ----
  20. That writes everything to `olivetin-run.log` while still showing it on screen. Stop OliveTin before sharing, then attach or paste the relevant part of the file.
  21. [#docker-and-podman]
  22. == Docker and Podman
  23. Use the **same container name** you chose when you created the container (examples below use `olivetin`; yours may differ).
  24. .Show recent log lines (last ~200 lines)
  25. [source,shell]
  26. ----
  27. docker logs --tail 200 olivetin
  28. ----
  29. With Podman, use the same pattern:
  30. [source,shell]
  31. ----
  32. podman logs --tail 200 olivetin
  33. ----
  34. If OliveTin **crashes on startup** or you need the **full story from a restart**, show logs **after** reproducing the problem—either capture enough lines, or use a time window.
  35. .Limit output to the last few minutes (adjust the time as needed)
  36. [source,shell]
  37. ----
  38. docker logs --since 10m olivetin
  39. ----
  40. To **watch** logs live while you trigger an issue in another window:
  41. [source,shell]
  42. ----
  43. docker logs -f olivetin
  44. ----
  45. Press kbd:[Ctrl+C] to stop following; that does not stop OliveTin.
  46. [#docker-compose]
  47. == Docker Compose
  48. From the directory that contains your `compose.yaml` (or `docker-compose.yml`):
  49. [source,shell]
  50. ----
  51. docker compose logs --tail 200 olivetin
  52. ----
  53. Use the **service name** from the compose file, not necessarily the container name. Add `-f` to follow logs live, same idea as above.
  54. [#systemd]
  55. == systemd (native Linux package)
  56. Show whether the service is running and recent status:
  57. [source,shell]
  58. ----
  59. systemctl status OliveTin
  60. ----
  61. Read the journal for the OliveTin unit (scroll with arrow keys, quit with kbd:[q]):
  62. [source,shell]
  63. ----
  64. journalctl -eu OliveTin
  65. ----
  66. For a **time-bounded** slice (for example after a restart or failed action):
  67. [source,shell]
  68. ----
  69. journalctl -eu OliveTin --since "30 minutes ago"
  70. ----
  71. [#what-to-capture]
  72. == What to capture
  73. . Reproduce the problem if you can (restart OliveTin, click the action, etc.), then collect logs **immediately after**.
  74. . Include lines from **startup** through the **error**—not only the last one line.
  75. . If the log is huge, prefer `--since` / `--tail` so the excerpt stays readable.
  76. . Note your **install type** (Docker, Podman, Compose, systemd) and OliveTin **version** if you know it (from the WebUI footer, xref:troubleshooting/server-diagnostics.adoc[server diagnostics], or startup text).
  77. For deeper server-side detail, you can temporarily enable xref:troubleshooting/log-debug-options.adoc[LogDebugOptions]—then capture logs again with those settings in mind.
  78. [#share-the-logs]
  79. == Share the logs
  80. Paste the text into a xref:troubleshooting/wheretofindhelp.adoc[Discord or GitHub support] message (or attach a `.txt` file if it is long). Together with **how you run OliveTin** (direct port, reverse proxy, container flags) and **what you did** before the error, service logs make backend issues much easier to diagnose than a screenshot of the WebUI alone.
  81. For WebUI-only behaviour (blank page, buttons not loading), also capture xref:troubleshooting/browser-console-logs.adoc[browser console logs] when relevant.