运行debezium-cassandra连接器时,我面临以下错误:对于CDC
sudo java -jar /home/centos/debezium-connector-cassandra-1.2.0.Beta2-jar-with-dependencies.jar /home/centos/debezium-connector-cassandra/deb_conf.properties
错误:
Exception in thread "main" org.apache.cassandra.exceptions.ConfigurationException: Error instantiating snitch class 'org.apache.cassandra.locator.GossipingPropertyFileSnitch'.
at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:596)
at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:574)
at org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:1045)
at org.apache.cassandra.config.DatabaseDescriptor.applySnitch(DatabaseDescriptor.java:969)
at org.apache.cassandra.config.DatabaseDescriptor.toolInitialization(DatabaseDescriptor.java:192)
at org.apache.cassandra.config.DatabaseDescriptor.toolInitialization(DatabaseDescriptor.java:157)
at io.debezium.connector.cassandra.CassandraConnectorContext.loadDdlFromDisk(CassandraConnectorContext.java:64)
at io.debezium.connector.cassandra.CassandraConnectorContext.<init>(CassandraConnectorContext.java:36)
at io.debezium.connector.cassandra.CassandraConnectorTask.run(CassandraConnectorTask.java:72)
at io.debezium.connector.cassandra.CassandraConnectorTask.main(CassandraConnectorTask.java:61)
Caused by: org.apache.cassandra.exceptions.ConfigurationException: DC or rack not found in snitch properties, check your configuration in: cassandra-rackdc.properties
at org.apache.cassandra.locator.GossipingPropertyFileSnitch.loadConfiguration(GossipingPropertyFileSnitch.java:76)
at org.apache.cassandra.locator.GossipingPropertyFileSnitch.<init>(GossipingPropertyFileSnitch.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:581)
... 9 more
我检查了cassandra-rackdc.properties
中是否存在/etc/cassandra/
Cassandra Version: Cassandra 3.11.6
我在cassandra.yaml
cdc_enabled: true
cdc_raw_directory: /var/lib/cassandra/cdc_raw
cdc_total_space_in_mb: 4096
cdc_free_space_check_interval_ms: 250
编辑:CASSANDRA_HOME已定义并正确。