Comments (17)
0.7.1-beta.1 works here with the Django dev server:
from runitor.
This fixed it. Thank you very much! π
from runitor.
I have the same issue since v0.7 beta, also with a self-hosted healthcheck.io instance. So far, I am back to v0.6 stable.
from runitor.
Yes I read your issue yesterday
0.6.0 is working nice
from runitor.
Yes I read your issue yesterday
0.6.0 is working nice
If you read #14, then you saw the simple web server pasted to debug the operation. Can you by any chance run it to see if runitor is sensing the body?
Do you have an option to dump the entire HTTP session on the receiver side (the instance that handles requests to healthchecks.openstack.local)
I tried to reproduce the issue running a hosted HC instance locally in a container, and then on another machine in the same network, but couldn't reproduce the behavior you and @lakemike report.
Maybe we can ping @cuu508 to give us some hot debugging tips.
from runitor.
Looks like I can reproduce it when testing against a development version of Healthchecks running locally (manage.py runserver
).
runitor 0.6.0 sends the Content-Length header but runitor 0.7.0 sends Transfer-Encoding: chunked
.
I suspect the Django development server doesn't like "chunked"
0.6.0:
0.7.0:
@lakemike, @fabMrc what Dockerfile are you using?
from runitor.
Pretty sure it has something to do with the chunked encoding.
Command:
runitor-v0.7.0-linux-amd64 -uuid 3b0aabaa-9c33-4974-963a-c334dee68c66 --api-url http://localhost:8000/ping -no-start-ping -- echo hi
If I use "Follow TCP stream" in Wireshark, I can see the chunk sizes sent by the client (3
and 0
):
And the server complains about "3" β looks like it doesn't recognize it.
from runitor.
Thanks for the helpful pointers @cuu508.
No wonder I couldn't reproduce this because local container was behind Caddy and the remote install was behind Nginx.
It's a bummer Django's dev server doesn't fully support HTTP RFC but unless I'm overlooking a fact, runitor doesn't need to stream the request either. The decision to do chunked encoding comes from Go's HTTP library (here exactly https://golang.org/src/net/http/transfer.go#L167). I'll run a few sessiosn under debugger to see what underlying change from 0.6.0 to 0.7.0 changed code flow to take TE: chunked
path and see if I can quickly publish a 0.7.1.
from runitor.
And the server complains about "3" β looks like it doesn't recognize it.
Yet it returns HTTP 200 as the status while the body mentions and HTTP 400 Bad Request?
from runitor.
Request preparation goes through a type switch at https://golang.org/src/net/http/request.go#L888.
With 0.7.0, the ping body is read from a ring buffer to implement tailing with limited resources. Because it doesn't match this limited type switch, library proceeds with assumption of not being able to deduce a header send time content length, resorting to transfer encoding.
I have two options: I either introduce a type switch in api.go:APIClient.Post
for *internal.RingBuffer
type, or in the main, I convert the ringbuffer to a *strings.Reader
type, which will surely cause one more copy, but granted it's just 10K in most cases, it's nothing important.
I'll get back to this later today.
from runitor.
@cuu508 @fabMrc @lakemike can you try with 0.7.1-beta.1 binaries?
See the commit above, it's essentially a two line change, explicitly setting the content length to prevent conversion to chunked encoding.
I only tested this with tcpdump. I'd appreciate a π or π with Django devel server setup.
from runitor.
Fixed it works nice I receive log in email body and it is recorded in healtcheckio
from runitor.
@fabMrc are using Django development server in your setup? If so, please consider switching to gunicorn or uwsgi. From Django docs:
DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests. (And thatβs how itβs gonna stay. Weβre in the business of making Web frameworks, not Web servers, so improving this server to be able to handle a production environment is outside the scope of Django.)
from runitor.
No I am using uwsgi
from runitor.
No I am using uwsgi
TIL uwsgi doesn't yet automagically support chunked. It supports reading chunked request body using uwsgi-specific API. And there's a wsgi-manage-chunked-input
configuration option coming, but looks like it is not here yet.
from runitor.
Alright, v0.7.1 is out for the two (maybe three) people in the world, running their instances behind toy servers and want to use runitor ;)
from runitor.
haha nice to be a VIP user ^^ I am using linuxserver/healthckeckio docker image
from runitor.
Related Issues (20)
- Feature request: `-create` flag HOT 2
- Show compiled URL on error HOT 1
- What happened to the v1.2.0 tag in Docker Hub? HOT 2
- HC_API_URL env variable doesn't work as expected HOT 1
- UnicodeDecodeError on success ping with special characters from a Windows host HOT 4
- No ping-status 'OK' when script has no stderr/out? HOT 4
- Feature Request: Custom Header Support HOT 4
- Feature Request: Remove version from binary filenames HOT 1
- Update default value for -ping-body-limit HOT 2
- error: the input device is not a TTY HOT 2
- Feature request: Send command used on start HOT 2
- Feature request: Ignore HOT 1
- `panic: runtime error: invalid memory address or nil pointer dereference` on invalid slugs HOT 2
- Feature request: Upload logs to S3 HOT 7
- Ping body limit? HOT 1
- Feature request: add "log" endpoint HOT 13
- Add handling for HTTP 429 responses HOT 2
- Regression: API URL handling changed with release 1.1.0 HOT 9
- 307/308 redirects aren't handled well HOT 8
- Feature request: Update flag HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runitor.