cassandra データベースでループバック 3 フレームワークを使用してモデルからテーブルを自動作成しようとしていますが、データソースを cassandra datasource.json に接続する際に問題が発生しています
"cassandraConn": {
"host": "192.168.4.21",
"port": 9042,
"database": "emsv2_testing",
"password": "",
"name": "cassandraConn",
"user": "",
"connectTimeout": 30000,
"readTimeout": 30000,
"connector": "cassandra"
}
モデル json ファイル:-
{
"name": "data_rt_raw_t1",
"plural": "data_rt_raw_t1s",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"c_id": {
"type": "string",
"required": true,
"default": null
},
"slave_id": {
"type": "string",
"required": false,
"default": null
},
"dcu_id": {
"type": "string",
"required": false,
"default": null
},
"mfm_read_time": {
"type": "date",
"required": true,
"default": null
},
"data_store_time": {
"type": "date",
"required": false,
"default": null
},
"p1": {
"type": "number",
"required": false,
"default": null
},
"p2": {
"type": "number",
"required": false,
"default": null
},
"p3": {
"type": "number",
"required": false,
"default": null
},
"p4": {
"type": "number",
"required": false,
"default": null
},
"p5": {
"type": "number",
"required": false,
"default": null
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}
自動移行はデータベース名「未定義」を作成し、「未定義」データベース内にテーブルを作成します。次のエラーが発生するデータを投稿しようとすると、
{
"error": {
"statusCode": 500,
"name": "NoHostAvailableError",
"message": "Connecting after shutdown is not supported",
"info": "Represents an error when a query cannot be performed because no host is available or could be reached by the driver.",
"innerErrors": null,
"stack": "NoHostAvailableError: Connecting after shutdown is not supported\n at Client._connectCb (/home/rd/enms/node_modules/cassandra-driver/lib/client.js:397:21)\n at Client.promiseWrapper (/home/rd/enms/node_modules/cassandra-driver/lib/utils.js:410:13)\n at Client.connect (/home/rd/enms/node_modules/cassandra-driver/lib/client.js:384:31)\n at Array.utils.series.next (/home/rd/enms/node_modules/cassandra-driver/lib/client.js:854:18)\n at next
この問題を解決するのを手伝ってください、ありがとう。