Skip to content

Excessive tailscale logging in system log #282

Closed

Description

@danderson

Report from a friend, as well as a couple of users: tailscaled is the single most verbose thing in their system logs, by a very long way. This is a problem for them because they do centralized logs collection, and so extremely verbose tailscaled logs multiplied by many machines depletes the central logstore's disk space at alarming rates.

We've heard this from several quarters, and our general plan for this is "do less stuff, because this will generate less logs". Filing this bug (a) to track that and (b) to decide whether that's enough. Even with things like eager handshaking disabled, we're still likely to log a lot more than the rest of the system combined, because we intend these logs to be debug-level stuff.

Unfortunately we don't use log levels, so it's not a simple matter of "lower the syslog spamminess and only push debug logs into logtail". Unless we add some kind of log levels, our only option is to turn off syslog output entirely.

Activity

  1. bradfitz commented on Apr 10, 2020

    @bradfitz
    Member

    FWIW, I submitted 73249f8 yesterday which addresses a lot of the log spam.

    Turning off automatic handshakes will do a lot too.

    But, yes, our log spamminess is one of my pet peeves too.

  2. added
    L5 All users
    P2 Aggravating
    and removed on Apr 22, 2020
  3. wogong commented on Dec 9, 2020

    @wogong

    Really hope there is an option to turn off these logs.

  4. wogong commented on Dec 21, 2020

    @wogong

    I open a window in tmux showing real-time logs, sudo journalctl -f.
    tailscale output too many logs to journal making it meaningless.
    I found no option in journalctl to filter out logs of certain service, but you can achieve the same by
    sudo journalctl -f | grep -v 'tailscaled'

  5. 5 remaining items

  6. lfarkas commented on Mar 3, 2021

    @lfarkas

    when this will be released? in the latest 1.4.5 it's still not working ie at least tailscale fill up my journal.

  7. lfarkas commented on Mar 5, 2021

    @lfarkas

    is this normal?
    why we can't simple disable the whole logging?

    # ls -al /var/lib/tailscale/
    total 30663616
    drwxr-x---   2 root root        4096 febr  16 07.17 .
    drwxr-xr-x. 78 root root        4096 márc   1 11.07 ..
    -rw-r--r--   1 root root  9682715930 márc   5 08.36 tailscaled.log1.txt
    -rw-r--r--   1 root root 21716739232 márc   5 08.35 tailscaled.log2.txt
    -rw-------   1 root root         209 2020 ápr   19 tailscaled.log.conf
    -rw-------   1 root root        1168 febr  16 07.17 tailscaled.state
    
  8. mich2k commented on Jan 30, 2024

    @mich2k

    I currently face almost 200GB of only tailscaled logs

    image

  9. aadityabhatia commented on Feb 16, 2024

    @aadityabhatia

    My systemd journal is being flooded. No idea how to make it stop besides killing tailscale.

    Feb 16 01:30:07 lucifer tailscaled[165704]: [unexpected] magicsock: derp-16 does not know about peer [z4HWt], removing route
    Feb 16 01:30:09 lucifer tailscaled[165704]: [RATELIMIT] format("dns: resolver: forward: recv: response code indicating server failure: %d") (3 dropped)
    Feb 16 01:30:09 lucifer tailscaled[165704]: dns: resolver: forward: recv: response code indicating server failure: 2
    Feb 16 01:30:09 lucifer tailscaled[165704]: dns: resolver: forward: recv: response code indicating server failure: 2
    

    Firewall is configured to allow NAT-PMP. I am not connected to any machine that requires DERP. This has been appearing every 2-3 seconds for several months now.

    Possibly related to #10430?

  10. physkets commented on Feb 29, 2024

    @physkets

    This seems to still be true. The log is filled with messages from tailscaled. Could this issue be re-opened?

    It would be nice if there were log-levels and if the default maximum was set to Notice or Warning.

  11. iluvatyr commented on Apr 8, 2024

    @iluvatyr

    I agree. My syslog is full of tailscale logs. Would be nice to reduce to only necessary ones.

  12. aadityabhatia commented on Apr 8, 2024

    @aadityabhatia

    My workaround is to redirect logs to a temp file.

    $ cat /etc/systemd/system/tailscaled.service.d/override.conf
    [Service]
    StandardOutput=file:/tmp/tailscaled.log
    

    It is not ideal because I lose visibility into important events but this helps until the issue is officially resolved. And yes, not sure why this issue was closed as "completed".

  13. neitsab commented on May 14, 2024

    @neitsab

    Solution offered by Reddit user 2bluesc on r/Tailscale for systemd-based systems:

    Use an override drop-in and the symbolic name so you follow the changes by your distro package. This level cut off the noise for me:

    cat /etc/systemd/system/tailscaled.service.d/override.conf
    [Service]
    LogLevelMax=notice
    systemctl daemon-reload && sudo systemctl restart tailscaled
    

    To create the override file, either use systemctl edit tailscaled and paste the content shown above, or use this one-liner:

    printf "[Service]\nLogLevelMax=notice\n" | sudo tee -a /etc/systemd/system/tailscaled.service.d/override.conf

    I confirm that it works 👍🏻

  14. yellowsink commented on Nov 22, 2024

    @yellowsink

    I currently have 2 gigabytes of tailscaled.log, this definitely is still an issue. Maybe add an option for log rotation? I do not need tailscaled logs from checks notes well over a year ago, and it would be nice if tailscaled would clear out old logs to make room for new ones automatically.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions