OpenTSDB - Chunked request not supported [解决]

本文介绍了解决OpenTSDB中长内容请求导致的数据不完整问题的方法。通过调整tsd.http.request.enable_chunked和tsd.http.request.max_chunk配置项,解决了因请求内容过长而引发的Chunkedrequestnotsupported异常。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

      OpenTSDB 中提供了tsmeta的管理接口, 提供存储元数据信息。

      但是当我们再调用该接口时,request body中的内容过长,TSD后端使用的是netty进行网络通信,由于不能一次接收完整,就会出现断包,数据不完整,那么导致Chunked request not supported 异常。

      刚开始以为tsd不支持长内容,后来通过官方文档,发现是有相关配置的。

     http://opentsdb.net/docs/build/html/user_guide/configuration.html


tsd.http.request.enable_chunked Boolean Optional Whether or not to enable incoming chunk support for the HTTP RPC false  
tsd.http.request.max_chunk Integer Optional The maximum request body size to support for incoming HTTP requests when chunking is enabled. 4096
    

     默认情况下TSD不启用 该功能的, 主要还是为了防止客户端的恶意请求吧。 

     但是项目中确实需要到长内容请求,因此简单修改该配置:

    

   tsd.http.request.enable_chunked = true;
   tsd.http.request.max_chunk = 65535;

    重启tsd 问题解决!

      

转载于:https://my.oschina.net/yjwxh/blog/533191

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值