This is a code snippet of what I'm running:
err := godotenv.Load()
if err != nil {
log.Fatal("Error loading .env file")
}
broker := os.Getenv("BROKER")
topic := os.Getenv("TOPIC")
username := os.Getenv("USERNAME")
password := os.Getenv("PASSWORD")
calocation := os.Getenv("CALOCATION")
p, err := kafka.NewProducer(&kafka.ConfigMap{
"metadata.broker.list": broker,
"security.protocol": "sasl_ssl",
"sasl.username": username,
"sasl.password": password,
"sasl.mechanisms": "PLAIN",
"ssl.ca.location": calocation,
"api.version.request": true})
if err != nil {
fmt.Printf("Failed to create producer: %s
", err)
os.Exit(1)
}
Basically, this runs successfully on one machine, but not another. The error that I'm receiving on the machine that isn't working is the following:
'SSL handshake failed: /SourceCache/OpenSSL098/OpenSSL098-52.40.1/src/ssl/s23_clnt.c:593: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version:'
Not sure if this issue could be linked to this issue: Why kafka-python fails to connect to Bluemix message hub service?... Don't think so as the exact code is running on one machine but not the other. Any help is appreciated!