-
Notifications
You must be signed in to change notification settings - Fork 908
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 logs "Failed to send shoutrrr notification" when not configured for shoutrrr #1374
Comments
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! 🙏 |
shoutrrr is the notification library that watchtower uses. the email notifications map to shoutrrrs |
I am not sure, if my problem is the same because i switched to the new notification url, but i also get a time out.
docker-compose.yml: version: "3"
services:
watchtower:
container_name: watchtower
restart: unless-stopped
image: containrrr/watchtower
network_mode: bridge
environment:
- WATCHTOWER_MONITOR_ONLY=false
- WATCHTOWER_SCHEDULE=@midnight
- WATCHTOWER_NO_STARTUP_MESSAGE=true
- WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL}
- WATCHTOWER_NOTIFICATIONS_HOSTNAME=${WATCHTOWER_NOTIFICATIONS_HOSTNAME}
- WATCHTOWER_NOTIFICATION_DELAY=300
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
labels:
- "io.portainer.accesscontrol.users=${PORTAINER_USER}" Watchtower logs (unfortunately without debug)
Should i open a new issue and post my findings there? |
Hm, yeah, it looks like the timeout (10s) is not being adjusted for the delayed sending. The error comes 10s after the session is done, but obviously it would never complete before the deadline if it's set to wait 300s before sending. Also, the error messages picking up the wrong service is likely due to go randomizing map iteration, a constant source of bugs unfortunately. The original issue doesn't have a delay, and is more about shoutrrr being used to send email. Perhaps a new issue is better. It should be fairly easy fixes... |
Note that the environment variable is |
When configured WATCHTOWER_NOTIFICATIONS="email", the logs show an error "Failed to send shoutrrr notification".
Email does work, shortly after starting the container, I receive this email:
The environmental variable WATCHTOWER_NOTIFICATIONS has an option for shoutrrr, but the container was not started with this option, so why is Watchtower trying to send a shoutrrr notification?
To Reproduce
start the container:
wait a minute, then pull the logs:
docker logs watchtower
Expected behavior
When not configured for shoutrrr notifications, the container should not log an error that shoutrrr notification failed.
Platform Ubuntu 22.04.1 LTS
Architecture x86_64
Watchtower debug logs:
The text was updated successfully, but these errors were encountered: