adevinta / zoe

The Kafka CLI for humans
https://adevinta.github.io/zoe
MIT License
286 stars 21 forks source link

Unable to recognize config values for SSL enabled cluster #16

Closed prashanth-hegde closed 4 years ago

prashanth-hegde commented 4 years ago

Unable to parse configuration while reading from a cloud server

Error message:

$ zoe --env stage --cluster inventory topics consume transactions
2020-09-18 09:39:26 INFO zoe: loading config from url : file:/Users/Z002DCM/.zoe/config/stage.yml
error: Parameter specified as non-null is null: method com.adevinta.oss.zoe.service.secrets.ExtensionsKt.
secretOrRaw, parameter value

Configuration:

---
runners:
  default: "local"
storage: null
secrets: null
expressions: {}
clusters:
  inventory:
    registry: null
    topics:
      transactions:
        name: "inventory-transactions"
        subject: "Inventory Transactions"
        propsOverride: {}
    props:
      bootstrap.servers: "kafka-ttc-cloud.com:9093"
      key.deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
      value.deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
      key.serializer: "org.apache.kafka.common.serialization.StringSerializer"
      value.serializer: "org.apache.kafka.common.serialization.StringDeserializer"
      security.protocol: "SSL"
      ssl.truststore.location: "/absolute/path/to/client.jks"
      ssl.truststore.password: "my_password"
      ssl.keystore.location: "/absolute/path/to/server.jks"
      ssl.keystore.password: "my_password"
      ssl.endpoint.identification.algorithm:
    groups: {}
wlezzar commented 4 years ago

Hi @prashanth-hegde . Thanks for raising the issue : )

I checked and indeed it's a bug when scanning the props field for secrets which doesn't support null values (in your case: ssl.endpoint.identification.algorithm). I'm preparing a PR for the fix, but in the meantime can you try to remove the ssl.endpoint.identification.algorithm from your props and try again?

prashanth-hegde commented 4 years ago

@wlezzar ahh! it's the ssl.endpoint.identification.algorithm that's causing issue. From the error message, I was thinking it's the secrets configuration. That makes sense.

I was able to make this change in the setting and get it to work alright.

ssl.endpoint.identification.algorithm: ""

Appreciate the quick turn around.