Topic on Talk:RESTBase/Installation

using Amazon Keyspaces (Cassandra)

3
Andy Kent Jr (talkcontribs)

I can't get RESTBase to work using Amazon Keyspaces, I think I have followed the AWS instructions correctly but don't see why it is not working.


I think the following should be correct? (rest of the yaml file should be correct as it works with sqlite)


   /table:

     x-modules:

       - name: restbase-mod-table-cassandra

         version: 1.0.0

         type: npm

         options:

           conf:

             hosts: [cassandra.us-east-1.amazonaws.com]

             keyspace: myAWSkeyspace

             username: myAWSkeyspaceUsername

             password: myAWSkeyspacePassword

             localDc: us-east-1

             datacenters:

               - us-east-1

             tls:

               ca:

                 - /path/to/cert/AmazonRootCA1.pem

             storage_groups:

               - name: default.group.local

                 domains: /./

Andy Kent Jr (talkcontribs)

if I try to debug this is what I get, I can't figure out this options.log is not a function error. It doesn't error out if I comment


options.log(level, {

message,

info

});


in file /path/to/restbase/node_modules/restbase-mod-table-cassandra/lib/index.js, line 107.


Is that something I need to configure to the yaml config file?!


{

"name":"restbase",

"hostname":"XXXXXX",

"pid":65032,

"level":60,

"err":{"message":"options.log is not a function",

"name":"TypeError",

"stack":"TypeError: options.log is not a function\n

   at Client.client.on (/path/to/restbase/node_modules/restbase-mod-table-cassandra/lib/index.js:107:17)\n

   at Client.emit (events.js:198:13)\n

   at Client.log (/path/to/restbase/node_modules/cassandra-driver/lib/utils.js:99:8)\n

   at Client._connectCb (/path/to/restbase/node_modules/cassandra-driver/lib/client.js:406:8)\n

   at handlerWrapper (/path/to/restbase/node_modules/cassandra-driver/lib/utils.js:416:13)\n

   at tryCatcher (/path/to/restbase/node_modules/bluebird/js/release/util.js:16:23)\n

   at Promise.fromNode.Promise.fromCallback (/path/to/restbase/node_modules/bluebird/js/release/promise.js:209:30)\n

   at Client.promiseWrapper (/path/to/restbase/node_modules/cassandra-driver/lib/utils.js:415:10)\n

   at Client.connect (/path/to/restbase/node_modules/cassandra-driver/lib/client.js:384:31)\n

   at makeClient (/path/to/restbase/node_modules/restbase-mod-table-cassandra/lib/index.js:113:19)\n

   at RBCassandra.setup (/path/to/restbase/node_modules/restbase-mod-table-cassandra/index.js:210:16)\n

   at makeRBCassandra (/path/to/restbase/node_modules/restbase-mod-table-cassandra/index.js:226:15)\n

   at Router._loadModule (/path/to/restbase/node_modules/hyperswitch/lib/router.js:272:26)\n

   at P.each (/path/to/restbase/node_modules/hyperswitch/lib/router.js:298:25)\n

   at tryCatcher (/path/to/restbase/node_modules/bluebird/js/release/util.js:16:23)\n

   at Object.gotValue (/path/to/restbase/node_modules/bluebird/js/release/reduce.js:166:18)"},"stack":"TypeError: options.log is not a function\n

   at Client.client.on (/path/to/restbase/node_modules/restbase-mod-table-cassandra/lib/index.js:107:17)\n

   at Client.emit (events.js:198:13)\n    at Client.log (/path/to/restbase/node_modules/cassandra-driver/lib/utils.js:99:8)\n

   at Client._connectCb (/path/to/restbase/node_modules/cassandra-driver/lib/client.js:406:8)\n

   at handlerWrapper (/path/to/restbase/node_modules/cassandra-driver/lib/utils.js:416:13)\n

   at tryCatcher (/path/to/restbase/node_modules/bluebird/js/release/util.js:16:23)\n

   at Promise.fromNode.Promise.fromCallback (/path/to/restbase/node_modules/bluebird/js/release/promise.js:209:30)\n

   at Client.promiseWrapper (/path/to/restbase/node_modules/cassandra-driver/lib/utils.js:415:10)\n

   at Client.connect (/path/to/restbase/node_modules/cassandra-driver/lib/client.js:384:31)\n

   at makeClient (/path/to/restbase/node_modules/restbase-mod-table-cassandra/lib/index.js:113:19)\n

   at RBCassandra.setup (/path/to/restbase/node_modules/restbase-mod-table-cassandra/index.js:210:16)\n

   at makeRBCassandra (/path/to/restbase/node_modules/restbase-mod-table-cassandra/index.js:226:15)\n

   at Router._loadModule (/path/to/restbase/node_modules/hyperswitch/lib/router.js:272:26)\n

   at P.each (/path/to/restbase/node_modules/hyperswitch/lib/router.js:298:25)\n

   at tryCatcher (/path/to/restbase/node_modules/bluebird/js/release/util.js:16:23)\n

   at Object.gotValue (/path/to/restbase/node_modules/bluebird/js/release/reduce.js:166:18)",

"levelPath":"fatal/startup",

"msg":"Message not supplied",

"time":"2020-10-22T22:49:53.937Z",

"v":0

}

Andy Kent Jr (talkcontribs)

After lots of pain....

InvalidRequest: Error from server: code=2200 [Invalid query] message="Static column is not yet supported."

Amazon Keyspaces doesn't support Static column, and therefore it is not compatible with RESTBase.

Reply to "using Amazon Keyspaces (Cassandra)"