-
Notifications
You must be signed in to change notification settings - Fork 15
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
Shell command invocation (bug with v0.7.0-beta.4) #14
Comments
First of all, do you see the stderr and stdout on the terminal when using 0.7.0-beta4? I tried to reproduce this under Debian Buster but I cannot. Terminal output and what's sent to HC API matches.
|
Console output as per below (it's the same for stable v0.6):
|
I have tested some further and probably found a helpful clue. Essentially, v0.7.0-beta also works on my system when I use the default instance of healthchecks (leaving api-url away or specifying hc-ping.com):
v0.7.0-beta (any of the 4 beta versions) stops working when I use api-url to refer to my own healthchecks instance (see first post). |
I'm guessing the screenshot above is from the hc-ping(.)com instance. I was gonna ask if there was any chance you set If you instance is available for access over HTTP (clear text), you can also run tcpdump on the client to see if the client is actually sending the body. ...or for a more isolated test, I quickly whipped up a web server which returns 200 to every request and dumps the request path and received request body to stdout. Copy paste the code below to a file, say
Now you can point runitor to this one, with |
Here is the result for the server listening on 8080:
These were the runitor calls:
|
So runitor is sending the body in the request. At this point I don't really know what's up with your healthchecks instance, not showing the body. I'm going to close this issue for now. Feel free to re-open it if you find a case where you can reproducibly alter the runitor's behavior. |
Go's net/http/request.go cannot deduce the body size if what's behind io.Reader isn't a *bytes.{Buffer,Reader} or *strings.Reader. *internal.RingBuffer merely implements the io.Reader interface, with no way of hinting available data length. This causes requests to use chunked Transfer-Encoding. Apparently Django's development server doesn't support chunked encoding but still returns HTTP 200 while the body says HTTP 400... To cater to Healthchecks private instances served this way, we do a type assertion for *internal.RingBuffer, and manually set content length. This should result a request with a Content-Length header and no Transfer-Encoding. Fixes #14 and #16
I noticed a bug with shell invocation on v0.7.0-beta (all versions from .1 to .4). Essentially, I am unable to get stdout to be reported to a self-hosted healthchecks instance.
Latest stable version 0.6.0 seems to report stdout fine:
Linux environment: Debian buster running as LXC container on QNAP NAS (x64)
Healthchecks: Latest docker image from linuxserver/healthchecks
The text was updated successfully, but these errors were encountered: