GithubHelp home page GithubHelp logo

Comments (21)

johnlanni avatar johnlanni commented on July 1, 2024

@2456868764 看下这个问题

from higress.

CH3CHO avatar CH3CHO commented on July 1, 2024

编辑的时候数据中心没显示的话可以考虑清理一下浏览器缓存,我这边本地看在编辑的时候有显式的。不太确定是不是缓存的问题。

from higress.

2456868764 avatar 2456868764 commented on July 1, 2024

看一下 consul 服务发现里能看到这个服务节点注册上来IP地址吗?
另外看一下 higress controller 日志 kubectl logs -f higress-controller-XXXX higress-core -n higress-system
higress-controller-XXXX 这个是 higress-controller pod name

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

编辑的时候数据中心没显示的话可以考虑清理一下浏览器缓存,我这边本地看在编辑的时候有显式的。不太确定是不是缓存的问题。

谢谢您的回复,我换了一个浏览器也不行,只有这个字段没有显示。

from higress.

CH3CHO avatar CH3CHO commented on July 1, 2024

谢谢您的回复,我换了一个浏览器也不行,只有这个字段没有显示。

那这个有点奇怪。麻烦提供一下 higress-console 所使用的镜像版本,以及 kubectl get mcpbridge default -n higress-system 的输出。我本地尝试重现一下。

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

kubectl logs -f higress-controller-XXXX higress-core -n higress-system

image 从日志上看是能拿到 服务名,但是 服务对应的 ip 没有显示。 有一个小问题,consul 地址不能包含 http://xxx. 只能录入 ip 。

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

kubectl get mcpbridge default -n higress-system
输出的日志

image

镜像的版本是:
image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/console:1.3.1

from higress.

CH3CHO avatar CH3CHO commented on July 1, 2024

kubectl get mcpbridge default -n higress-system
输出的日志

image 镜像的版本是: image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/console:1.3.1

忘记输出为 yaml 了。请再执行一次 kubectl get mcpbridge default -n higress-system -o yaml

from higress.

CH3CHO avatar CH3CHO commented on July 1, 2024

kubectl logs -f higress-controller-XXXX higress-core -n higress-system

image 从日志上看是能拿到 服务名,但是 服务对应的 ip 没有显示。 有一个小问题,consul 地址不能包含 http://xxx. 只能录入 ip 。

这里本身输入的就是地址,默认使用 HTTP 协议,所以不需要额外输入协议。而且端口也是要求独立输入的,这样 http://xxx 又不加端口也会比较奇怪。

from higress.

CH3CHO avatar CH3CHO commented on July 1, 2024

kubectl get mcpbridge default -n higress-system -o yaml apiVersion: networking.higress.io/v1 kind: McpBridge metadata: creationTimestamp: "2023-12-28T07:44:34Z" generation: 5 name: default namespace: higress-system resourceVersion: "146899868" uid: 46f8a256-f33b-4d93-b695-c9202c79e858 spec: registries:

  • domain: 11.xx.yy.zz
    name: consul
    port: 80
    type: consul

单看这个配置数据,是不包含 dc 啊什么的信息的。不确定这个是否会影响行为,建议编辑一下把信息补充上去。

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

kubectl get mcpbridge default -n higress-system
输出的日志

image 镜像的版本是: image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/console:1.3.1

忘记输出为 yaml 了。请再执行一次 kubectl get mcpbridge default -n higress-system -o yaml

image

from higress.

2456868764 avatar 2456868764 commented on July 1, 2024

我在本地安装 consul 1.12.2 版本测试一下, 可以看到服务IP地址列表
截屏2023-12-29 11 01 23
截屏2023-12-29 11 01 39

麻烦查一下 通过 higress controller debug 端口 是否输出IP地址

kubectl -n higress-system port-forward deploy/higress-controller 8888:8888

然后 通过URL 访问 http://127.0.0.1:8888/debug/configz 看输出 consul serviceEntry 是否包含IP地址

WechatIMG729

from higress.

nlg521 avatar nlg521 commented on July 1, 2024
image

看起来也没有这个 ip 列表

image

直接访问 consul 是有数据返回的。

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

[
{
"ID": "",
"Node": "console-0291dac9",
"Address": "10.1.1.160",
"Datacenter": "dc-tool",
"TaggedAddresses": null,
"NodeMeta": {
"external-node": "true",
"external-probe": "true"
},
"ServiceKind": "",
"ServiceID": "1000022",
"ServiceName": "app1",
"ServiceTags": [
"_app=app1",
"_environment=pro",
"_metrics_path=/actuator/prometheus"
],
"ServiceAddress": "",
"ServiceWeights": {
"Passing": 1,
"Warning": 1
},
"ServiceMeta": { },
"ServicePort": 8080,
"ServiceSocketPath": "",
"ServiceEnableTagOverride": false,
"ServiceProxy": {
"Mode": "",
"MeshGateway": {},
"Expose": {}
},
"ServiceConnect": {},
"CreateIndex": 715832,
"ModifyIndex": 715832
}
]

通过 http://${ip}/v1/catalog/service/app1 返回的数据如上,不知道是否是解析的问题。

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

