childe / gohangout

使用 golang 模仿的 Logstash。用于消费 Kafka 数据,处理后写入 ES、Clickhouse 等。
MIT License
1.03k stars 238 forks source link

1.8.1 异常退出 #180

Closed zcola closed 2 years ago

zcola commented 2 years ago

跑的好好挂了,重启能恢复正常,开了sniff

I0526 07:13:37.154971       1 bulk_http.go:163] try to bulk with host (http://10.7.92.103:9200)
I0526 07:13:37.994876       1 bulk_http.go:170] bulk done with execution_id 8594 0.840 36000 42857.147
I0526 07:13:39.033587       1 bulk_http.go:153] bulk 12152 docs with execution_id 8595
I0526 07:13:39.033626       1 bulk_http.go:163] try to bulk with host (http://10.7.92.11:9200)
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 28 [running]:
github.com/childe/gohangout/output.filterNodesIPList(0xc0139a4a20, 0xc000217640, 0x1b, 0xc3a800, 0xc0001402c8, 0x0, 0x0, 0x0)
#011/root/build_hangout/gohangout/output/elasticsearch_output.go:467 +0x6a7
github.com/childe/gohangout/output.sniffNodesFromOneHost(0xc0002176a0, 0x15, 0xc000217640, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0)
#011/root/build_hangout/gohangout/output/elasticsearch_output.go:455 +0x31b
github.com/childe/gohangout/output.sniffNodes(0xc000255a40, 0xc000359f90, 0x1, 0x40, 0xc000359f70, 0x1)
#011/root/build_hangout/gohangout/output/elasticsearch_output.go:419 +0x1f2
github.com/childe/gohangout/output.newElasticsearchOutput.func3(0x3c, 0xc000255a40, 0xc00012c8c0, 0xc000131380, 0xc000119ba0)
#011/root/build_hangout/gohangout/output/elasticsearch_output.go:369 +0xac
created by github.com/childe/gohangout/output.newElasticsearchOutput
#011/root/build_hangout/gohangout/output/elasticsearch_output.go:367 +0x146f
childe commented 2 years ago

Sniff 返回的数据格式不对吧,我修改一下,不能让他直接Panic。