go thrift报错问题--WriteStructEnd
问题
go thrift开发过程中,多个goroutine共用一个client时,报错:
panic: runtime error: index out of range
goroutine 24 [running]:
happy-apple/vendor/git.apache.org/thrift.git/lib/go/thrift.(TCompactProtocol).WriteStructEnd(0xc4201086e0, 0x0, 0x0)
/home/admin/workspace/src/happy-apple/vendor/git.apache.org/thrift.git/lib/go/thrift/compact_protocol.go:160 +0x66
happy-apple/protocol/falconeye.(TAppleMetric).Write(0xc420112090, 0x787020, 0xc4201086e0, 0x0, 0x0)
/home/admin/workspace/src/happy-apple/protocol/falconeye/common.go:1714 +0xb9
happy-apple/protocol/falconeye.(ReportPutMetricDataArgs).writeField1(0xc4200f85a0, 0x787020, 0xc4201086e0, 0x0, 0x0)
/home/admin/workspace/src/happy-apple/protocol/falconeye/report.go:308 +0x123
happy-apple/protocol/falconeye.(ReportPutMetricDataArgs).Write(0xc4200f85a0, 0x787020, 0xc4201086e0, 0x200000001, 0x0)
/home/admin/workspace/src/happy-apple/protocol/falconeye/report.go:292 +0x195
happy-apple/protocol/falconeye.(ReportClient).sendPutMetricData(0xc420094320, 0xc4200aa040, 0x1, 0x1, 0x1, 0xc420112090)
/home/admin/workspace/src/happy-apple/protocol/falconeye/report.go:70 +0xe9
happy-apple/protocol/falconeye.(ReportClient).PutMetricData(0xc420094320, 0xc4200aa040, 0x1, 0x1, 0x1, 0xc4200aa040, 0x0)
/home/admin/workspace/src/happy-apple/protocol/falconeye/report.go:53 +0x4d
main.TestSendData(0xc420094320, 0x0, 0x0)
/home/admin/workspace/src/happy-apple/protocol/falconeye/report-remote/qps_client.go:116 +0x2c9
main.sendTask(0xc420094320)
/home/admin/workspace/src/happy-apple/protocol/falconeye/report-remote/qps_client.go:71 +0x2b
created by main.main
/home/admin/workspace/src/happy-apple/protocol/falconeye/report-remote/qps_client.go:47 +0x17b
使用的lib是git.apache.org/thrift.git/lib/go
原因及解决办法:
一个thrift client 不支持多个协程routine同时使用.
可创建多个client,每个协程routine一个client
go thrift报错问题--WriteStructEnd的更多相关文章
- Thrift报错:Error: Thrift compiler: Failed to translate files. Error: Cannot run program thrift error=2
文章目录 报错: 原因: 解决: 报错: Error: Thrift compiler: Failed to translate files. Error: Cannot run program th ...
- jdbc链接hive报错:java.lang.ClassNotFoundException: org.apache.thrift.transport.TTransport
写了个jdbc连接hive2的demo,结果报错:java.lang.ClassNotFoundException: org.apache.thrift.transport.TTransport,实际 ...
- hive12启动报错org.apache.thrift.server.TThreadPoolServer.<init>(Lorg/apache/thrift/server/TThreadPoolServer$Args;)
执行如下命令启动hive服务:./bin/hive --service hiveserver,报如下错误: Starting Hive Thrift ServerException in thread ...
- thrift 版本不一致导致 @Override 报错
thrift 版本不一致导致 @Override 报错 学习了:http://blog.csdn.net/antony1776/article/details/78920888 版本不一致导致的: 在 ...
- bigdata_hiveserver2报错_thrift
问题一: php客户端,链接hiveserver2 ,报错 如下 1: server.TThreadPoolServer (TThreadPoolServer.java:run(215)) - Err ...
- Hive 报错:java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
在配置好hive后启动报错信息如下: [walloce@bigdata-study- hive--cdh5.3.6]$ bin/hive Logging initialized using confi ...
- [转]happybase1.0 报错:ThriftPy does not support generating module with path in protocol 'f'
happybase1.0 报错:ThriftPy does not support generating module with path in protocol 'f' 2016-10-12 14: ...
- storm报错:Exception in thread "main" java.lang.RuntimeException: InvalidTopologyException(msg:Component: [mybolt] subscribes from non-existent stream: [default] of component [kafka_spout])
问题描述: storm版本:1.2.2,kafka版本:2.11. 在使用storm去消费kafka中的数据时,发生了如下错误. [root@node01 jars]# /opt/storm-1. ...
- Hplsql报错:...HiveSQLExpection:Error while compiling statement:No privilege 'Select' found for inputs {.....}
实践hplsql时,遇到的问题总结一下,若有不对的地方,欢迎交流. 一.Hplsql简介 hplsql的介绍详见:http://lxw1234.com/archives/2015/09/492.htm ...
随机推荐
- python-局部变量和全局变量
name = "feifei" def change_name(name): print("before change name:%s" % name) nam ...
- php优秀框架codeigniter学习系列——CI_Utf8类
CI_Utf8类用来对Utf8编码环境提供支持.(Provides support for UTF-8 environments). 从构造函数看,只有当开启了PCRE模式,加载了iconv或者mbs ...
- 深入了解HyperServer
本文,我们将尝试深入了解uniGUI HyperServer. 可以将HyperServer所有功能分成三类: HyperServer和稳定性 HyperServer和可扩展性 HyperServer ...
- linux shell 中文件编码查看及转换方法
参考: http://edyfox.codecarver.org/html/vim_fileencodings_detection.html 一.查看文件编码. 在打开文件的时候输入:set ...
- [LeetCode&Python] Problem 292. Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, eac ...
- day02编程语言介绍及python介绍
编程语言介绍 机器语言:以二进制数为代码的编程语言,直接控制硬件运行 优点:执行效率非常快 缺点:以二进制数为编码编程,编程效率非常低下,掌握它需要深厚的硬件原理功底 汇编语言:将二进制编码用英文字符 ...
- hdu 1280 堆排序
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s) ...
- hdu1358 Period KMP
给出一个字符串,找出所有可以作为它循环节的子串长度 利用kmp的失配数组的性质,可以直接做 #include<stdio.h> #include<string.h> ; cha ...
- Go Example--工作池
package main import ( "fmt" "time" ) func main() { jobs :=make(chan int,100) res ...
- 【java编程】格式化字符串
String类的format()方法用于创建格式化的字符串以及连接多个字符串对象.熟悉C语言的同学应该记得C语言的sprintf()方法,两者有类似之处.format()方法有两种重载形式. form ...