Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickhouse Plugin: runtime error at ReplicationQueue #9398

Closed
ADovgalyuk opened this issue Jun 18, 2021 · 1 comment · Fixed by #9401
Closed

Clickhouse Plugin: runtime error at ReplicationQueue #9398

ADovgalyuk opened this issue Jun 18, 2021 · 1 comment · Fixed by #9401
Labels
bug unexpected problem or unintended behavior

Comments

@ADovgalyuk
Copy link

OS: CentOS8
Telegraf: telegraf-1.19.0-1.x86_64
Clickhouse: version 21.6.4 revision 54448. Single node instance, no replication.
Configuration:

[root@centos8-tst telegraf.d]# cat click.conf 
# Read metrics from one or many ClickHouse servers
[[inputs.clickhouse]]
  username = "default"
  servers  = ["http://192.168.109.103:8123"]
  auto_discovery = false

Telegraf_Test:

[root@centos8-tst telegraf.d]# telegraf --test --config click.conf 
2021-06-18T13:29:30Z I! Starting Telegraf 1.19.0
> clickhouse_tables,database=graphite,host=centos8-tst,source=192.168.109.103,table=graphite bytes=168207913i,parts=18i,rows=406317574i 1624022970000000000
> clickhouse_tables,database=graphite,host=centos8-tst,source=192.168.109.103,table=graphite_index bytes=286745i,parts=9i,rows=206843i 1624022970000000000
> clickhouse_tables,database=graphite,host=centos8-tst,source=192.168.109.103,table=graphite_tagged bytes=44882767i,parts=12i,rows=5019899i 1624022970000000000
> clickhouse_tables,database=statistics,host=centos8-tst,source=192.168.109.103,table=http_sms_cdr bytes=5266i,parts=1i,rows=100i 1624022970000000000
> clickhouse_tables,database=system,host=centos8-tst,source=192.168.109.103,table=asynchronous_metric_log bytes=5247i,parts=3i,rows=624i 1624022970000000000
> clickhouse_tables,database=system,host=centos8-tst,source=192.168.109.103,table=asynchronous_metric_log_0 bytes=17451554i,parts=11i,rows=7337554i 1624022970000000000
> clickhouse_tables,database=system,host=centos8-tst,source=192.168.109.103,table=metric_log bytes=172991i,parts=5i,rows=679i 1624022970000000000
> clickhouse_tables,database=system,host=centos8-tst,source=192.168.109.103,table=metric_log_0 bytes=875912046i,parts=13i,rows=8984691i 1624022970000000000
> clickhouse_tables,database=system,host=centos8-tst,source=192.168.109.103,table=trace_log bytes=5863784i,parts=12i,rows=79151i 1624022970000000000
panic: runtime error: index out of range [0] with length 0

goroutine 32 [running]:
github.com/influxdata/telegraf/plugins/inputs/clickhouse.(*ClickHouse).replicationQueue(0xc00086c6c0, 0x5648b38, 0xc000648500, 0xc00084ad80, 0x0, 0x0)
	/go/src/github.com/influxdata/telegraf/plugins/inputs/clickhouse/clickhouse.go:334 +0x333
github.com/influxdata/telegraf/plugins/inputs/clickhouse.(*ClickHouse).Gather(0xc00086c6c0, 0x5648b38, 0xc000648500, 0x0, 0x0)
	/go/src/github.com/influxdata/telegraf/plugins/inputs/clickhouse/clickhouse.go:212 +0x176
github.com/influxdata/telegraf/agent.(*Agent).testRunInputs.func2(0xc0004648b0, 0xc00013f8e0, 0xc000116b40, 0xc0006484c0, 0xc000114280)
	/go/src/github.com/influxdata/telegraf/agent/agent.go:403 +0x222
created by github.com/influxdata/telegraf/agent.(*Agent).testRunInputs
	/go/src/github.com/influxdata/telegraf/agent/agent.go:372 +0x109

@ADovgalyuk ADovgalyuk added the bug unexpected problem or unintended behavior label Jun 18, 2021
@Slach
Copy link
Contributor

Slach commented Jun 18, 2021

@ADovgalyuk thanks a lot for reporting, i'm on it

Slach added a commit to Altinity/telegraf that referenced this issue Jun 18, 2021
…ions try to aggregate from empty rows set, improve float type handling from system.asynchronous_metrics

Signed-off-by: Eugene Klimov <[email protected]>
Slach added a commit to Altinity/telegraf that referenced this issue Jun 18, 2021
…egation queries, fix dictionaries behavior

Signed-off-by: Eugene Klimov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants