You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/09/08 23:12:34 UTC
[kudu-CR] rpc: print nicer errors when mixing up HTTP and KRPC
Hello Mike Percy,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/4338
to review the following change.
Change subject: rpc: print nicer errors when mixing up HTTP and KRPC
......................................................................
rpc: print nicer errors when mixing up HTTP and KRPC
Users often accidentally try to navigate to a Kudu server's RPC port in
their browser, or try to send an RPC to the HTTP port. This patch
improves the error messages that are reported as follows:
* Clients trying to speak RPC to the HTTP port now see an error like:
F0908 16:08:15.823751 21988 kudu-admin.cc:168] Check failed: _s.ok() Bad
status: IO error: Could not locate the leader master: Client connection
negotiation failed: client connection to 127.0.0.1:8051: received
invalid RPC message which appears to be an HTTP response. Verify that
you have specified a valid RPC port and not an HTTP port.
instead of
F0908 16:09:42.489558 22016 kudu-admin.cc:168] Check failed: _s.ok() Bad
status: IO error: Could not locate the leader master: Client connection
negotiation failed: client connection to 127.0.0.1:8051: Received
invalid message of size 1213486160 which exceeds the
rpc_max_message_size of 52428800 bytes
* Servers which receive an HTTP request to their RPC port now report an
error like:
0908 16:06:22.975401 (+ 68us) negotiation.cc:234] Negotiation
complete: Invalid argument: Server connection negotiation failed: server
connection from 127.0.0.1:56866: invalid negotation, appears to be an
HTTP client on the RPC port
instead of:
0908 16:04:47.236063 (+ 88us) negotiation.cc:234] Negotiation
complete: Invalid argument: Server connection negotiation failed: server
connection from 127.0.0.1:56832: Connection must begin with magic
number: hrpc
Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
---
M src/kudu/rpc/blocking_ops.cc
M src/kudu/rpc/serialization.cc
2 files changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/38/4338/1
--
To view, visit http://gerrit.cloudera.org:8080/4338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
[kudu-CR] rpc: print nicer errors when mixing up HTTP and KRPC
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.
Change subject: rpc: print nicer errors when mixing up HTTP and KRPC
......................................................................
Patch Set 1:
Build Started http://104.196.14.100/job/kudu-gerrit/3287/
--
To view, visit http://gerrit.cloudera.org:8080/4338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-HasComments: No
[kudu-CR] rpc: print nicer errors when mixing up HTTP and KRPC
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.
Change subject: rpc: print nicer errors when mixing up HTTP and KRPC
......................................................................
Patch Set 2:
Build Started http://104.196.14.100/job/kudu-gerrit/3296/
--
To view, visit http://gerrit.cloudera.org:8080/4338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-HasComments: No
[kudu-CR] rpc: print nicer errors when mixing up HTTP and KRPC
Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has submitted this change and it was merged.
Change subject: rpc: print nicer errors when mixing up HTTP and KRPC
......................................................................
rpc: print nicer errors when mixing up HTTP and KRPC
Users often accidentally try to navigate to a Kudu server's RPC port in
their browser, or try to send an RPC to the HTTP port. This patch
improves the error messages that are reported as follows:
* Clients trying to speak RPC to the HTTP port now see an error like:
F0908 16:08:15.823751 21988 kudu-admin.cc:168] Check failed: _s.ok() Bad
status: IO error: Could not locate the leader master: Client connection
negotiation failed: client connection to 127.0.0.1:8051: received
invalid RPC message which appears to be an HTTP response. Verify that
you have specified a valid RPC port and not an HTTP port.
instead of
F0908 16:09:42.489558 22016 kudu-admin.cc:168] Check failed: _s.ok() Bad
status: IO error: Could not locate the leader master: Client connection
negotiation failed: client connection to 127.0.0.1:8051: Received
invalid message of size 1213486160 which exceeds the
rpc_max_message_size of 52428800 bytes
* Servers which receive an HTTP request to their RPC port now report an
error like:
0908 16:06:22.975401 (+ 68us) negotiation.cc:234] Negotiation
complete: Invalid argument: Server connection negotiation failed: server
connection from 127.0.0.1:56866: invalid negotation, appears to be an
HTTP client on the RPC port
instead of:
0908 16:04:47.236063 (+ 88us) negotiation.cc:234] Negotiation
complete: Invalid argument: Server connection negotiation failed: server
connection from 127.0.0.1:56832: Connection must begin with magic
number: hrpc
Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Reviewed-on: http://gerrit.cloudera.org:8080/4338
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <mp...@apache.org>
---
M src/kudu/rpc/blocking_ops.cc
M src/kudu/rpc/serialization.cc
2 files changed, 18 insertions(+), 2 deletions(-)
Approvals:
Mike Percy: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/4338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
[kudu-CR] rpc: print nicer errors when mixing up HTTP and KRPC
Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change.
Change subject: rpc: print nicer errors when mixing up HTTP and KRPC
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/4338/1/src/kudu/rpc/serialization.cc
File src/kudu/rpc/serialization.cc:
Line 170: if (slice.starts_with("GET ")) {
how about || slice.starts_with("POST ") || slice.starts_with("HEAD ")
--
To view, visit http://gerrit.cloudera.org:8080/4338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] rpc: print nicer errors when mixing up HTTP and KRPC
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Mike Percy, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/4338
to look at the new patch set (#2).
Change subject: rpc: print nicer errors when mixing up HTTP and KRPC
......................................................................
rpc: print nicer errors when mixing up HTTP and KRPC
Users often accidentally try to navigate to a Kudu server's RPC port in
their browser, or try to send an RPC to the HTTP port. This patch
improves the error messages that are reported as follows:
* Clients trying to speak RPC to the HTTP port now see an error like:
F0908 16:08:15.823751 21988 kudu-admin.cc:168] Check failed: _s.ok() Bad
status: IO error: Could not locate the leader master: Client connection
negotiation failed: client connection to 127.0.0.1:8051: received
invalid RPC message which appears to be an HTTP response. Verify that
you have specified a valid RPC port and not an HTTP port.
instead of
F0908 16:09:42.489558 22016 kudu-admin.cc:168] Check failed: _s.ok() Bad
status: IO error: Could not locate the leader master: Client connection
negotiation failed: client connection to 127.0.0.1:8051: Received
invalid message of size 1213486160 which exceeds the
rpc_max_message_size of 52428800 bytes
* Servers which receive an HTTP request to their RPC port now report an
error like:
0908 16:06:22.975401 (+ 68us) negotiation.cc:234] Negotiation
complete: Invalid argument: Server connection negotiation failed: server
connection from 127.0.0.1:56866: invalid negotation, appears to be an
HTTP client on the RPC port
instead of:
0908 16:04:47.236063 (+ 88us) negotiation.cc:234] Negotiation
complete: Invalid argument: Server connection negotiation failed: server
connection from 127.0.0.1:56832: Connection must begin with magic
number: hrpc
Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
---
M src/kudu/rpc/blocking_ops.cc
M src/kudu/rpc/serialization.cc
2 files changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/38/4338/2
--
To view, visit http://gerrit.cloudera.org:8080/4338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
[kudu-CR] rpc: print nicer errors when mixing up HTTP and KRPC
Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change.
Change subject: rpc: print nicer errors when mixing up HTTP and KRPC
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/4338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I77ce8c8903ddf18592ba634a90d7efc4083d572a
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-HasComments: No