./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.