我们正在为Cassandra和sailsjs使用2种不同的服务器。所有模块都在sailsjs中配置。我们正在尝试抬起帆,但出现以下错误代码:
信息:正在启动应用程序...
/doowdle/backend/node_modules/cassandra-store/lib/CassandraStore.js:45 抛出错误; ^ 错误:所有尝试查询的主机均失败。第一个尝试过的主机,X.X.X.X:9042:错误:连接ECONNREFUSED X.X.X.X:9042。参见innerErrors。
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$编译器Oracle:内联org / apache / cassandra / db / AbstractNativeCell.compareTo(Lorg / apache / cassandra / db / composites / Composite;) 编译器Oracle:内联org / apache / cassandra / db / composites / AbstractSimpleCellNameType.compareUnsigned(Lorg / apache / cassandra / db / composites / Composite; Lorg / apache / cassandra / db / composites / Composite;) 编译器Oracle:内联org / apache / cassandra / io / util / Memory.checkBounds(JJ)V 编译器Oracle:内联org / apache / cassandra / io / util / SafeMemory.checkBounds(JJ)V 编译器Oracle:内联org / apache / cassandra / utils / AsymmetricOrdering.selectBoundary(Lorg / apache / cassandra / utils / AsymmetricOrdering / Op; II)I 编译器Oracle:内联org / apache / cassandra / utils / AsymmetricOrdering.strictnessOfLessThan(Lorg / apache / cassandra / utils / AsymmetricOrdering / Op;)I 编译器Oracle:内联org / apache / cassandra / utils / ByteBufferUtil.compare(Ljava / nio / ByteBuffer; [B)I 编译器Oracle:内联org / apache / cassandra / utils / ByteBufferUtil.compare([BLjava / nio / ByteBuffer;)I 编译器Oracle:内联org / apache / cassandra / utils / ByteBufferUtil.compareUnsigned(Ljava / nio / ByteBuffer; Ljava / nio / ByteBuffer;) 编译器Oracle:内联org / apache / cassandra / utils / FastByteOperations $ UnsafeOperations.compareTo(Ljava / lang / Object; JILjava / lang / Object; JI)I 编译器Oracle:内联org / apache / cassandra / utils / FastByteOperations $ UnsafeOperations.compareTo(Ljava / lang / Object; JILjava / nio / ByteBuffer;) 编译器Oracle:内联org / apache / cassandra / utils / FastByteOperations $ UnsafeOperations.compareTo(Ljava / nio / ByteBuffer; Ljava / nio / ByteBuffer;) 启动期间遇到异常(org.apache.cassandra.exceptions.ConfigurationException):无效的Yaml。请删除属性[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]从您cassandra.yaml org.apache.cassandra.exceptions.ConfigurationException:无效的Yaml。请删除属性[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]从您cassandra.yaml 在org.apache.cassandra.config.YamlConfigurationLoader $ MissingPropertiesChecker.check(YamlConfigurationLoader.java:146) 在org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:113) 在org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:85) 在org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:149) 在org.apache.cassandra.config.DatabaseDescriptor。(DatabaseDescriptor.java:133) 在org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:507) 在org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:642) 错误03:26:04启动期间遇到异常 org.apache.cassandra.exceptions.ConfigurationException:无效的Yaml。请删除属性[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]从您cassandra.yaml 在org.apache.cassandra.config.YamlConfigurationLoader $ MissingPropertiesChecker.check(YamlConfigurationLoader.java:146)〜[apache-cassandra-2.2.12.jar:2.2.12] 在org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:113)〜[apache-cassandra-2.2.12.jar:2.2.12] 在org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:85)〜[apache-cassandra-2.2.12.jar:2.2.12] 在org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:149)〜[apache-cassandra-2.2.12.jar:2.2.12] 在org.apache.cassandra.config.DatabaseDescriptor。(DatabaseDescriptor.java:133)〜[apache-cassandra-2.2.12.jar:2.2.12] 在org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:507)[apache-cassandra-2.2.12.jar:2.2.12] 在org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:642)[apache-cassandra-2.2.12.jar:2.2.12]
答案 0 :(得分:1)
看起来您正在使用cassandra 3.x中的cassandra.yaml文件,并在cassandra 2.2.12上进行了安装。因此,错误消息中列出了新选项:
03:26:04启动期间遇到异常 org.apache.cassandra.exceptions.ConfigurationException:无效的Yaml。 请删除属性[ 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 ,反压力策略, concurrent_materialized_view_writes , transparent_data_encryption_options , thrift_prepared_statements_cache_size_mb , slow_query_log_timeout_in_ms ,提示_冲洗时间段_in_ms , max_hints_file_size_in_mb ]来自您的cassandra.yaml
在cassandra 2.2.12中不存在。考虑编辑2.2.12中提供的cassandra.yaml,或者可能更好,考虑升级到最新的建议版本3.11.3。