8000 tmux prevents log output from appearing in `journalctl` · Issue #124 · Infinidoge/nix-minecraft · GitHub
[go: up one dir, main page]

Skip to content

tmux prevents log output from appearing in journalctl #124

Open

Description

@rhoriguchi

If you have services.minecraft-servers.managementSystem.tmux.enable = true you won't see any log output with journalctl since tmux catches all output. I'm not sure how you can prevent that, I couldn't find a solution myself.

> journalctl -u minecraft-server-world.service
....
-- Boot c3c64eb61fe446c88268fa0d25210f8d --
Jan 16 13:33:21 HOSTNAME systemd[1]: Starting Minecraft Server world...
Jan 16 13:33:22 HOSTNAME systemd[1]: Started Minecraft Server world.

Activity

  1. Infinidoge commented on Jan 17, 2025

    @Infinidoge
    Owner

    There is no solution because of the design of tmux. This is why the systemd-socket management system exists, as it allows log output properly. If you wanted to resolve it, you would need a... questionable setup to tee it into systemd.

    I've been wanting to find a better solution that would handle this properly, but none of the solutions I found would work. tmux is horrible for this application, but it's the best solution I have currently for the "I need to access the console directly" problemset.

  2. Pablo1107 commented on Jul 18, 2025

    @Pablo1107

    What about pipelining ./logs/latest.log output after executing tmux with something like tail -f ./logs/latest.log?

  3. ibizaman commented on May 4, 2026

    @ibizaman

    What about a middle ground where the systemd's exec start is modified to print the content of logs/latest.log in case of error. Or just the 100 last lines. This would catch cases errors where a mod fails to start and print that. If that makes sense I can create a PR.

    Btw my use case for this is because I had a mod failing to install and the systemd service restarted 5 times in a row with the message in the systemd logs just saying "permissions denied" on the socket. So I chased down issues with this socket before realizing logs where missing and I should check those.

    EDIT: as another example, it would avoid this kind of confusion #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0