Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchtower can fail sending Telegram report if it is too long #2057

Open
stefa168 opened this issue Nov 26, 2024 · 2 comments
Open

Watchtower can fail sending Telegram report if it is too long #2057

stefa168 opened this issue Nov 26, 2024 · 2 comments

Comments

@stefa168
Copy link

Describe the bug

I have run a test run on a machine, and I am using Telegram as notification service.

Unfortunately, It looks like the amount of docker containers that have been updated (10) was a bit too much for Telegram's message length limit, so Watchtower failed to send the report entirely.

This is the message that has been reported instead in the logs:

watchtower-1  | time="2024-11-26T01:11:47+01:00" level=error msg="Failed to send shoutrrr notification" error="Message exceeds the max length" index=0 notify=no service=telegram

Steps to reproduce

Have Watchtower update enough containers to fill the entire size of a telegram message (4096 characters)

Expected behavior

Watchtower should be able to split the message in enough parts to send the entire message to Telegram's servers.

Screenshots

No response

Environment

  • OS: Ubuntu 22.04.5 LTS x86_64
  • Host: KVM/QEMU (Standard PC (Q35 + ICH9, 2009) pc-q35-9.0)
  • Kernel: 5.15.0-125-generic
  • Docker version 27.3.1, build ce12230

Your logs

