-
Notifications
You must be signed in to change notification settings - Fork 72
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
Failed to get TLS config. Continuing without TLS." error="No TLS config provided. ,cannot create a kafka writer with a nil address #84
Comments
@kusumkappdirect I suppose this is a duplicate of: |
@mostafa , I am trying to send the kafka-event , for that i created topic, create a producer, while sending i am getting this error, time="2022-06-07T07:50:34Z" level=warning msg="Failed to get TLS config. Continuing without TLS." error="No TLS config provided." 14 i need to add these security Not sure how to add Security configuration Set the following properties to configure this security model in your client security.protocol sasl.mechanism sasl.jaas.config |
@kusumkappdirect This is a bug, as I mentioned in #56. |
My configuration fille is :
export var configuration = JSON.stringify({
"producer": {
"keySerializer": "org.apache.kafka.common.serialization.StringSerializer",
"valueSerializer": "io.confluent.kafka.serializers.KafkaAvroSerializer",
},
"schemaRegistry": {
"url": __ENV.KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL
},
});
Script file is::
import { check } from "k6";
import {
writer,
produceWithConfiguration,
createTopic
} from "k6/x/kafka";
import {configuration} from "./configuration.js"
const bootstrapServers = [__ENV.KAFKA_BOOTSTRAP_SERVERS];
const topic = "quotes-test.itg-load.default";
const username = __ENV.KAFKA_USERNAME;
const password = __ENV.KAFKA_PASSWORD;
const protocol = __ENV.KAFKA_SECURITY_PROTOCOL;
console.log("protocol is :"+protocol);
const auth = JSON.stringify({
username: username,
password: password,
algorithm: "PLAIN"
});
const producer = writer( bootstrapServers, topic, auth);
const valueSchema =
{ "type": "record", "namespace": "com.appdirect.prm.quotes.event", "name": "QuoteStatusChanged", "fields": [ { "name": "previousStatus", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "eventMetadata", "type": { "fields": [ { "name": "id", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "timestamp", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "type", "type": { "avro.java.string": "String", "type": "string" } }, { "default": null, "name": "operation", "type": [ "null", { "avro.java.string": "String", "type": "string" } ] } ], "name": "EventMetadata", "namespace": "com.appdirect.common.event", "type": "record" } }, { "name": "quote", "type": { "fields": [ { "name": "id", "type": { "avro.java.string": "String", "type": "string" } }, { "default": null, "name": "name", "type": [ "null", { "avro.java.string": "String", "type": "string" } ] }, { "name": "createdOn", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "tenant", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "ownerUser", "type": { "fields": [ { "name": "id", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "company", "type": { "fields": [ { "name": "name", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "id", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "isReseller", "type": "boolean" } ], "name": "Company", "type": "record" } }, { "name": "email", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "firstName", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "lastName", "type": { "avro.java.string": "String", "type": "string" } } ], "name": "User", "type": "record" } }, { "name": "source", "type": { "fields": [ { "name": "id", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "sourceType", "type": { "avro.java.string": "String", "type": "string" } } ], "name": "Source", "type": "record" } }, { "name": "customerUser", "type": "User" }, { "name": "createdBy", "type": "User" }, { "name": "status", "type": { "avro.java.string": "String", "type": "string" } }, { "name": "displayId", "type": { "avro.java.string": "String", "type": "string" } } ], "name": "Quote", "type": "record" } } ] }
;export default function () {
console.log("BootServer connected"+bootstrapServers);
const schemaConfig=__ENV.KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL;
console.log("schema connected"+schemaConfig);
}
export function teardown( data ) {
producer.close();
}
The text was updated successfully, but these errors were encountered: