Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Kafka Configuration in Unreal Engine for Digital Twin Project #8

Open
ramonunibz opened this issue Apr 1, 2024 · 2 comments

Comments

@ramonunibz
Copy link

I am new to Unreal Engine and currently working on a digital twin project where I am using Kafka to log telemetry data messages. I have copied a blueprint for a Kafka consumer, but I am encountering some issues with the configuration.

image

Here are my questions:

Enable SSL Certification: What should I put under "Enable SSL Certification" in the Kafka consumer blueprint? Is it a boolean value or the path to the truststore.pem where I have saved my keys? Also where do i have to put this normally?

Additional Configuration: I need to configure some other parameters similar to what I have done in my Java application. Here is the configuration from my Java application:

final String bootstrapServers;
final String path = "truststore.pem";
commonProps.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, path);

Optional.ofNullable(FileFormat.detect(path))
    .ifPresent(fileFormat -> commonProps.put(SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG, fileFormat.name()));

bootstrapServers = "127.0.0.1:9094";
commonProps.put(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
commonProps.put(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, "");
commonProps.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, SecurityProtocol.SASL_SSL.name);
commonProps.put(SaslConfigs.SASL_MECHANISM, ScramMechanism.SCRAM_SHA_512.mechanismName());
commonProps.put(
    SaslConfigs.SASL_JAAS_CONFIG,
    scramJaasConfig("hono", "hono-secret"));

Could you please guide me on how to configure these parameters in the Kafka consumer blueprint in Unreal Engine?

Thank you in advance for your assistance!

@sha3sha3
Copy link
Owner

sha3sha3 commented Apr 2, 2024

Hey @ramonunibz
What type of auth your are using.
Are you for instance using Confluent or a locally hosted version.

@ramonunibz
Copy link
Author

ramonunibz commented Apr 2, 2024

About the auth i am using this line to authenticate myself in kafka:

commonProps.put(
    SaslConfigs.SASL_JAAS_CONFIG,
    scramJaasConfig("hono", "hono-secret"));

i thought that under the username and password in the consumer i could just put "hono" and "hono-secret" accordingly.

my instance is hosted locally i believe as Hono is installed locally with Kafka as message broker (https://eclipse.dev/hono/docs/getting-started/) (https://github.com/eclipse/packages/blob/master/charts/hono/README.md).

as for now I have the following under configuration:
image
and wanted to add the rest of the configuration.

I get the following errors when starting the simulation:

LogKafka: Warning: LogKafka: KafkaConsumer[2888cfac-d5a2c44d] FAIL | [thrd:sasl_ssl://127.0.0.1:9094/bootstrap]: sasl_ssl://127.0.0.1:9094/bootstrap: SSL handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed: broker certificate could not be verified, verify that ssl.ca.location is correctly configured or root CA certificates are installed (add broker's CA certificate to the Windows Root certificate store) (after 83ms in state SSL_HANDSHAKE)
LogKafka: Warning: LogKafka: KafkaConsumer[2888cfac-d5a2c44d] FAIL | [thrd:sasl_ssl://127.0.0.1:9094/bootstrap]: sasl_ssl://127.0.0.1:9094/bootstrap: SSL handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed: broker certificate could not be verified, verify that ssl.ca.location is correctly configured or root CA certificates are installed (add broker's CA certificate to the Windows Root certificate store) (after 45ms in state SSL_HANDSHAKE, 1 identical error(s) suppressed)
LogKafkaException: Error: LogKafkaException: Local: Timed out [-185] | subscribe() timed out!

Note that i have the CA certificates in the truststore.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants