influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

[0.9.6.1] ERR: unexpected end of JSON input on distributed aggregative query.

Open just2d opened this issue 10 years ago • 7 comments

version:0.9.6.1 release

3 raft servers 1 data server.

select * from accessdb._5w_rp.key_access_per_30m where time >= 1451379388000000000 and time <= 1451901436000000000 and u_key = 'f0f577c0b97d416f142fed74e8bbd3d7';
name: key_access_per_30m
------------------------
time            sum u_key                   u_uri
1451566800000000000 50  f0f577c0b97d416f142fed74e8bbd3d7    /v3/distance
1451566800000000000 48  f0f577c0b97d416f142fed74e8bbd3d7    /v3/assistant/intention
1451566800000000000 50  f0f577c0b97d416f142fed74e8bbd3d7    /v3/place/text
1451566800000000000 50  f0f577c0b97d416f142fed74e8bbd3d7    /v3/place/polygon

but the following query fails everytime.

select sum(sum) from accessdb._5w_rp.key_access_per_30m where time >= 1451379388000000000 and time <= 1451901436000000000 and u_key = 'f0f577c0b97d416f142fed74e8bbd3d7';
ERR: unexpected end of JSON input

any quick solutions to get cluster work properly? because this cluster is about to be on production. is this the db's data too big or the cluster problem? Is there a parameter can optimize this?

If this is the cluster's problem, I can use single server, but can I switch to cluster some days later when 0.10 come out without no data lost? Thanks.

just2d avatar Jan 05 '16 04:01 just2d

temporarily, it works.

select sum(sum) from accessdb._5w_rp.key_access_per_30m where time >= 1451379388000000000 and time <= 1451901436000000000 and u_key = 'f0f577c0b97d416f142fed74e8bbd3d7';
name: key_access_per_30m
------------------------
time            sum
1451379388000000000 198

and failed again.

select sum(sum) from accessdb._5w_rp.key_access_per_30m where time >= 1451379388000000000 and time <= 1451901436000000000 and u_key = 'f0f577c0b97d416f142fed74e8bbd3d7';
ERR: unexpected end of JSON input

the result is really unpredictable: I don't choose db, it can give the result,and then failed,and asks me to "use db".

> select sum(sum) from accessdb._5w_rp.key_access_per_30m where time >= 1451379388000000000 and time <= 1451901436000000000 and u_key = 'f0f577c0b97d416f142fed74e8bbd3d7';
name: key_access_per_30m
------------------------
time            sum
1451379388000000000 198

> select sum(sum) from accessdb._5w_rp.key_access_per_30m where time >= 1451379388000000000 and time <= 1451901436000000000 and u_key = 'f0f577c0b97d416f142fed74e8bbd3d7';
ERR: unexpected end of JSON input
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use <database>".

just2d avatar Jan 05 '16 07:01 just2d

@just2d sum is a reserved keyword in InfluxQL, since it is the name of a function. It appears that in the single-node environment the parser properly handles it in this case, but it is possible that when the query is decomposed for distribution to the other nodes it causes syntax issues.

What happens in the cluster if you issue the query as select sum("sum") from accessdb._5w_rp.key_access_per_30m where ...

beckettsean avatar Jan 05 '16 19:01 beckettsean

I think there's a bug using CQ on cluster mode. Try setting your replication count on retention policy exactly same as number of cluster nodes.

seyoonhan avatar Jan 06 '16 02:01 seyoonhan

@beckettsean it doesn't help using sum("sum"):

> show servers;
id  cluster_addr        raft    raft-leader
1   10.178.96.65:8088   true    true
2   10.180.17.150:8088  true    false
3   10.180.21.243:8088  true    false
4   10.180.25.46:8088   false   false

> select sum("sum") from accessdb._5w_rp.key_access_per_30m where time >= 1451379388000000000 and time <= 1451901436000000000 and u_key = 'f0f577c0b97d416f142fed74e8bbd3d7';
ERR: unexpected end of JSON input

just2d avatar Jan 06 '16 03:01 just2d

@seyoonhan thanks for the tips. are you sure it's about the replication count? I do has the replication count 3,not the all of the 4 nodes. I don't wanna take the risk to test online. I'll set it to single node till the cluster can really work.

just2d avatar Jan 06 '16 03:01 just2d

@just2d Yes, I had same problem and solved it as described. There are problems running CQ on cluster, obviously.

seyoonhan avatar Jan 06 '16 05:01 seyoonhan

Closing this as clustering is no longer supported in the open source version.

jsternberg avatar May 18 '16 02:05 jsternberg