catalog.api服务无法通过dns名称连接到rabbitmq [英] catalog.api service cannot connect to rabbitmq by dns name

查看:239
本文介绍了catalog.api服务无法通过dns名称连接到rabbitmq的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

警告:Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ.DefaultRabbitMQPersistentConnection [0]

   

warn: Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ.DefaultRabbitMQPersistentConnection[0]
   

以下是使用泊坞日志的错误日志

below is error log by using docker logs

  RabbitMQ.Client.Exceptions.BrokerUnreachableException:没有指定的端点可以访问---> RabbitM

Q.Client.Exceptions.ConnectFailureException:连接失败---> System.Net.Sockets.SocketException:这通常是在主机名解析期间发生的
a临时错误,意味着本地服务器没有收到来自授权的回复。
ative server

          at System.Net.Dns.InternalGetHostByName(String hostName,Boolean includeIPv6)

          at System.Net.Dns.ResolveCallback(Object context)

  RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitM
Q.Client.Exceptions.ConnectFailureException: Connection failed ---> System.Net.Sockets.SocketException: This is usually
a temporary error during hostname resolution and means that the local server did not receive a response from an authorit
ative server
         at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
         at System.Net.Dns.ResolveCallback(Object context)

如果我用IP地址替换dns名称,  catalog.api服务可以连接到rabbitmq。

if I replace dns name with IP address,  catalog.api service can connect to rabbitmq.

此外,命名服务和DNS服务在sf资源管理器中是健康的。

moreover , the naming service and dns service are  healthy in sf explorer.

背景: 我在本地集群上使用容器部署catalog.api

backgound:   I deploy catalog.api on local cluster with container

推荐答案

HI Pan_happy,

HI Pan_happy,

看起来链接我们需要提供"serviceName.appName"。你可以试试吗?

Looks link we need to give "serviceName.appName". Can you try with that?

一个例子是
here

同时浏览该文档的其余部分。

Also go through the rest of that document.

试试看,告诉我。


这篇关于catalog.api服务无法通过dns名称连接到rabbitmq的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