如何解决该操作已超时->无法在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 举报,一经查实,本站将立刻删除。