watchtower-1  | time="2024-11-26T01:09:09+01:00" level=info msg="Found new lscr.io/linuxserver/duplicati:latest image (0ce371296951)"
watchtower-1  | time="2024-11-26T01:09:29+01:00" level=info msg="Found new portainer/portainer-ce:latest image (3c6403908069)"
watchtower-1  | time="2024-11-26T01:09:35+01:00" level=info msg="Found new eclipse-mosquitto:latest image (fdc6f47a31a7)"
watchtower-1  | time="2024-11-26T01:09:43+01:00" level=info msg="Found new edgd1er/webnut:latest image (c976dd34ee2e)"
watchtower-1  | time="2024-11-26T01:09:46+01:00" level=info msg="Stopping /webnut (4aec2b293b95) with SIGTERM"
watchtower-1  | time="2024-11-26T01:09:57+01:00" level=info msg="Stopping /mosquitto (a29b36b6a28d) with SIGTERM"
watchtower-1  | time="2024-11-26T01:09:58+01:00" level=info msg="Stopping /portainer (d6194e0a3302) with SIGTERM"
watchtower-1  | time="2024-11-26T01:09:59+01:00" level=info msg="Stopping /duplicati (dd055d58cd29) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:03+01:00" level=info msg="Stopping /netbootxyz (1237e479e462) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:07+01:00" level=info msg="Stopping /qbittorrent (61d672d5bd06) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:11+01:00" level=info msg="Stopping /tvheadend (33e5da4e5c93) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:15+01:00" level=info msg="Stopping /zigbee2mqtt (40c77ab8425c) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:25+01:00" level=info msg="Stopping /zwave-js (1918cda3f389) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:31+01:00" level=info msg="Stopping /matter-server (b5e4504b0575) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:33+01:00" level=info msg="Stopping /music-assistant-server (b77fb5f96a73) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:34+01:00" level=info msg="Stopping /esphome (d6933ae18091) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:45+01:00" level=info msg="Stopping /ecowitt2mqtt (7933fdaefc4a) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:46+01:00" level=info msg="Stopping /homeassistant (6915a26f14d5) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:56+01:00" level=info msg="Stopping /node-red (03485a47abbc) with SIGTERM"
watchtower-1  | time="2024-11-26T01:10:57+01:00" level=info msg="Stopping /duckdns (9aee3893b952) with SIGTERM"
watchtower-1  | time="2024-11-26T01:11:01+01:00" level=info msg="Stopping /wikijs (e9cdddf7bb52) with SIGTERM"
watchtower-1  | time="2024-11-26T01:11:02+01:00" level=info msg="Stopping /heimdall (44776c5d5196) with SIGTERM"
watchtower-1  | time="2024-11-26T01:11:06+01:00" level=info msg="Stopping /yt_redis (9d49e61a207a) with SIGTERM"
watchtower-1  | time="2024-11-26T01:11:07+01:00" level=info msg="Stopping /yt_postgres (b4aa8a7ca770) with SIGTERM"
watchtower-1  | time="2024-11-26T01:11:18+01:00" level=info msg="Creating /yt_postgres"
watchtower-1  | time="2024-11-26T01:11:18+01:00" level=info msg="Creating /yt_redis"
watchtower-1  | time="2024-11-26T01:11:18+01:00" level=info msg="Creating /heimdall"
watchtower-1  | time="2024-11-26T01:11:19+01:00" level=info msg="Creating /wikijs"
watchtower-1  | time="2024-11-26T01:11:19+01:00" level=info msg="Creating /duckdns"
watchtower-1  | time="2024-11-26T01:11:20+01:00" level=info msg="Creating /node-red"
watchtower-1  | time="2024-11-26T01:11:20+01:00" level=info msg="Creating /homeassistant"
watchtower-1  | time="2024-11-26T01:11:21+01:00" level=info msg="Creating /ecowitt2mqtt"
watchtower-1  | time="2024-11-26T01:11:21+01:00" level=info msg="Creating /esphome"
watchtower-1  | time="2024-11-26T01:11:22+01:00" level=info msg="Creating /music-assistant-server"
watchtower-1  | time="2024-11-26T01:11:22+01:00" level=info msg="Creating /matter-server"
watchtower-1  | time="2024-11-26T01:11:22+01:00" level=info msg="Creating /zwave-js"
watchtower-1  | time="2024-11-26T01:11:23+01:00" level=info msg="Creating /zigbee2mqtt"
watchtower-1  | time="2024-11-26T01:11:23+01:00" level=info msg="Creating /tvheadend"
watchtower-1  | time="2024-11-26T01:11:25+01:00" level=info msg="Creating /qbittorrent"
watchtower-1  | time="2024-11-26T01:11:25+01:00" level=info msg="Creating /netbootxyz"
watchtower-1  | time="2024-11-26T01:11:26+01:00" level=info msg="Creating /duplicati"
watchtower-1  | time="2024-11-26T01:11:27+01:00" level=info msg="Creating /portainer"
watchtower-1  | time="2024-11-26T01:11:28+01:00" level=info msg="Creating /mosquitto"
watchtower-1  | time="2024-11-26T01:11:28+01:00" level=info msg="Creating /webnut"
watchtower-1  | time="2024-11-26T01:11:29+01:00" level=info msg="Removing image 6ec018434247"
watchtower-1  | time="2024-11-26T01:11:30+01:00" level=info msg="Removing image e3d3628a376f"
watchtower-1  | time="2024-11-26T01:11:37+01:00" level=info msg="Removing image 489a122103aa"
watchtower-1  | time="2024-11-26T01:11:38+01:00" level=info msg="Removing image 9e54ddcf1de6"
watchtower-1  | time="2024-11-26T01:11:39+01:00" level=info msg="Removing image cc4b4dcbb98c"
watchtower-1  | time="2024-11-26T01:11:39+01:00" level=info msg="Removing image 7fe0befae901"
watchtower-1  | time="2024-11-26T01:11:39+01:00" level=info msg="Removing image e105cfd78d67"
watchtower-1  | time="2024-11-26T01:11:39+01:00" level=info msg="Removing image 5850ee0c130f"
watchtower-1  | time="2024-11-26T01:11:40+01:00" level=info msg="Removing image 805a764170c1"
watchtower-1  | time="2024-11-26T01:11:41+01:00" level=info msg="Removing image 9c0b5a6a7e4d"
watchtower-1  | time="2024-11-26T01:11:41+01:00" level=info msg="Removing image 1588fd74f759"
watchtower-1  | time="2024-11-26T01:11:41+01:00" level=info msg="Removing image 55cf87258644"
watchtower-1  | time="2024-11-26T01:11:42+01:00" level=info msg="Removing image 2f9ef2dcaad4"
watchtower-1  | time="2024-11-26T01:11:44+01:00" level=info msg="Removing image 2f9c1eb086b0"
watchtower-1  | time="2024-11-26T01:11:44+01:00" level=info msg="Removing image d25945831d6b"
watchtower-1  | time="2024-11-26T01:11:44+01:00" level=info msg="Removing image d4a3e64ed8ed"
watchtower-1  | time="2024-11-26T01:11:44+01:00" level=info msg="Removing image 47209f56f112"
watchtower-1  | time="2024-11-26T01:11:45+01:00" level=info msg="Removing image 23ae4df962d8"
watchtower-1  | time="2024-11-26T01:11:45+01:00" level=info msg="Removing image 503d40f895e9"
watchtower-1  | time="2024-11-26T01:11:46+01:00" level=info msg="Removing image 089ebd19472c"
watchtower-1  | time="2024-11-26T01:11:47+01:00" level=info msg="Session done" Failed=0 Scanned=31 Updated=20 notify=no
watchtower-1  | time="2024-11-26T01:11:47+01:00" level=error msg="Failed to send shoutrrr notification" error="Message exceeds the max length" index=0 notify=no service=telegram

Additional context

No response

Copy link

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@Elekam
Copy link

Elekam commented Dec 9, 2024

In case of using pushover for notifications, the message seems to simply be cut off at the API limitation of 1024 4-byte UTF-8 characters, losing the rest of the notifcations entirely.

Maybe some kind of MAX_NOTIFICATION_SIZE Parameter, to split notifcations into enough calls to get the entire notification across would be an idea. I dont know how much of an undertaking to add that would be, probably not insignificant.

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

No branches or pull requests

2 participants