0

I query data from druid via SQL. Sometimes it succeeds, but sometimes it fails. My query uses curl; it is:

curl --negotiate -u:srvadmin  -X POST -H'Content-Type: application/json' http://du-s12-idc:8082/druid/v2/sql -d @query.json.

When it fails, I get this response:

{"error":"Unknown exception","errorMessage":"Failure getting results for query[6639c357-441f-456c-9a01-0f7ffd0758b7] url[http://du-s28-idc:8083/druid/v2/] because of [Invalid type marker byte 0x3c for expected value token\n at [Source: (SequenceInputStream); line: -1, column: 

1]]","errorClass":"io.druid.java.util.common.RE","host":null}

The file query.json is simple:

{"query":"select * from bds_dsp_media_run_info_h_1016 limit 3"}

The data was loaded from hadoop to druid and succeeded. My druid version was 0.11 and built in a cluster with Kerberos.

Does anyone have this problem?

TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

0

I think Invalid type marker byte 0x3c... exception is just uninformative response that tells you that the server has an internal error, but doesn't give you a clue on what is actually happening. It would help a lot if you could check broker logs when the request is happening.

But, to play a guessing game - I would expect it to be a Kerberos issue. Do you have KRB5_CLIENT_KTNAME env variable populated with the path to your key file?

Artem Vovsia
  • 1,520
  • 9
  • 15
  • the broker log when i get response is :Caused by: com.fasterxml.jackson.core.JsonParseException: Invalid type marker byte 0x3c for expected value token – jacky-melon-he Oct 21 '19 at 02:46
  • actually ,i'm new to kerberos.i use ambari to install the kerberos. KRB5_CLIENT_KTNAME env variable may influence the curl request? – jacky-melon-he Oct 21 '19 at 03:26
  • That variable should point to a keytab file that is used to authenticate with Kerberos. See https://stackoverflow.com/a/38664954/1130863 for more info. Honestly, I don't know whether it's a cause of the issue, but might be worth it to try – Artem Vovsia Oct 21 '19 at 10:39