zalando / nakadi

A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues

Home Page:https://nakadi.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

./gradlew startNakadi always looks for zookeeper:2181 even after setting the NAKADI_ZOOKEEPER_BROKERS=zoo1:2181,zoo2:2181,zoo3:2181

rab4u opened this issue · comments

java.lang.IllegalArgumentException: Unable to canonicalize address zookeeper:2181 because it's not resolvable
nakadi_1 | at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:65)
nakadi_1 | at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:41)
nakadi_1 | at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1001)
nakadi_1 | at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1060)
nakadi_1 | [2020-03-06 13:52:01.860Z] [WARN] [null] [main-SendThread(zookeeper:2181)] [org.apache.zookeeper.ClientCnxn] --- Session 0x0 for server zookeeper:2181, unexpected error, closing socket connection and attempting reconnect

hi, I'd like to work on this

I replaced the hard coded values in the application.yml with environment variables defined in the docker-compose.yml. It seems to be working fine now.

Code snippet of application.yml replaced with env. variable

  zookeeper:
    connectionString: zookeeper://${NAKADI_ZOOKEEPER_BROKERS:zookeeper:2181}
    sessionTimeoutMs: 10000
    connectionTimeoutMs: 3000
    maxInFlightRequests: 1000

Closing this issue as @max-neverov 's PR (now merged) solved this problem.

@rab4u : I dont understand the code snippet you mentioned above to resolve the issue. i am facing the similar issue