How to use with http2 / https
arn-the-long-beard opened this issue ยท 3 comments
Hello !
First thank you for your library. It seems to be an awesome tool ๐
Now I have a web server with http2 and rustls for my auto generated certificate.
When I try to run :
drill --benchmark benchmark.yml --no-check-certificate -stats
I do get some error message :
Error connecting 'https://127.0.0.1:8000/':
reqwest::Error { kind: Request, url: Url { scheme: "https", host: Some(Ipv4(127.0.0.1)), port: Some(8000), path: "/", query: None, fragment: None }, source: hyper::Error(Connect, Ssl(Error { code: ErrorCode(1), cause: Some(Ssl(ErrorStack([Error { code: 336151578, library: "SSL routines", function: "ssl3_read_bytes", reason: "tlsv1 alert decode error", file: "../ssl/record/rec_layer_s3.c", line: 1528, data: "SSL alert number 50" }]))) }, X509VerifyResult { code: 0, error: "ok" })) }
I am not sure what is the problem because I have all the necessaries libraries :
libssl-dev
& pkg-config
What could be the thing I am missing ?
Best regards,
Arn
To be honest, http2 is not fully tested in drill
. For this reason, I have created this branch to have a shared playground to test it. If we find something broken or we can add some documentation about it, it will be awesome.
https://github.com/fcsonline/drill/tree/feature/http2-server
You should see this log if you start the node server
in example/server
:
Listening on port 9000...
Generating certificates for http2...
Listening http2 on port 9443...
Then, you can run the benchmark with: cargo run -- -b example/http2.yml
Hello ๐ !
Thank you so much. I thought I replied Friday, but I did not, braincrash here ๐คฃ
Well I did made the try and here are my results
node server
Listening on port 9000... Listening http2 on port 9443...
Then
cargo run -- -b example/http2.yml --no-check-certificate
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/drill -b example/http2.yml --no-check-certificate`
Concurrency 1
Iterations 1
Rampup 0
Base URL https://localhost:9443
Error connecting 'https://localhost:9443/stream': reqwest::Error { kind: Request, url: Url { scheme: "https", host: Some(Domain("localhost")), port: Some(9443), path: "/stream", query: None, fragment: None }, source: hyper::Error(ChannelClosed) }
And then I got this error server side. And I am not sure what to do with it .
events.js:174
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
What do you think happened ? And what could we do to investigate ?
Another braincrash here ๐ . I forgot to mention I was not able to get it to work and I was getting exactly the same errors as you, but it is a good starting point for testing the http2 behaviour.