kubectl get mcpbridge default -n higress-system -o yaml apiVersion: networking.higress.io/v1 kind: McpBridge metadata: creationTimestamp: "2023-12-28T07:44:34Z" generation: 5 name: default namespace: higress-system resourceVersion: "146899868" uid: 46f8a256-f33b-4d93-b695-c9202c79e858 spec: registries:

这个应该就是编辑时不能获取 dc 的原因吧。

from higress.

CH3CHO avatar CH3CHO commented on July 1, 2024

这个应该就是编辑时不能获取 dc 的原因吧。

是的,因为数据里就没有 dc。

from higress.

2456868764 avatar 2456868764 commented on July 1, 2024

[ { "ID": "", "Node": "console-0291dac9", "Address": "10.1.1.160", "Datacenter": "dc-tool", "TaggedAddresses": null, "NodeMeta": { "external-node": "true", "external-probe": "true" }, "ServiceKind": "", "ServiceID": "1000022", "ServiceName": "app1", "ServiceTags": [ "_app=app1", "_environment=pro", "_metrics_path=/actuator/prometheus" ], "ServiceAddress": "", "ServiceWeights": { "Passing": 1, "Warning": 1 }, "ServiceMeta": { }, "ServicePort": 8080, "ServiceSocketPath": "", "ServiceEnableTagOverride": false, "ServiceProxy": { "Mode": "", "MeshGateway": {}, "Expose": {} }, "ServiceConnect": {}, "CreateIndex": 715832, "ModifyIndex": 715832 } ]

通过 http://${ip}/v1/catalog/service/app1 返回的数据如上,不知道是否是解析的问题。

我看了 consul 数据, 这里 ServiceAddress 是空,服务IP没有注册到 consul, 你排查一下是否 服务没有把IP注册到consul 上,导致不能获取IP地址

这里是本地测试 consul api 输出 http://127.0.0.1:8500/v1/catalog/service/orderbff

···
[
{
"ID": "c96acc66-400b-c19e-9c89-38c65482373e",
"Node": "consul-standlone",
"Address": "127.0.0.1",
"Datacenter": "dc1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"lan_ipv4": "127.0.0.1",
"wan": "127.0.0.1",
"wan_ipv4": "127.0.0.1"
},
"NodeMeta": {
"consul-network-segment": ""
},
"ServiceKind": "",
"ServiceID": "orderbff-6c5b94479-cqwx2",
"ServiceName": "orderbff",
"ServiceTags": [
"higress",
"httpbin"
],
"ServiceAddress": "10.244.0.14",
"ServiceTaggedAddresses": {
"lan_ipv4": {
"Address": "10.244.0.14",
"Port": 8080
},
"wan_ipv4": {
"Address": "10.244.0.14",
"Port": 8080
}
},
"ServiceWeights": {
"Passing": 1,
"Warning": 1
},
"ServiceMeta": {},
"ServicePort": 8080,
"ServiceSocketPath": "",
"ServiceEnableTagOverride": false,
"ServiceProxy": {
"Mode": "",
"MeshGateway": {},
"Expose": {}
},
"ServiceConnect": {},
"CreateIndex": 17,
"ModifyIndex": 17
},
{
"ID": "c96acc66-400b-c19e-9c89-38c65482373e",
"Node": "consul-standlone",
"Address": "127.0.0.1",
"Datacenter": "dc1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"lan_ipv4": "127.0.0.1",
"wan": "127.0.0.1",
"wan_ipv4": "127.0.0.1"
},
"NodeMeta": {
"consul-network-segment": ""
},
"ServiceKind": "",
"ServiceID": "orderbff-6c5b94479-q9zbf",
"ServiceName": "orderbff",
"ServiceTags": [
"higress",
"httpbin"
],
"ServiceAddress": "10.244.0.13",
"ServiceTaggedAddresses": {
"lan_ipv4": {
"Address": "10.244.0.13",
"Port": 8080
},
"wan_ipv4": {
"Address": "10.244.0.13",
"Port": 8080
}
},
"ServiceWeights": {
"Passing": 1,
"Warning": 1
},
"ServiceMeta": {},
"ServicePort": 8080,
"ServiceSocketPath": "",
"ServiceEnableTagOverride": false,
"ServiceProxy": {
"Mode": "",
"MeshGateway": {},
"Expose": {}
},
"ServiceConnect": {},
"CreateIndex": 16,
"ModifyIndex": 16
}
]

···

ServiceAddress 和 TaggedAddresses 是有IP地址数据的

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

Address

image

我们这注册的看起来只有这个字段有数据, prometheus 看起来是从这个字段获取地址的,我们的监控系统是正常。

from higress.

2456868764 avatar 2456868764 commented on July 1, 2024

Address

image 我们这注册的看起来只有这个字段有数据。

这个Address应该是 consul 自身 Node 节点的IP地址,而不是注册到consul 上服务的IP地址

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

Address

image 我们这注册的看起来只有这个字段有数据。

这个Address应该是 consul 自身 Node 节点的IP地址,而不是注册到consul 上服务的IP地址

好的明白了,我们的consul 应该在每个服务节点都有,所以误以为是哪个字段了,谢谢您了。

from higress.

nlg521 avatar nlg521 commented on July 1, 2024

ttp://${ip}/v1/catalog/service

您好,这个能复现了吗,我这编辑的时候一直无法显示。

from higress.

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.