Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用consul-consumer时获取不到consul-client #20

Open
JerryDtj opened this issue Jun 14, 2019 · 0 comments
Open

使用consul-consumer时获取不到consul-client #20

JerryDtj opened this issue Jun 14, 2019 · 0 comments

Comments

@JerryDtj
Copy link

当我用docker创建好了consul容器 以dev方式启动后,在http://localhost:8500/ui/dc1/services 页面中是可以看到consul-client服务的.调用client的dc方法也可正常获取到服务列表.但是使用loadBalancerClient.choose("consul-client")时,获取到的服务为null.导致下面的服务调用直接报空指针异常.请问大神这个是为什么.
docker的consul启动命令如下:
$ docker run -d --name=dev-consul -p 8500:8500 consul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant