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

Telegram notifications timing out - failed to send using telegram: timed out #2079

Open
aronmgv opened this issue Feb 9, 2025 · 1 comment

Comments

@aronmgv
Copy link

aronmgv commented Feb 9, 2025

Describe the bug

Hello,

I am suspecting that shoutrrr is already a dead project.. I reported problem there and notice their issue tracker is pretty much abandoned.. so posting it here.

I am trying to configure watchtower but getting failed to send using telegram: timed out no matter what configuration I use for WATCHTOWER_NOTIFICATION_URL.

services:
  watchtower:
    image: containrrr/watchtower:latest
    container_name: watchtower
    environment:
      - WATCHTOWER_DEBUG=true
      - WATCHTOWER_MONITOR_ONLY=true
      - WATCHTOWER_LABEL_ENABLE=true
      - WATCHTOWER_NOTIFICATIONS=shoutrrr
      - WATCHTOWER_NOTIFICATION_TIMEOUT=30s
      - WATCHTOWER_NOTIFICATION_URL=telegram://111:222@telegram?chats=333&preview=No
      - WATCHTOWER_SCHEDULE=0 * * * *
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
watchtower  | time="2025-02-09T20:40:36Z" level=info msg="Watchtower 1.7.1"
watchtower  | time="2025-02-09T20:40:36Z" level=info msg="Using notifications: telegram"
watchtower  | time="2025-02-09T20:40:36Z" level=info msg="Only checking containers using enable label"
watchtower  | time="2025-02-09T20:40:36Z" level=info msg="Scheduling first run: 2025-02-09 20:40:43 +0000 UTC"
watchtower  | time="2025-02-09T20:40:36Z" level=info msg="Note that the first check will be performed in 6 seconds"
watchtower  | time="2025-02-09T20:40:46Z" level=error msg="Failed to send shoutrrr notification" error="failed to send using telegram: timed out" index=0 notify=no service=telegram

I tried every single possible configuration for WATCHTOWER_NOTIFICATION_URL still no luck :/

Then I found one user posting it is possible to get this URL generated via: docker run --rm -it containrrr/shoutrrr generate telegram which I did and it gave the the following URL format: telegram://111:222@telegram?chats=333&preview=No. This is when I want to send notifications to the bot chat directly (yes i started conversation with bot prior)..
I tried using private channel with same time out error..

I tested it directly using containrrr/shoutrrr:latest and sending commnad:

docker run --rm containrrr/shoutrrr:latest send telegram://111:222@telegram?chats=333 "Test message from Shoutrrr"
failed to send using telegram: timed out

I confirm bot is configured correctly sich I get message via POST:

curl -X POST "https://api.telegram.org/bot111:222/sendMessage" -d "chat_id=333&text=Test"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   312  100   285  100    27   2241    212 --:--:-- --:--:-- --:--:--  2516{"ok":true,"result":{"message_id":2,"from":{"id":111,"is_bot":true,"first_name":"WATCHTOWER.example.com","username":"example_watchtower_bot"},"chat":{"id":333,"first_name":"ZZZ","last_name":"ZZZ","username":"example","type":"private"},"date":1739135500,"text":"Test"}}

Image

What am I doing wrong? Thanks!

Steps to reproduce

  1. set up new bot
  2. get chat_id
  3. configure WATCHTOWER_NOTIFICATION_URL
  4. see logs for the time out error message

Expected behavior

Successful telegram message from the watchtower

Screenshots

No response

Environment

  • Platform: Debian 12
  • Architecture: x64
  • Docker Version: Docker version 27.5.0, build a187fa5

Your logs

watchtower  | time="2025-02-09T21:00:22Z" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
watchtower  | time="2025-02-09T21:00:23Z" level=debug msg="Making sure everything is sane before starting"
watchtower  | time="2025-02-09T21:00:23Z" level=debug msg="Retrieving running containers"
watchtower  | time="2025-02-09T21:00:23Z" level=debug msg="There are no additional watchtower containers"
watchtower  | time="2025-02-09T21:00:23Z" level=debug msg="Watchtower HTTP API skipped."
watchtower  | time="2025-02-09T21:00:23Z" level=info msg="Watchtower 1.7.1"
watchtower  | time="2025-02-09T21:00:23Z" level=info msg="Using notifications: telegram"
watchtower  | time="2025-02-09T21:00:23Z" level=info msg="Only checking containers using enable label"
watchtower  | time="2025-02-09T21:00:23Z" level=info msg="Scheduling first run: 2025-02-09 21:00:43 +0000 UTC"
watchtower  | time="2025-02-09T21:00:23Z" level=info msg="Note that the first check will be performed in 19 seconds"
watchtower  | time="2025-02-09T21:00:33Z" level=error msg="Failed to send shoutrrr notification" error="failed to send using telegram: timed out" index=0 notify=no service=telegram
watchtower  | time="2025-02-09T21:00:43Z" level=debug msg="Checking containers for updated images"
watchtower  | time="2025-02-09T21:00:43Z" level=debug msg="Retrieving running containers"
watchtower  | time="2025-02-09T21:00:43Z" level=debug msg="Trying to load authentication credentials." container=/general.codeserver.50117 image="lscr.io/linuxserver/code-server:latest"
watchtower  | time="2025-02-09T21:00:43Z" level=debug msg="No credentials for lscr.io found" config_file=/config.json
watchtower  | time="2025-02-09T21:00:43Z" level=debug msg="Got image name: lscr.io/linuxserver/code-server:latest"
watchtower  | time="2025-02-09T21:00:43Z" level=debug msg="Checking if pull is needed" container=/general.codeserver.50117 image="lscr.io/linuxserver/code-server:latest"
watchtower  | time="2025-02-09T21:00:43Z" level=debug msg="Built challenge URL" URL="https://lscr.io/v2/"
watchtower  | time="2025-02-09T21:00:59Z" level=debug msg="Could not do a head request for \"lscr.io/linuxserver/code-server:latest\", falling back to regular pull." container=/general.codeserver.50117 image="lscr.io/linuxserver/code-server:latest"
watchtower  | time="2025-02-09T21:00:59Z" level=debug msg="Reason: Get \"https://lscr.io/v2/\": dial tcp: lookup lscr.io on 127.0.0.11:53: server misbehaving" container=/general.codeserver.50117 image="lscr.io/linuxserver/code-server:latest"
watchtower  | time="2025-02-09T21:00:59Z" level=debug msg="Pulling image" container=/general.codeserver.50117 image="lscr.io/linuxserver/code-server:latest"
watchtower  | time="2025-02-09T21:00:59Z" level=debug msg="No new images found for /general.codeserver.50117"
watchtower  | time="2025-02-09T21:00:59Z" level=info msg="Session done" Failed=0 Scanned=1 Updated=0 notify=no
watchtower  | time="2025-02-09T21:00:59Z" level=debug msg="Scheduled next run: 2025-02-09 21:01:43 +0000 UTC"

Additional context

No response

@aronmgv aronmgv changed the title Telegram notificatios timing out - failed to send using telegram: timed out Telegram notifications timing out - failed to send using telegram: timed out Feb 9, 2025
Copy link

github-actions bot commented Feb 9, 2025

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! 🙏

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

1 participant