You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CodeChecker store命令报Thrift无效数据错误的原因及解决建议

解决CodeChecker store时的Thrift invalid data error问题

问题分析

报错日志里的thrift.protocol.TProtocol.TProtocolException: Unexpected character: b'<'是核心线索——客户端原本期望接收Thrift协议的JSON数据,实际却收到了HTML内容(比如404错误页、UI页面),问题根源在于**store命令的--url参数指向了错误的端点**。

解决步骤

  • 修正--url参数:CodeChecker的store命令需要指向服务端的API接口,而非UI中的产品页面。正确的URL格式应为:
    http://codechecker.XX.de/CodeCheckerServiceV6
    
    替换原命令中的错误URL,重新执行:
    CodeChecker store /codechecker/results --name example --url http://codechecker.XX.de/CodeCheckerServiceV6
    
  • 验证API端点可用性:用curl测试API地址是否返回正确的Thrift响应:
    curl http://codechecker.XX.de/CodeCheckerServiceV6
    
    返回类似{"error":"Thrift protocol error: Missing method name"}的内容说明端点正确;若返回HTML页面,则需检查服务端API配置。
  • 重新确认登录状态:使用正确的API URL重新登录,确保会话有效:
    CodeChecker cmd login http://codechecker.XX.de/CodeCheckerServiceV6
    
  • 修复文件权限警告:虽然不是直接报错原因,但执行以下命令消除安全风险:
    chmod 0600 /root/.codechecker.passwords.json
    

内容的提问来源于stack exchange,提问作者RCB

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 11:41:03