Cassandra driver was not able to connect to 127.0.0.1: ResponseError: unconfigured table schema_keyspaces

1,537 views
Skip to first unread message

John Seen

unread,
Feb 4, 2016, 7:56:33 AM2/4/16
to DataStax Node.js Driver for Apache Cassandra Mailing List
Hi guys, I have an nodejs application which queries data from cassandra db. It the killr-service-master example.
On running the application I get this error,

Cassandra driver was not able to connect to 127.0.0.1: ResponseError: unconfigured table schema_keyspaces
App listening at http://localhost:8080

I'm using DataStax-DDC cassandra
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.2.1 | CQL spec 3.4.0 | Native protocol v4]

PFA of the node application. Kindly run install npm before running the app
Kindly suggest a solution.


Thanks
killr-service-master.zip

Jorge Bay Gondra

unread,
Feb 4, 2016, 8:58:03 AM2/4/16
to nodejs-dr...@lists.datastax.com
Hi,
You should use nodejs driver 3.0 that supports Cassandra 3.x.

I will update the sample project to set the driver dependency to 3.0

Thanks,
Jorge 

--
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-u...@lists.datastax.com.

John Seen

unread,
Feb 7, 2016, 11:54:21 PM2/7/16
to DataStax Node.js Driver for Apache Cassandra Mailing List
Hi.

Thank you of quick reply. After the driver change it worked.
I have one last query,
I have an CQL query such as, select * from testing where salary < ? and salary > ? allow filtering;
I think I have an issue in my repository code, kindly correct me if possible,


In server.js my code is,
app.get('/v1/details/sal1/:sal1/sal2/:sal2', function (req, res, next) {
  repository.salary(req.params.sal1,req.params.sal2,function (err, sal) {
    if (err) return next(err);
    res.json(sal);
  });
});


In repository.js my code is,
Repository.prototype.salary = function (sal1,sal2, callback) {
  var query = cql.salary;
  this.client.execute(query,[sal1],[sal2], { prepare: true }, function (err, result) {
    if (err) return callback(err);
    callback(null, result.rows);
  });
};




Thanks.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-user+unsub...@lists.datastax.com.

Jorge Bay Gondra

unread,
Feb 8, 2016, 4:18:47 AM2/8/16
to nodejs-dr...@lists.datastax.com
Repository.prototype.salary = function (sal1,sal2, callback) {
  var query = cql.salary;
  this.client.execute(query, [sal1, sal2], { prepare: true }, function (err, result) {

    if (err) return callback(err);
    callback(null, result.rows);
  });
};

Jorge

To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-u...@lists.datastax.com.

--
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-u...@lists.datastax.com.

John Seen

unread,
Feb 8, 2016, 4:52:38 AM2/8/16
to DataStax Node.js Driver for Apache Cassandra Mailing List
Thank you so much Jorge, it worked.
I have used  [sal1, sal2] before posting the question, but I got an error, might have been  due to something else.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-user+unsub...@lists.datastax.com.

--
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-user+unsub...@lists.datastax.com.

Reply all
Reply to author
Forward
0 new messages