Cassandra Node issue for query using timestamp

Hello nodered community,

I am creating mDashboards to display historical events in my system. My database is a Cassandra database, so i am using the Cassandra Node.
Unfortunately, my requests are not working when i am trying to retrieve data in the past.
In my flow i am formatting my request and sending my request to Cassandra node.

Error seems be about buffer length at Cassandra level but i did find interesting information on the net about it.

Below is my traces:

3 Apr 11:40:03 - [info] [function:convert UNIXtime to startDate ] 1585309203485

3 Apr 11:40:03 - [info] [function:convert UNIXtime to startDate ] Fri Mar 27 2020 11:40:03 GMT+0000 (UTC)

3 Apr 11:40:03 - [info] [function:convert UNIXtime to startDate ] 2020

3 Apr 11:40:03 - [info] [function:data extraction] select tagdataid, timestamp, assetidentifier, batterylevel, temperature, energy, humidity, power, pressure, profilename, tagidentifier from lbs.tagdatatable where assetidentifier='tousSensors' and timestamp>='2020-3-27 0:0:0.0' and timestamp<='2020-4-1 23:59:59.999' allow filtering;

3 Apr 11:40:03 - [info] [cassandra:b1d642fe.1031c] Executing CQL query:
3 Apr 11:40:03 - [info] [function:convert UNIXtime to endDate ] 1585914003485
3 Apr 11:40:03 - [info] [function:convert UNIXtime to endDate ] Fri Apr 03 2020 11:40:03 GMT+0000 (UTC)
3 Apr 11:40:03 - [info] [function:convert UNIXtime to endDate ] 2020
3 Apr 11:40:03 - [info] [function:data extraction] select tagdataid, timestamp, assetidentifier, batterylevel, temperature, energy, humidity, power, pressure, profilename, tagidentifier from lbs.tagdatatable where assetidentifier='tousSensors' and timestamp>='2020-3-27 0:0:0.0' and timestamp<='2020-4-3 23:59:59.999' allow filtering;
3 Apr 11:40:03 - [info] [cassandra:b1d642fe.1031c] Executing CQL query:
3 Apr 11:40:05 - [red] Uncaught Exception:
3 Apr 11:40:05 - RangeError: Trying to access beyond buffer length
at FrameReader.checkOffset (/usr/src/node-red/node_modules/cassandra-driver/lib/readers.js:119:15)
at FrameReader.readString (/usr/src/node-red/node_modules/cassandra-driver/lib/readers.js:107:8)
at FrameReader.readError (/usr/src/node-red/node_modules/cassandra-driver/lib/readers.js:315:22)
at Parser.parseBody (/usr/src/node-red/node_modules/cassandra-driver/lib/streams.js:180:66)
at Parser._transform (/usr/src/node-red/node_modules/cassandra-driver/lib/streams.js:135:10)
at Parser.Transform._read (_stream_transform.js:186:10)
at Parser.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:396:12)
at writeOrBuffer (_stream_writable.js:382:5)
at Parser.Writable.write (_stream_writable.js:290:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-red-docker@1.0.0 start: node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-red-docker@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

If someone is able to help me to understand this issue and to fix it, thank you in advance.

That looks like a bug in that Cassandra node. I would looks at the node’s project page to see if there are any known issues, and if not raise one.

Thanks a lot dceejay for your prompt answer.
Waiting for the results of your investigations

I am not investigating :slight_smile:

Sorry, i did not correctly understand your first answer :slight_smile:
Could you just tell me where i could find the project page of the cassandra node please (i am a newbee on NodeRed)

follow the links to github for whichever one you installed as there are two - https://flows.nodered.org/search?term=cassandra

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.