cassandra在连接sails.js时抛出错误

ecbunoof  于 2021-06-15  发布在  Cassandra
关注(0)|答案(1)|浏览(446)

我们在两个不同的服务器上安装了cassandra和sails.js。我已经在sails.js中安装了sails cassandra包,并用cassandra的ip地址进行了设置。

connections: {
    someCassandraServer: {
      contactPoints: ["X.X.X.X"],
      user: 'cassandra', //optional
      password: 'cassandra', //optional
      keyspace: 'testkeyspace'
    }
  },

我们想逃跑 sails lift 但是得到下面的错误代码:
信息:正在启动应用程序。。。
/doowdle/backend/node\u modules/cassandra store/lib/cassandrastore.js:45抛出错误;^错误:尝试查询的所有主机都失败。尝试的第一个主机,x.x.x.x:9042:错误:connect econnrefused x.x.x:9042。请参见内部错误。
我在cassandra.yaml文件中遗漏了什么吗?
当我跑的时候 ./cassandra ,我得到以下输出:

owner@STS-YYC-UBUNTU:/etc/apache-cassandra-2.2.12/bin$ ./cassandra 
owner@STS-YYC-UBUNTU:/etc/apache-cassandra-2.2.12/bin$ 
CompilerOracle: inline org/apache/cassandra/db/AbstractNativeCell.compareTo (Lorg/apache/cassandra/db/composites/Composite;)I 
CompilerOracle: inline org/apache/cassandra/db/composites/AbstractSimpleCellNameType.compareUnsigned (Lorg/apache/cassandra/db/composites/Composite;Lorg/apache/cassandra/db/composites/Composite;)I 
CompilerOracle: inline org/apache/cassandra/io/util/Memory.checkBounds (JJ)V 
CompilerOracle: inline org/apache/cassandra/io/util/SafeMemory.checkBounds (JJ)V 
CompilerOracle: inline org/apache/cassandra/utils/AsymmetricOrdering.selectBoundary (Lorg/apache/cassandra/utils/AsymmetricOrdering/Op;II)I 
CompilerOracle: inline org/apache/cassandra/utils/AsymmetricOrdering.strictnessOfLessThan (Lorg/apache/cassandra/utils/AsymmetricOrdering/Op;)I 
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare (Ljava/nio/ByteBuffer;[B)I 
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare ([BLjava/nio/ByteBuffer;)I 
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compareUnsigned (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I 
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/lang/Object;JI)I 
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/nio/ByteBuffer;)I 
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I 
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml. 
Please remove properties [credentials_validity_in_ms, enable_scripted_user_defined_functions, column_index_cache_size_in_kb, back_pressure_enabled, 
enable_materialized_views, cdc_enabled, prepared_statements_cache_size_mb, back_pressure_strategy, concurrent_materialized_view_writes, 
transparent_data_encryption_options, thrift_prepared_statements_cache_size_mb, slow_query_log_timeout_in_ms, hints_flush_period_in_ms, 
max_hints_file_size_in_mb] from your cassandra.yaml org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml. 
Please remove properties [credentials_validity_in_ms, enable_scripted_user_defined_functions, column_index_cache_size_in_kb, back_pressure_enabled, 
enable_materialized_views, cdc_enabled, prepared_statements_cache_size_mb, back_pressure_strategy, concurrent_materialized_view_writes, 
transparent_data_encryption_options, thrift_prepared_statements_cache_size_mb, slow_query_log_timeout_in_ms, hints_flush_period_in_ms, 
max_hints_file_size_in_mb] from your cassandra.yaml 
at org.apache.cassandra.config.YamlConfigurationLoader$MissingPropertiesChecker.check(YamlConfigurationLoader.java:146) 
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:113) 
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:85) 
at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:149) 
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:133) 
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:507) 
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:642) 
ERROR 03:26:04 Exception encountered during startup org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml. 
Please remove properties [credentials_validity_in_ms, enable_scripted_user_defined_functions, column_index_cache_size_in_kb, back_pressure_enabled, 
enable_materialized_views, cdc_enabled, prepared_statements_cache_size_mb, back_pressure_strategy, concurrent_materialized_view_writes, 
transparent_data_encryption_options, thrift_prepared_statements_cache_size_mb, slow_query_log_timeout_in_ms, hints_flush_period_in_ms, 
max_hints_file_size_in_mb] from your cassandra.yaml 
at org.apache.cassandra.config.YamlConfigurationLoader$MissingPropertiesChecker.check(YamlConfigurationLoader.java:146) ~[apache-cassandra-2.2.12.jar:2.2.12] 
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:113) ~[apache-cassandra-2.2.12.jar:2.2.12] 
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:85) ~[apache-cassandra-2.2.12.jar:2.2.12] 
at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:149) ~[apache-cassandra-2.2.12.jar:2.2.12] 
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:133) ~[apache-cassandra-2.2.12.jar:2.2.12] 
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:507) [apache-cassandra-2.2.12.jar:2.2.12] 
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:642) [apache-cassandra-2.2.12.jar:2.2.12]

你知道吗?

esyap4oy

esyap4oy1#

看起来你用的是 cassandra.yaml 从较新版本的cassandra,或者在配置它时出错。请参见消息:
无效的yaml。请删除属性:[凭据\u有效性\u在\u毫秒内,启用\u脚本\u用户定义的\u函数,列\u索引\u缓存\u大小\u kb,后压力\u启用,启用物化\u视图,cdc \u启用,准备的\u语句\u缓存大小\u mb,后压力\u策略,并发物化\u视图\u写入,透明\u数据\u加密\u选项,节俭\u准备的\u语句\u缓存\u大小\u mb,慢速\u查询\u日志\u超时\u毫秒,提示\u刷新周期\u毫秒,最大\u提示\u文件大小\u mb]
我建议盘点一下 cassandra.yaml 从您的发行版(cassandra 2.2.12),只修改必要的参数- cluster_name , listen_address ,然后重新启动Cassandra。
或者使用最新的cassandra(3.11.3)。
p、 我刚查了一下 back_pressure_enabled 是在3.10年才引进的。。。

相关问题