How to resolve Cassandra sink issues with RW 1.5.4 and Cassandra 4.1.3?
I'm having issues with the Cassandra sink using RW 1.5.4 and Cassandra 4.1.3. I've confirmed that RW can access the Cassandra cluster as it has validated the table before, but I'm encountering errors. The meta node throws a WARN
about a ConnectionInitException
and a StacklessClosedChannelException
. Additionally, I get an InvalidKeyspaceException
followed by a Sink error: Remote sink error: end of response stream
after creating the keyspace and table. Here's the SQL for the sink and table creation:
CREATE SINK IF NOT EXISTS prices_cassandra_sink FROM prices
WITH (
connector='cassandra',
type='upsert',
cassandra.url = 'cassandra-pricing-pricing-dc1-service.core-prd.svc.cluster.local:9042',
cassandra.keyspace = 'pricing',
cassandra.table = 'prices',
cassandra.datacenter = 'pricing-dc1',
primary_key = 'compno,pricelist,partno,valid_from'
);
create keyspace pricing WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;
CREATE TABLE prices (
compno int,
pricelist text,
partno text,
valid_from timestamp,
price double,
class1 text,
class2 text,
class3 text,
class4 text,
class5 text,
class6 text,
czclass7 text,
czclass8 text,
comppriceind boolean,
killdate timestamp,
parttype1 text,
parttype2 text,
parttype_name text,
partkit text,
PRIMARY KEY((compno, pricelist), partno, valid_from));
I've also provided the describe prices;
output. Any idea on how to resolve these issues?
André Falk
Asked on Jan 04, 2024
It seems like there are multiple issues at play here. First, the ConnectionInitException
and StacklessClosedChannelException
suggest there might be a connectivity problem between RW and the Cassandra cluster. Ensure that the network configuration allows for proper communication and that the Cassandra cluster is running and accessible.
The InvalidKeyspaceException
indicates that the keyspace did not exist when the sink tried to connect. Since you mentioned creating the keyspace afterward, this should no longer be an issue.
For the Sink error: Remote sink error: end of response stream
, this could be due to a variety of reasons including configuration issues, compatibility between RW and Cassandra versions, or even a transient network issue. I recommend checking the Cassandra logs for any corresponding errors that might provide more insight.
If the cluster is not starting, that needs to be resolved first. Once the cluster is up and running, verify the sink configuration, especially the URL and datacenter settings, and ensure they match the Cassandra setup. If the problem persists, consider reaching out to the RW or Cassandra community forums for more targeted assistance.