You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consul 1.6.2 is running in docker on localhost at port 8500, using all the defaults. I bootstrap per the docs;
ConsulClusterManager consulClusterManager = new ConsulClusterManager();
options.setClusterManager(consulClusterManager);
The cluster manager dies with a NPE;
[ERROR] i.v.c.i.ContextImpl - Unhandled exception
java.lang.NullPointerException: null
at io.vertx.spi.cluster.consul.ConsulClusterManager.entryUpdated(ConsulClusterManager.java:478)
at io.vertx.spi.cluster.consul.impl.ConsulMapListener.lambda$kvWatchHandler$0(ConsulMapListener.java:89)
at io.vertx.ext.consul.impl.WatchImpl.sendSuccess(WatchImpl.java:213)
at io.vertx.ext.consul.impl.WatchImpl.lambda$go$3(WatchImpl.java:183)
at io.vertx.ext.consul.impl.WatchImpl.lambda$fetch$5(WatchImpl.java:198)
at io.vertx.ext.consul.impl.WatchImpl$KeyPrefix.lambda$wait$1(WatchImpl.java:62)
at io.vertx.ext.consul.impl.ConsulClientImpl.lambda$reqOnContext$61(ConsulClientImpl.java:731)
at io.vertx.ext.web.client.impl.HttpContext.handleDispatchResponse(HttpContext.java:308)
at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:295)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:270)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:69)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:32)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:267)
at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:277)
at io.vertx.ext.web.client.impl.HttpContext.dispatchResponse(HttpContext.java:238)
at io.vertx.ext.web.client.impl.HttpContext.lambda$null$2(HttpContext.java:367)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518)
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
The text was updated successfully, but these errors were encountered:
@romalev I found my issue -- the default of InetAddress.getLocalHost().getHostAddress() returns 127.0.0.1. Since my consul is in docker, consul was trying to hit 127.0.0.1:64146, which was looping back to the container. Configuring it with my real host IP solved the NPE, but I would suggest a better default and perhaps more reasonable logging to clearly indicate that's the issue somehow?
@japhar81, that happened to me once :) I am completely agree with you - logging has to be improved in this area. I honestly don't have many feedbacks on given cluster management implementation so feel free to share yours. Also feel free to contribute :)
Consul 1.6.2 is running in docker on localhost at port 8500, using all the defaults. I bootstrap per the docs;
The cluster manager dies with a NPE;
The text was updated successfully, but these errors were encountered: