该操作已超时->无法在Windows Container中解析名称

问题描述

我正在运行Windows容器,但没有出站超额 我的dockerfile具有基本映像

FROM microsoft/aspnet:3.5-windowsservercore-10.0.14393.1715
 //Setting IIS for my application
 Expose 443

我在下面的行中创建容器

docker run -it -d --name myWebApp --cpus=2 --memory=2000m --hostname=doc --domainname=otxlab.net -p 443:443 imagename

我的容器的ipconfig看起来像这样

>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : doc.otxlab.net
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #2
   Physical Address. . . . . . . . . : 00-15-5D-0E-68-2B
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::a8d2:e3d5:656a:f19e%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.178.134(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 192.168.176.1
   DHCPv6 IAID . . . . . . . . . . . : 83891549
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-26-C9-D1-FD-00-15-5D-0E-68-2B
   DNS Servers . . . . . . . . . . . : 192.168.176.1
                                       10.194.17.21
                                       10.194.17.22
   NetBIOS over Tcpip. . . . . . . . : Disabled

使用上述配置,尽管我可以ping内部服务器,但不能ping google.com 我的应用程序注销错误并出现以下错误 无法解析远程名称:“ accounts.accesscontrol.windows.net”

将主机的dns服务器设置为主服务器和辅助服务器

Get-NetAdapter
Set-DnsClientServerAddress -InterfaceIndex 5 -ServerAddresses 10.194.17.21,10.194.17.22

现在,我可以ping google.com并使用nslookup解析上面的名字 但是我的应用程序仍然记录错误并显示以下错误 操作已超时

不确定,为什么应用程序仍然无法从外部域获得响应。 我还检查了IIS日志

2020-08-19 08:14:31 192.168.178.134 GET / WebPartPage / ??? -443- 192.168.176.1 Mozilla / 5.0 +(Windows + NT + 10.0; + Win64; + x64)+ AppleWebKit / 537.36 +(KHTML,+ like + Gecko)+ Chrome / 84.0.4147.125 + Safari / 537.36 https://doc.otxlab.net/WebPartPage/BrowseWebPartPage.aspx?SPHostUrl=https%3A%2F%2F%2Esharepoint%2Ecom%2Fsites%2Ftest%2F&SPClientTag=0&SPProductNumber=16%2E0%2E20405%2E12005&wpId=g%5Fee83e176%5F1759%5F4e80%5Fb2dc%5F4d53a7aa2d85&SenderId=DD6D40620 404 0 2 46

我看到默认网关用于发出请求。这是问题吗? 我该如何更改? 我尝试将其设置为主机(VM默认网关),但是没有运气。 我应该为Windows容器创建一个新的网络吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...