Closed tsailiming closed 9 years ago
@otoolep looks like leader election is failing immediately?
@tsailiming Please give the exact writes and queries for "Upon startup, access the web browser and issue a query. This started happening after simple insert, drop measurement, insert and queries." The panic alone is insufficient to determine what is happening.
Is this a single node cluster?
Possibly @beckettsean, @jwilder
I am seeing multiple issues with this trace, I am hopeful https://github.com/influxdb/influxdb/pull/3646 will fix it.
Leader election can take a little time to stabilize at startup. It looks like when it started up and replayed the log, it became leader, lost leadership and then regain it. The panic shows it was the leader when this happened as well. I think #3646 should fix this.
Believe fixed by #3646, please let us know if you see the issue with the next nightly build or 0.9.3.
This was a straight forward single node test. Had issues from stable 0.9.2 before trying the nightly build.
Steps were:
I was debugging my code and were inserting only about 10 records of various forms.
{ "deviceidentifier" : "00137a000001f3e6", "sensoridentifier" : "01_ILLUMINANCEMEASURE_S", "data" : "12345", "datatype" : "0x21", "protocolid" : "1", "time" : 1439567564 }
{ "deviceidentifier" : "00137a000001f3e6", "sensoridentifier" : "01_ILLUMINANCEMEASURE_S", "data" : "12345", "datatype" : "0x21", "protocolid" : "1", "timestamp" : 1439567564 }
{"FOO": 1234}
{"FOO": 4}
{"FOO: 4, "deviceidentifier": "device", "sensoridentifier":"sensor"}
{"FOO": 4, "deviceidentifier": "device", "sensoridentifier":"sensor"}
{"FOO": 5, "deviceidentifier": "device", "sensoridentifier":"sensor", "time":1439570628}
{"FOO": 6, "deviceidentifier": "device", "sensoridentifier":"sensor", "time":1439570638}
{"FOO": 7, "deviceidentifier": "device", "sensoridentifier":"sensor"}
{"FOO": 8, "deviceidentifier": "device", "sensoridentifier":"sensor", "time":1439570638}
{"FOO": 9, "deviceidentifier": "device", "sensoridentifier":"sensor", "time":"1439570638"}
I was also testing the retention policy of 1h.
The exact query was select * from ".broker.pub.1.00137a000001f3e6.01_ILLUMINANCEMEASURE_S"
Will test the next build with fixed #3646.
Thanks!
@tsailiming the JSON write protocol is deprecated and will be removed in an upcoming release. Please transition your writes to the line protocol: https://influxdb.com/docs/v0.9/write_protocols/line.html, https://influxdb.com/docs/v0.9/write_protocols/write_syntax.html.
Performance issues related to the JSON protocol are not something we will investigate since it is due for deletion soon.
@tsailiming in addition, your query looks very strange. That's more of an 0.8 measurement name than an 0.9 measurement name, and it doesn't match up with your sample writes at all.
Forgot to add that I was using a combination of MQTT and Fluentd with the InfluxDB plugin. The json structure was MQTT messages.
The InfluxDB plugin uses the ruby library and creates the measurement based on the Fluentd tag/mqtt topic name.
Here's a sample query using the python library:
>>> pprint.pprint(list(conn.query('select * from ".broker.pub.1.00137a000001f3e6.01_ILLUMINANCEMEASURE_S"')))
[[{u'FOO': None,
u'data': u'12345',
u'datatype': u'0x21',
u'protocolid': u'1',
u'time': u'2015-08-14T15:52:44Z'},
{u'FOO': None,
u'data': u'999',
u'datatype': u'0x21',
u'protocolid': u'1',
u'time': u'2015-08-14T16:43:58Z'}],
[{u'FOO': 5,
u'data': None,
u'datatype': None,
u'protocolid': None,
u'time': u'2015-08-14T16:43:48Z'},
{u'FOO': 9,
u'data': None,
u'datatype': None,
u'protocolid': None,
u'time': u'2015-08-14T16:43:58Z'},
{u'FOO': 6,
u'data': None,
u'datatype': None,
u'protocolid': None,
u'time': u'2015-08-14T16:43:58Z'},
{u'FOO': 7,
u'data': None,
u'datatype': None,
u'protocolid': None,
u'time': u'2015-08-14T16:50:11Z'}]]
>>> pprint.pprint(list(conn.query('select * from ".broker.pub.1.00137a000001f3e6.01_ILLUMINANCEMEASURE_S"')))
[[{u'data': u'11',
u'datatype': u'0x21',
u'protocolid': u'1',
u'time': u'2015-08-14T16:43:58Z'},
{u'data': u'12',
u'datatype': u'0x21',
u'protocolid': u'1',
u'time': u'2015-08-14T16:44:08Z'},
{u'data': u'13',
u'datatype': u'0x21',
u'protocolid': u'1',
u'time': u'2015-08-14T16:44:18Z'}]]
I installed the latest nightly build version 0.9.3-nightly-c2dbf16
and now I can perform the queries.
Great, thanks for the update.
On Saturday, August 15, 2015, Tsai Li Ming notifications@github.com wrote:
I installed the latest nightly build version 0.9.3-nightly-c2dbf16 and now I can perform the queries.
— Reply to this email directly or view it on GitHub https://github.com/influxdb/influxdb/issues/3664#issuecomment-131474364.
Same as 0.9.2, thus updated to nightly build to test.
Upon startup, access the web browser and issue a query. This started happening after simple insert, drop measurement, insert and queries.