Giter Club home page Giter Club logo

Comments (8)

felixhao avatar felixhao commented on May 28, 2024

把配置改成0.0.0.0:7171

from discovery.

HelloWorldZQ avatar HelloWorldZQ commented on May 28, 2024

image
这个提示看着 。。。

from discovery.

HelloWorldZQ avatar HelloWorldZQ commented on May 28, 2024

@felixhao 不行的 还是会呗拒绝
这个地址会被 汇报上去。。
image
logic 那边的code 都会调用0.0.0.0 这个ip 的discovery了
还是决定多加个端口配置比较合理
http server addr 是对外可见的 ip 和端口。
加个port 是启动服务使用的端口,如果有什么端口转发都可以实现

from discovery.

lintanghui avatar lintanghui commented on May 28, 2024

这个地方应该是在启动监听的时候自动转换为监听网卡地址,可以先修改配置使用网卡ip进行监听启动。我们在进行fix自动把ip转换为网卡ip

from discovery.

HelloWorldZQ avatar HelloWorldZQ commented on May 28, 2024

docker 启动的时候如果使用虚拟的网卡ip 的话,从宿主机外访问宿主ip:7171(或者容器的端口指向了宿主机其它ip) 就会被拒绝

from discovery.

felixhao avatar felixhao commented on May 28, 2024

@HelloWorldZQ 需要先理清楚:

  1. docker里启动discovery,配置文件将addr配置为0.0.0.0:7171
  2. 启动依赖discovery的client,需要配置你对应docker的${ip}:7171

分清楚服务端和客户端的配置

from discovery.

lintanghui avatar lintanghui commented on May 28, 2024

@felixhao@HelloWorldZQ 的情况是他使用的discovery的服务自发现功能,地址配置为0.0.0.0的时候discovery 自己注册上去的服务地址会是0.0.0.0 client拿到后无法访问,如果直接使用容器的网卡ip进行注册,那么非宿主机也无法访问到discovery。如果使用docker应该需要你修改下docker的网络方式,或者在client里写死discovery的ip:port

from discovery.

HelloWorldZQ avatar HelloWorldZQ commented on May 28, 2024

@lintanghui 多谢 。就是 这种情况,我没有很好的表达我的意思,目前我只能添加了一个配置 解决这个

from discovery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.