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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example cannot work under http protocol #4

Closed
franklee0817 opened this issue Jun 14, 2022 · 2 comments
Closed

example cannot work under http protocol #4

franklee0817 opened this issue Jun 14, 2022 · 2 comments

Comments

@franklee0817
Copy link

I found there's a critical error in transport.Dialer while using transport.HTTP instead of transport.GRPC. The address parameter is like 127.0.0.1:8080. rafthttp.Dialer while pass this address to rafthttp.client thus problems will happen when the leader is trying to communicate with followers. rafthttp.client.Message proceed client request via http.NewRequestWithContext in rafthttp.client.requestProto method. Because the scheme of URL is missing from which we passed (127.0.0.1:8080) in the dialer.

More detail please see net/url.Parse. URL schema is required.

@franklee0817
Copy link
Author

bug was found in _examples/raft

@shaj13
Copy link
Owner

shaj13 commented Jun 22, 2022

@franklee0817 the caller must start the server for both http and grpc protocols, therefore the caller must set the scheme.
Pass http://127.0.0.1:8080 as address should do the work.
Feel free to re-open

@shaj13 shaj13 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2022
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