Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

on 1.8+ enabling https server breaks http server with busy error #10695

Closed
spoonincode opened this issue Sep 2, 2021 · 6 comments
Closed

on 1.8+ enabling https server breaks http server with busy error #10695

spoonincode opened this issue Sep 2, 2021 · 6 comments

Comments

@spoonincode
Copy link
Contributor

This defect seems to be in all nodeos 1.8+

Launch nodeos with simply

nodeos --https-server-address 127.0.0.1:5555 --plugin eosio::chain_api_plugin

Trying to access the http server fails

$ curl http://127.0.0.1:8888/v1/chain/get_info
{"code":429,"message":"Busy","error":{"code":429,"name":"Busy","what":"Too many bytes in flight: 828. Try again later.","details":[]}}
@praphael
Copy link

praphael commented Sep 4, 2021

It should probably be an error to use --https-server-address without valid --https-certificate-chain-file and --https-private-key-file

@heifner
Copy link
Contributor

heifner commented Sep 4, 2021

Since this has been broken since 1.8+ and not reported. I suggest we remove support for https. Obviously people are providing https support via proxies. I see no reason to provide it in nodeos/rodeos/keosd.

@praphael
Copy link

praphael commented Sep 5, 2021

It appears the problem was caused by the order of initialization in http_plugin::plugin_initialize(), and an early return, When it fails to initialize the https endpoint, due to missing SSL certificate or private key files, it will return early and not initialize several options, including max_bytes_in_flight, which defaulted to 0. The plugin would then continue to use non-SSL HTTP on the default port, which also happens to be the port specified by the user.

Should be fixed as part of this PR
#10689

Failure to initialize SSL properly should be error which causes rodeos initialization to fail - it should not just continue to use non-SSL on the same port. Otherwise users would think that SSL is initialized when it is not, unless they pay attention to the error logs which can run by fast.

@heifner
Copy link
Contributor

heifner commented Sep 6, 2021

If we are going to fix it, then it should be fixed in 2.0.x, 2.1.x, 2.2.x, and in #10689. I think we should remove it.

@aclark-b1
Copy link

Chatted with @heifner a bit more and it sounds like we need this to support http_client for Zipkin, so we should go ahead and fix it rather than removing it.

praphael added a commit that referenced this issue Sep 29, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix https bug (GH issue #10695)
@praphael
Copy link

praphael commented Oct 4, 2021

Fixed in 2.0, 2.1, and 2.2.

@praphael praphael closed this as completed Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants