Skip to content

Instantly share code, notes, and snippets.

View quhar's full-sized avatar

Marcin Kucharczyk quhar

  • Santa Rosa, USA
View GitHub Profile
@quhar
quhar / output.txt
Last active January 14, 2016 02:32
$ go run test_kodirpc.go
INFO[0000] Connected to Kodi
DEBU[0000] Sending Kodi Request (response desired) request={Id:0xc208000354 Method:JSONRPC.Version Params:<nil> JsonRPC:2.0}
DEBU[0000] Received response from Kodi response.Result=map[version:map[major:6 minor:25 patch:2]]
DEBU[0000] Sending Kodi Request (response desired) request={Id:0xc20800061c Method:JSONRPC.Version Params:<nil> JsonRPC:2.0}
DEBU[0000] Received response from Kodi response.Result=map[version:map[major:6 minor:25 patch:2]]
map[version:map[major:6 minor:25 patch:2]]
INFO[0000] Disconnected from Kodi
WARN[0000] Failed encoding request for Kodi error=use of closed network connection
ERRO[0000] Reading from Kodi error=read tcp 127.0.0.1:9090: use of closed network connection
@quhar
quhar / gist:0ea75c25ac6ad674cf57
Created April 22, 2015 18:06
InfluxDB cluster panic after second node tried to join
[srvr] 2015/04/22 20:00:12 GOMAXPROCS set to 8
[srvr] 2015/04/22 20:00:12 using configuration at: /etc/opt/influxdb/influxdb.conf
[srvr] 2015/04/22 20:00:12 influxdb started, version 0.9.0-rc26, commit 5203e7f426c758b1ed9aaea164a6db5ec912caf8
[srvr] 2015/04/22 20:00:12 Cluster server listening on http://localhost:8086
[srvr] 2015/04/22 20:00:12 broker opened at /srv/influxdb/raft
[raft] 2015/04/22 20:00:12 log pending: waiting for initialization or join
[raft] 2015/04/22 20:00:12 changing term: 0 => 1
[raft] 2015/04/22 20:00:12 log state change: stopped => leader (term=1)
[raft] 2015/04/22 20:00:12 log initialize: promoted to 'leader' with cluster ID 4621620293554331269, log ID 1, term 1
[srvr] 2015/04/22 20:00:12 initialized broker: http://localhost:8086
[http] 2015/04/13 14:37:22 127.0.0.1 - - [13/Apr/2015:14:37:22 +0200] GET /ping HTTP/1.1 204 0 - InfluxDBShell/0.9.0-rc23 d4ee5fdf-e1d9-11e4-8001-000000000000 190.821µs
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x508aed]
goroutine 12267 [running]:
github.com/influxdb/influxdb.(*Server).DiagnosticsAsRows(0xc20806a200, 0x0, 0x0, 0x0)
/home/philip/build/src/github.com/influxdb/influxdb/server.go:3291 +0x1f2d
github.com/influxdb/influxdb.(*Server).executeShowDiagnosticsStatement(0xc20806a200, 0xedb308, 0x0, 0x0)
/home/philip/build/src/github.com/influxdb/influxdb/server.go:2846 +0x78
github.com/influxdb/influxdb.func·039()
[http] 2015/04/13 14:22:45 127.0.0.1 - - [13/Apr/2015:14:22:45 +0200] GET /query?db=&q=select+%2A+from+traffic+where+router%3D%277%27+and+if_id%3D%27130%27 HTTP/1.1 500 124 - InfluxDBShell/0.9.0-rc23 ca5fd409-e1d7-11e4-8760-000000000000 2.195884ms
panic: distributed queries not implemented yet and there are too many shards in this group
goroutine 54077 [running]:
github.com/influxdb/influxdb.(*tx).CreateMapReduceJobs(0xc286c71740, 0xc262502480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/philip/build/src/github.com/influxdb/influxdb/tx.go:144 +0x13be
github.com/influxdb/influxdb/influxql.(*Planner).Plan(0xc286d37e40, 0xc262502480, 0x2710, 0x7f9651807618, 0x0, 0x0)
/home/philip/build/src/github.com/influxdb/influxdb/influxql/engine.go:710 +0x319
github.com/influxdb/influxdb.(*Server).planSelectStatement(0xc20806ab00, 0xc262502480, 0x2710, 0x0, 0x0, 0x0)
/home/philip/build/src/github.com/influxdb/influxdb/server.go:2418 +0x14a
On the server which computes continuous query my results look OK:
Raw data:
observer> select in_bps,out_bps from raw_iface_traffic_7_129 where time > now() - 4h
┌───────────────────┬─────────────────┬────────────┬───────────┐
│ time │ sequence_number │ in_bps │ out_bps │
├───────────────────┼─────────────────┼────────────┼───────────┤
│ 14/11/14 12:48:41 │ 98916810001 │ 3520644592 │ 494178608 │
│ 14/11/14 12:43:43 │ 98210180001 │ 3424844352 │ 449137576 │
@quhar
quhar / gist:57c992bb56f4d380bc3a
Last active August 29, 2015 14:08
Duplicated data return with fill(0) is used across more than 1 shard
With fill(0)
observer> select mean(in_bps),mean(out_bps) from raw_iface_traffic_7_129 where time > now() -1d group by time(5m) fill(0)
┌───────────────────┬────────────┬───────────┐
│ time │ mean │ mean │
├───────────────────┼────────────┼───────────┤
│ 30/10/14 12:05:00 │ 0 │ 0 │
│ 30/10/14 12:00:00 │ 3595683648 │ 438085744 │
│ 30/10/14 11:55:00 │ 3633272480 │ 457847408 │
│ 30/10/14 11:50:00 │ 3881016512 │ 480500408 │
│ 30/10/14 11:45:00 │ 3967888632 │ 443641936 │
# Welcome to the InfluxDB configuration file.
# If hostname (on the OS) doesn't return a name that can be resolved by the other
# systems in the cluster, you'll have to set the hostname to an IP or something
# that can be resolved here.
# hostname = ""
bind-address = "0.0.0.0"
# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com
#### ES 1.0.2
$ time python test_es_percolate.py
No handlers could be found for logger "elasticsearch"
Indexed 200000 queries into precolator in 200.847337008 seconds
After 100 of tests, average query time: 197.14
real 3m44.541s
user 1m37.580s
sys 0m12.504s