Cannot connect to Kafka, reason: Timeout occurred

Hello. I was configuring Lenses 5.4 and an error message appeared: “Cannot connect to Kaka, reason: Timeout occurred”. The strange thing is that the value of the “HTTP timeout in milliseconds” field is set to 200,000. What could this be?

This issue was fixed in Lenses 5.4.4. When you use the UI to configure the connection, there is a 20-second limit on API calls, including connection tests. To change this timeout, you can modify the “lenses.akka.http.server.request-timeout.ms” parameter. So you should update your Lenses to version 5.4.4 or higher and, if the test takes more than 20 seconds, adjust the “lenses.akka.http.server.request-timeout.ms” parameter. In order to set a timeout longer than twenty seconds in the UI, you need to adjust the “lenses.akka.http.server.request-timeout.ms” in the Lenses settings, as this parameter allows for a longer time to be configured via the UI.

  • To change this configuration in docker you need to pass environment variable:

    LENSES_APPEND_CONF="[lenses.akka.http.server.request-timeout.ms](http://lenses.akka.http.server.request-timeout.ms/) = 200000"
    
  • To change this configuration in Helm you need to use the lenses.append.conf:

    lenses:
      append:
        conf: |
          lenses.akka.http.server.request-timeout.ms = 200000
    

Cheers!