Closed PegasusPool closed 2 years ago
Thanks for reporting @PegasusPool. We'll try to reproduce with this exact config and get back to you.
Can you confirm that your Kafka broker is reachable at the configure location? Are you running from inside a docker container?
One possibility is that the unexpected EOF could be an issue reading from the TCP socket that connects to the broker.
From the logs I can confirm that the pipeline segment in charge of reading from Cardano node is working as expected.
Thanks for the quick response @scarmuega . I checked the connection using kafkacat and I got this:
kafkacat -b xxx:9092 -t cardano-events
% Auto-selecting Consumer mode (use -P or -C to override)
% ERROR: Failed to query metadata for topic cardano-events: Local: Broker transport failure
It seems like the issue is on the kafka config side. I'm quite new to Kafka to be honest, not sure what I missed when I setup the cluster and the topic.
I'm not running from inside a docker container.
I wanted to post this also in case this helps:
RUST_BACKTRACE=1 oura daemon
ERROR: Error(
Io(
Error {
kind: UnexpectedEof,
message: "failed to fill whole buffer",
},
),
State {
next_error: None,
backtrace: Some(
0: 0x564f62a22517 - <unknown>
1: 0x564f62a11865 - backtrace::capture::Backtrace::new::h09c254d9d81176ce
2: 0x564f62a111cc - error_chain::make_backtrace::h93194344469217d7
3: 0x564f62a11286 - <error_chain::State as core::default::Default>::default::h1f860986a1067232
4: 0x564f62a0677d - <unknown>
5: 0x564f629fb104 - kafka::client::__get_response_size::h179a659b657009fd
6: 0x564f622626ab - <unknown>
7: 0x564f6236c947 - <unknown>
8: 0x564f622aebf1 - oura::sinks::kafka::setup::<impl oura::pipelining::SinkProvider for oura::utils::WithUtils<oura::sinks::kafka::setup::Config>>::bootstrap::h0fe2c846ccb4ad1a
9: 0x564f62229d18 - <unknown>
10: 0x564f62246b2c - <unknown>
11: 0x564f622398a3 - <unknown>
12: 0x564f6223d629 - <unknown>
13: 0x564f62f1f5b1 - std::rt::lang_start_internal::h2ba92edce36c035e
14: 0x564f622488d2 - <unknown>
15: 0x7ff8c0ca20b3 - __libc_start_main
16: 0x564f621d6439 - <unknown>
17: 0x0 - <unknown>
,
),
},
)
I would revisit the topic creation procedure. It usually goes something like this:
/bin/kafka-topics.sh --create \
--zookeeper <hostname>:<port> \
--topic <topic-name> \
--partitions <number-of-partitions> \
--replication-factor <number-of-replicating-servers>
I also recommend checking out https://redpanda.com/, it's a one-binary, self-contained, zookeeper-free tool that is kafka-compatible. From my experience, it's easier to setup and manage.
Thanks for the suggestions @scarmuega
I downloaded a sample code for a client and I configured it to produce messages for my cluster and topic and it worked. The messages arrived fine in the cluster which is suggesting me that Oura should also be able to send messages.
Does this bit look all right to you?
[sink]
type = "Kafka"
brokers = ["pkc-3w22w.us-central1.gcp.confluent.cloud:9092"]
topic = "cardano-events"
One thing I had to configure in the sample app to produce messages is the api key and secret of the cluster which I'm not sure why I'm not required to provide when configuring Oura. Here is the config for the sample app that's working:
# Required connection configs for Kafka producer, consumer, and admin
bootstrap.servers=pkc-3w22w.us-central1.gcp.confluent.cloud:9092
security.protocol=SASL_SSL
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username='API_KEY_HERE' password='API_SECRET_HERE';
sasl.mechanism=PLAIN
# Required for correctness in Apache Kafka clients prior to 2.6
client.dns.lookup=use_all_dns_ips
# Best practice for higher availability in Apache Kafka clients prior to 3.0
session.timeout.ms=45000
Interestingly if I create a local kafka server Oura is able to send messages to that just fine. :thinking:
I ended up just using a local kafka server, so I'll close this issue for now. Thanks for looking into this anyway
I'm trying to setup Oura with Kafka and I got stuck. Oura version: 1.4.1 Here's my toml file:
Startup using
oura daemon
Error message:
Things work fine if I change the sink to Terminal or Stdout, it seems to be a problem with kafka. I also tried removing the filters and some source settings, but no luck.
My Kafka cluster is live and the topic is created.
When running with
RUST_LOG=debug oura daemon
the output is the following: