2016-07-14 14 views
1

私はWindowsでpythonスクリプトを書いています。これはcassandra.yamlファイルを取り込み、新しい値を別の値で書き込み、そのファイルをLinuxサーバーにコピーします。カサンドラを開始するときしかし、私はLinuxサーバから、このエラーを取得します。viで見たときにCassandra有効な値にもかかわらず無効なYaml

ERROR 00:53:03 Exception encountered during startup 
org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml. Please remove properties [credentials_validity_in_ms, prepared_statements_cache_size_mb, transparent_data_encryption_options, thrift_prepared_statements_cache_size_mb, column_index_cache_size_in_kb] from your cassandra.yaml 
    at org.apache.cassandra.config.YamlConfigurationLoader$MissingPropertiesChecker.check(YamlConfigurationLoader.java:188) ~[apache-cassandra-3.0.7.jar:3.0.7] 
    at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:119) ~[apache-cassandra-3.0.7.jar:3.0.7] 

は、私がLinuxサーバにコピーされたファイルを見て、以下のことの一部です。エラーは、エラーメッセージのように無効なプロパティと関係があるか、ラインフィード文字の代わりにキャリッジリターンと関係があるのでしょうか?それとも何か完全に(必要に応じて完全なyamlファイルを投稿できますか?)

# Validity period for credentials cache. This cache is tightly coupled to^M 
# the provided PasswordAuthenticator implementation of IAuthenticator. If^M 
# another IAuthenticator implementation is configured, this cache will not^M 
# be automatically used and so the following settings will have no effect.^M 
# Please note, credentials are cached in their encrypted form, so while^M 
# activating this cache may reduce the number of queries made to the^M 
# underlying table, it may not bring a significant reduction in the^M 
# latency of individual authentication attempts.^M 
# Defaults to 2000, set to 0 to disable credentials caching.^M 
credentials_validity_in_ms: 2000^M 
^M 
# Refresh interval for credentials cache (if enabled).^M 

答えて

3

エラーはエラーのような無効な性質に関係していない メッセージが言いましたか?

はい。私はそれがあなたのpythonスクリプトを使用して追加したプロパティに関連していると思います。私はまた、いくつかの追加プロパティ(元のcassandra.yamlの一部ではありません)を追加しようとしましたが、cassandraの起動に失敗しました。私はそれはちょうどそれがキャリッジリターンの代わりに改行文字 としなければならない

cassandra.yamlでは許可されていないと思いますか?

私はそうは思わない。このエラーに関しては、のcassandra.yamlには追加プロパティを使用しないでください。

DOS/WindowsではCR-LF文字を行区切り文字として使用しますが、LinuxベースのシステムではLFのみを使用します。そのため、^ M文字がviエディタに表示されます。 dos2unixユーティリティを使用して、任意のファイルからCR文字を削除できます。

なぜこのプロパティをに追加しますか?cassandra.yamlファイル?あなたは独自のプロパティファイルを作成してそこから設定可能な値を読み取ることができます

+0

ありがとう、それはバージョンの不一致でした:私はバージョン3.7からバージョン3.0を実行していたLinuxサーバにcassandra.yamlファイルをコピーしていました。 7。 – Rdesmond

関連する問題