I'm trying to create a table in RisingWave from an existing Kafka topic, but RisingWave hangs on the CREATE
statement. I see timeout errors trying to connect to 127.0.1.1
in the log, but that address is not on my network. Here's the CREATE TABLE
statement I'm using:
CREATE TABLE t_language (
language_code varchar,
language_name varchar,
direction_code varchar,
language_format_name varchar,primary key(language_code)
)
WITH (
connector = 'kafka',
topic = 'dbz.sitetran.t_language1',
properties.bootstrap.server='172.17.0.1:9092',
scan.startup.mode='earliest',
) ROW FORMAT DEBEZIUM_JSON;
I've tried running RisingWave both with Docker and Kubernetes, and I can confirm that Kafka is working correctly since I can examine the topic with kafka-console-consumer.sh
. The Docker network is 172.17.0.0/16
, and when using Kubernetes, I used 127.0.0.1
instead of the 172
network. I'm not sure where the 127.0.1.1
address is coming from and why RisingWave is trying to connect to it.
Justin Swanhart
Asked on Jun 19, 2023
It turned out that the issue was related to the hostname of my machine being associated with the Docker interface in /etc/hosts
. The 127.0.1.1
address was coming from there. To resolve the problem, I had to update /etc/hosts
to correctly associate the hostname with the Docker interface. Additionally, I faced a usability problem because the CREATE
command would hang indefinitely, and there was no way to kill the client. I had to send a KILL signal to the client process, and after that, I couldn't recreate the source because it was stuck in a 'creating' state. Restarting RisingWave was the only solution to fix this issue.