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

executeBatch error #105

Open
somecallmemike opened this issue Aug 7, 2014 · 2 comments
Open

executeBatch error #105

somecallmemike opened this issue Aug 7, 2014 · 2 comments

Comments

@somecallmemike
Copy link

I am trying to update using six insert statements, like so:

[ { query: 'INSERT INTO accounting_user (username, timestamp, usertype, statustype, delaytime, inputoctets, outputoctets, sessionid, sessiontime, terminatecause, nasidentifier, nasport, framedip, callingstationid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
params:
[ 'user1',
'd20ec080-23ae-11e2-9318-273e7e437743',
'broadband',
'Start',
0,
0,
0,
'8312ff770d162c9777a71af111e1ec44',
21600,
'User-Request',
'1.1.1.1',
37297,
'2.2.2.2',
'00:1d:7d:a1' ] },
{ query: 'INSERT INTO accounting_ip (username, timestamp, usertype, statustype, delaytime, inputoctets, outputoctets, sessionid, sessiontime, terminatecause, nasidentifier, nasport, framedip, callingstationid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
params:
[ 'user1',
'd20ec080-23ae-11e2-9318-273e7e437743',
'broadband',
'Start',
0,
0,
0,
'8312ff770d162c9777a71af111e1ec44',
21600,
'User-Request',
'1.1.1.1',
37297,
'2.2.2.2',
'00:1d:7d:a1' ] },
{ query: 'INSERT INTO accounting_session (username, timestamp, usertype, statustype, delaytime, inputoctets, outputoctets, sessionid, sessiontime, terminatecause, nasidentifier, nasport, framedip, callingstationid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
params:
[ 'user1',
'd20ec080-23ae-11e2-9318-273e7e437743',
'broadband',
'Start',
0,
0,
0,
'8312ff770d162c9777a71af111e1ec44',
21600,
'User-Request',
'1.1.1.1',
37297,
'2.2.2.2',
'00:1d:7d:a1' ] },
{ query: 'INSERT INTO accounting_user (username, timestamp, usertype, statustype, delaytime, inputoctets, outputoctets, sessionid, sessiontime, terminatecause, nasidentifier, nasport, framedip, callingstationid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
params:
[ 'user1',
'1ca93080-23e1-11e2-9318-273e7e437743',
'broadband',
'Stop',
0,
0,
0,
'8312ff770d162c9777a71af111e1ec44',
21600,
'User-Request',
'1.1.1.1',
37297,
'2.2.2.2',
'00:1d:7d:a1' ] },
{ query: 'INSERT INTO accounting_ip (username, timestamp, usertype, statustype, delaytime, inputoctets, outputoctets, sessionid, sessiontime, terminatecause, nasidentifier, nasport, framedip, callingstationid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
params:
[ 'user1',
'1ca93080-23e1-11e2-9318-273e7e437743',
'broadband',
'Stop',
0,
0,
0,
'8312ff770d162c9777a71af111e1ec44',
21600,
'User-Request',
'1.1.1.1',
37297,
'2.2.2.2',
'00:1d:7d:a1' ] },
{ query: 'INSERT INTO accounting_session (username, timestamp, usertype, statustype, delaytime, inputoctets, outputoctets, sessionid, sessiontime, terminatecause, nasidentifier, nasport, framedip, callingstationid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
params:
[ 'user1',
'1ca93080-23e1-11e2-9318-273e7e437743',
'broadband',
'Stop',
0,
0,
0,
'8312ff770d162c9777a71af111e1ec44',
21600,
'User-Request',
'1.1.1.1',
37297,
'2.2.2.2',
'00:1d:7d:a1' ] } ]

And getting back the following error:

{ name: 'ResponseError',
message: 'Expected 8 or 0 byte long (4)',
info: 'Represents a error message from the server',
code: 8704,
isServerUnhealthy: false }

Not sure what this error is referring to?

@srlm-io
Copy link

srlm-io commented Aug 7, 2014

First, try reducing the number of queries to one so that you can isolate the particular query this is a problem.

Then try using hints to specify the target data type:

https://github.com/jorgebay/node-cassandra-cql#how-can-specify-the-target-data-type-of-a-query-parameter

@advait
Copy link

advait commented Sep 8, 2014

@somecallmemike I've seen similar issues when I (accidentally) attempted to write strings into bigint columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants