Backup failes due to healthcheck fail, possible proxy issue #512
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#512
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
My backup was running fine until it didn't so I decided to add some healthcheck service.
Steps to reproduce (if a bug)
I added
healthchecks: https://hc-ping.com/e8d831ce-2c15-XXXXXXXX
in the hooks section. I think it may be a proxy problem. All environment variables are set and I can ping the healthcheck service from command line but apparently borgmatic cannnot reach it. Are proxy settings used?Actual behavior (if a bug)
Environment
borgmatic version: [version here]
1.5.1
borgmatic installation method: [e.g., Debian package, Docker container, etc.]
debian package
Borg version: [version here]
borg 1.1.15
Python version: [version here]
Python 3.8.10
operating system and version: [OS here]
Ubuntu 20.04
Thank you for filing this! borgmatic's Healthchecks hook doesn't have any special treatment for proxies. Can you tell me about the proxy settings you're using?
Sure, I am using a very basic corporate proxy. They are present in the environment as
but the
requests
api used by borgmatic is not picking up the environment per default.I already tested the workaround by replacing the respective parts in the
ping_monitor
function inhealthchecks.py
with:With this, the healthcheck works fine.
Of course this should be done depending on a presence of an environment variable or maybe using a configuration option.
I'm not sure why the environment variables aren't working on your machine. In my local testing,
requests
does use thehttps_proxy
environment variable when aproxies=
parameter isn't passed in. And the requests proxies documentations seems to support that.Out of curiosity, if you run borgmatic with the environment variable, then does it get picked up properly? E.g.:
Thanks!
Closing this for now, but feel free to follow up. We can always reopen it. Thanks!