Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with http2 / https #93

Open
arn-the-long-beard opened this issue Dec 3, 2020 · 3 comments
Open

How to use with http2 / https #93

arn-the-long-beard opened this issue Dec 3, 2020 · 3 comments

Comments

@arn-the-long-beard
Copy link

arn-the-long-beard commented Dec 3, 2020

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

@fcsonline
Copy link
Owner

fcsonline commented Dec 3, 2020

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

@arn-the-long-beard
Copy link
Author

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 ?

@fcsonline
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants