Try to use heartbeat to ping thrift interface

try to use heartbeat to ping thrift interface(call ping method , receive string "pong")
i ping through tcp and need to send a binary data as below:

check.send: "\x00\x00\x00\x10\x80\x01\x00\x01\x00\x00\x00\x04\x70\x69\x6e\x67\x00\x00\x00\x01\x00"
check.receive: "\x00\x00\x00\x1c\x80\x01\x00\x02\x00\x00\x00\x04\x70\x69\x6e\x67\x00\x00\x00\x01\x0b\x00\x00\x00\x00\x00\x04\x50\x4f\x4e\x47\x00"

but "\x80" seems to be overflow ,

send data would become:
\x00\x00\x00\x10 \x2c \x80\x01\x00\x01\x00\x00\x00\x04\x70\x69\x6e\x67\x00\x00\x00\x01\x00

additional "\x2c"

  1. Can you try to put the string with single quotes? like check.send: '\x00\x00\x00\x10\x80\x01\x00\x01\x00\x00\x00\x04\x70\x69\x6e\x67\x00\x00\x00\x01\x00'. If double quotes are used, the YAML parser interprets strings itself. Using ' the string is passed to heartbeat as is.

  2. Feel free to open an enhancement request for an heartbeat thrift monitor. Instead of messing with the tcp monitor, it should be as easy as using the thrift monitor type.

i have try use the '
it's not ok too, yaml would not handle the backslash,
it just treat '\x80' as '\', 'x' , '8', '0' 4 char.

i will open the request later

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.