Giter Club home page Giter Club logo

Comments (7)

justxuewei avatar justxuewei commented on June 2, 2024

Thank you for reporting this. Firstly, the documentation you referenced is from Dubbo, not Dubbo-go. Therefore, the default port is not the same as the Dubbo's. Then, the condition of using ramdon port doesn't have problem, since the port should be specified to -1, instead of leaving empty.

from dubbo-go.

tiandi0716 avatar tiandi0716 commented on June 2, 2024

@justxuewei Thank you your reply, But use "-1" in port field of string type, the length size is greater than 0, if i keep empty the field default is "20000",

image

there you are set the "default" tag value "20000", please give a simple of how to use random port?

thank you very much

from dubbo-go.

justxuewei avatar justxuewei commented on June 2, 2024

use "-1" in port field of string type, the length size is greater than 0

What is happend while the length size is greater than 0? Does it not work while setting the port to -1?

image

Could you give me a link to this line of code? Instead of a picture. I'll take a look at this.

from dubbo-go.

tiandi0716 avatar tiandi0716 commented on June 2, 2024

Protocol Init method

https://github.com/apache/dubbo-go/blob/main/config/protocol_config.go
image

https://github.com/creasty/defaults/blob/master/defaults.go
image

the code you are parse "default" tag, Port default "20000"
https://github.com/apache/dubbo-go/blob/main/config/protocol_config.go
image

my dubbogo.yaml config

dubbo:
  application: 
    name: go.micro.api.gateway
  registries:
    nacos:
      protocol: nacos
      address: 192.168.1.236:8848
  protocols:
    triple:
      name: tri
      port:  -1

from dubbo-go.

justxuewei avatar justxuewei commented on June 2, 2024

Thanks for report this issue. I've pushed a patch to fix the issue: #2384. Please let me know if you have any questions.

from dubbo-go.

tiandi0716 avatar tiandi0716 commented on June 2, 2024

Ok, thank you, i will let you know if i meet any question in use.

from dubbo-go.

project-snail avatar project-snail commented on June 2, 2024

Thanks for report this issue. I've pushed a patch to fix the issue: #2384. Please let me know if you have any questions.

感觉是判断-1才特殊处理?现在无法解析就随机分配 无法解析结束进程panic感觉比较合理

from dubbo-go.

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.