2017-04-07 12 views
0

WindowsベースのコンテナがDNSを解決できなくなっている状況に直面しています。Windows 10でホストされているWindowsコンテナでDNSが失われる

これは

Test-NetConnection google.com -Port 443

PS Cで失敗容器の内側から docker run -it microsoft/windowsservercore powershell

DNS解決をテストするために、コンテナを起動するには

を何が起こるかです: > Test-NetConn google.com -Port 443 警告:google.comの名前解決に失敗しました - ステータス:通常、ホスト名解決中の一時的なエラーで、ローカルサーバーが信頼できるサーバー ComputerName:googleからの応答を受信しなかったことを意味します。 COM [リモート: InterfaceAlias: SourceAddress: PingSucceeded:偽

が、この

PS Cのようなものでなければなりません:\ Users \ユーザーasarafian>テスト-のNetConnection google.com -Port 443 コンピュータ名:google.com [リモート:216.58.204.14 次に、remoteport:443 InterfaceAlias:のvEthernet(外部仮想スイッチ) SourceAddress:10.98.5.139 TcpTestSucceeded:真

私はいつも(Windowsの10)ワークステーションをhybernate私はHyper-VインスタンスとDockerを操作します。ワークステーションはWindows 10で、問題が発生したときにわかることは、Windows 10ホストのIPとしてDNSとして使用することです。

PS C:\> ipconfig /all 

Windows IP Configuration 

    Host Name . . . . . . . . . . . . : c7c016e13be8 
    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. . . . . . . . . : Deducted 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 
    Link-local IPv6 Address . . . . . : fe80::bc61:e687:4676:353a%5(Preferred) 
    IPv4 Address. . . . . . . . . . . : 172.19.143.229(Preferred) 
    Subnet Mask . . . . . . . . . . . : 255.255.240.0 
    Default Gateway . . . . . . . . . : 172.19.128.1 
    DHCPv6 IAID . . . . . . . . . . . : Deducted 
    DHCPv6 Client DUID. . . . . . . . : Deducted 
    DNS Servers . . . . . . . . . . . : 172.19.128.1 
    NetBIOS over Tcpip. . . . . . . . : Disabled 

172.19.128.1コンテナ内から

は私の窓10のホストのIPです。

同時に、Windows 10のホストコンテナがスタックされていると、他のすべてがDNSを正常に解決します。

  • のHyper-Vインスタンス修正されていないマシンを再起動
  • コンテナのWindows上でのHyper-Vインスタンス上でホストされている10

のWindows 10上のWindows上の任意のプロセス問題。これが2回目です。以前は、問題を解決するためにドッカーのインストール全体をリセットする必要がありました。私はこれを避け、問題の内容と解決方法を理解したいと思います。

ドッカーバージョンが

C:\Users\asarafian>docker version 
Client: 
Version:  17.03.1-ce-rc1 
API version: 1.27 
Go version: go1.7.5 
Git commit: 3476dbf 
Built:  Wed Mar 15 20:33:22 2017 
OS/Arch:  windows/amd64 

Server: 
Version:  17.03.1-ce-rc1 
API version: 1.27 (minimum version 1.24) 
Go version: go1.7.5 
Git commit: 3476dbf 
Built:  Wed Mar 15 20:33:22 2017 
OS/Arch:  windows/amd64 
Experimental: false 

アップデート1 - クリス - ローレンスコメント@の要求ごととして20170408

、次のホストから、容器内部からipconfig /allあります。面白いのは、DNS解決がコンテナ内部から行われるという点です。コンテナのホストでコンテナ内

PS C:\> ipconfig /all 

Windows IP Configuration 

    Host Name . . . . . . . . . . . . : 476d22f638ea 
    Primary Dns Suffix . . . . . . . : 
    Node Type . . . . . . . . . . . . : Hybrid 
    IP Routing Enabled. . . . . . . . : No 
    WINS Proxy Enabled. . . . . . . . : No 
    DNS Suffix Search List. . . . . . : home 

Ethernet adapter Ethernet 2: 

    Connection-specific DNS Suffix . : home 
    Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #2 
    Physical Address. . . . . . . . . : 00-15-5D-53-0A-2A 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 
    Link-local IPv6 Address . . . . . : fe80::ad59:83cc:6e64:944a%5(Preferred) 
    IPv4 Address. . . . . . . . . . . : 172.19.132.10(Preferred) 
    Subnet Mask . . . . . . . . . . . : 255.255.240.0 
    Default Gateway . . . . . . . . . : 172.19.128.1 
    DHCPv6 IAID . . . . . . . . . . . : 83891549 
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-7A-A9-D0-00-15-5D-53-0A-2A 
    DNS Servers . . . . . . . . . . . : 172.19.128.1 
             192.168.0.1 
    NetBIOS over Tcpip. . . . . . . . : Disabled 

Windows IP Configuration 

    Host Name . . . . . . . . . . . . : MECDEVASAR03 
    Primary Dns Suffix . . . . . . . : global.sdl.corp 
    Node Type . . . . . . . . . . . . : Hybrid 
    IP Routing Enabled. . . . . . . . : No 
    WINS Proxy Enabled. . . . . . . . : No 
    DNS Suffix Search List. . . . . . : global.sdl.corp 
             sdl.corp 
             maidenhead.sdl.corp 
             sheffield.sdl.corp 
             development.sheffield.sdl.corp 
             irv.languageweaver.com 
             languageweaver.com 
             montreal.sdl.corp 
             singapore.sdl.corp 
             bray.sdl.corp 
             seoul.sdl.corp 
             idiominc.priv 
             sdlproducts.com 
             lan.lon.sdlproducts.com 
             freetranslation.corp 
             xyenterprise.com 
             alterian.com 
             ams.dev 
             sdlntt.corp 

Ethernet adapter vEthernet (HNS Internal NIC): 

    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter 
    Physical Address. . . . . . . . . : 00-15-5D-53-04-CB 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 
    Link-local IPv6 Address . . . . . : fe80::f5c8:e8c7:1ad0:d845%26(Preferred) 
    IPv4 Address. . . . . . . . . . . : 172.19.128.1(Preferred) 
    Subnet Mask . . . . . . . . . . . : 255.255.240.0 
    Default Gateway . . . . . . . . . : 
    DHCPv6 IAID . . . . . . . . . . . : 436213085 
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-AD-0A-F4-18-DB-F2-15-03-E7 
    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 
             fec0:0:0:ffff::2%1 
             fec0:0:0:ffff::3%1 
    NetBIOS over Tcpip. . . . . . . . : Enabled 

Ethernet adapter vEthernet (External Virtual Switch): 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : global.sdl.corp 
    Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2 
    Physical Address. . . . . . . . . : 18-DB-F2-15-03-E7 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 

Wireless LAN adapter Local Area Connection* 2: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter 
    Physical Address. . . . . . . . . : B8-08-CF-44-25-D9 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 

Wireless LAN adapter Wi-Fi: 

    Connection-specific DNS Suffix . : home 
    Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 8260 
    Physical Address. . . . . . . . . : B8-08-CF-44-25-D8 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 
    Link-local IPv6 Address . . . . . : fe80::6d3a:ef28:a057:6108%18(Preferred) 
    IPv4 Address. . . . . . . . . . . : 192.168.0.103(Preferred) 
    Subnet Mask . . . . . . . . . . . : 255.255.255.0 
    Lease Obtained. . . . . . . . . . : Saturday, 8 April 2017 16:17:24 
    Lease Expires . . . . . . . . . . : Saturday, 15 April 2017 16:24:09 
    Default Gateway . . . . . . . . . : 192.168.0.1 
    DHCP Server . . . . . . . . . . . : 192.168.0.1 
    DHCPv6 IAID . . . . . . . . . . . : 45615311 
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-AD-0A-F4-18-DB-F2-15-03-E7 
    DNS Servers . . . . . . . . . . . : 192.168.0.1 
    NetBIOS over Tcpip. . . . . . . . : Enabled 

Ethernet adapter Bluetooth Network Connection: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network) 
    Physical Address. . . . . . . . . : B8-08-CF-44-25-DC 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 

Tunnel adapter isatap.global.sdl.corp: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : global.sdl.corp  Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2 
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 
    DHCP Enabled. . . . . . . . . . . : No 
    Autoconfiguration Enabled . . . . : Yes 

Tunnel adapter isatap.{5C890AAE-6E73-44BB-BB1E-DE8EB4794BF8}: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3 
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 
    DHCP Enabled. . . . . . . . . . . : No 
    Autoconfiguration Enabled . . . . : Yes 

Tunnel adapter isatap.home: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : home 
    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #4 
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 
    DHCP Enabled. . . . . . . . . . . : No 
    Autoconfiguration Enabled . . . . : Yes 

ただ、好奇心ので、私は、Hyper-Vのインスタンスの状態をチェックしましたし、彼らがオフになっています。私の気持ちは、ハイパーv(s)の時に何か変わったことがあるということです。私は、ハイパーVインスタンスが実行されているときにシステムがハイバネーションから復帰したときに何か不思議なことが起きることをほとんど疑っています。私は小切手をします....

私は小切手をして、すべてはまだokです。しかし、ハイパーVは有線ネットワークアダプター用に設定されているため、WIFIではネットワークを取得しません。この場合、彼らは干渉しないかもしれません。

アップデート2 - クリス・ローレンスのコメント@の要求ごととして20170411

、以下では、ホストから、問題を持つネットワーク上のコンテナ内部からipconfig /allです。 @GSAが示唆したように、この時点でコンテナホスト上のファイアウォールはオフになっています。コンテナ内

PS C:> ipconfig/allと

Windows IP Configuration 

    Host Name . . . . . . . . . . . . : d4e9a6d59f93 
    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-53-00-71 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 
    Link-local IPv6 Address . . . . . : fe80::a08a:68b:1c3d:fe6e%5(Preferred) 
    IPv4 Address. . . . . . . . . . . : 172.19.135.4(Preferred) 
    Subnet Mask . . . . . . . . . . . : 255.255.240.0 
    Default Gateway . . . . . . . . . : 172.19.128.1 
    DHCPv6 IAID . . . . . . . . . . . : 83891549 
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-7E-30-BE-00-15-5D-53-00-71 
    DNS Servers . . . . . . . . . . . : 172.19.128.1 
    NetBIOS over Tcpip. . . . . . . . : Disabled 

私は内部のドッキングウィンドウのみ DNSエントリ172.19.128.1があることに気づきます。コンテナのホスト

Windows IP Configuration 

    Host Name . . . . . . . . . . . . : MECDEVASAR03 
    Primary Dns Suffix . . . . . . . : global.sdl.corp 
    Node Type . . . . . . . . . . . . : Hybrid 
    IP Routing Enabled. . . . . . . . : No 
    WINS Proxy Enabled. . . . . . . . : No 
    DNS Suffix Search List. . . . . . : global.sdl.corp 
             sdl.corp 
             maidenhead.sdl.corp 
             sheffield.sdl.corp 
             development.sheffield.sdl.corp 
             irv.languageweaver.com 
             languageweaver.com 
             montreal.sdl.corp 
             singapore.sdl.corp 
             bray.sdl.corp 
             seoul.sdl.corp 
             idiominc.priv 
             sdlproducts.com 
             lan.lon.sdlproducts.com 
             freetranslation.corp 
             xyenterprise.com 
             alterian.com 
             ams.dev 
             sdlntt.corp 

Ethernet adapter vEthernet (HNS Internal NIC): 

    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter 
    Physical Address. . . . . . . . . : 00-15-5D-53-04-CB 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 
    Link-local IPv6 Address . . . . . : fe80::f5c8:e8c7:1ad0:d845%26(Preferred) 
    IPv4 Address. . . . . . . . . . . : 172.19.128.1(Preferred) 
    Subnet Mask . . . . . . . . . . . : 255.255.240.0 
    Default Gateway . . . . . . . . . : 
    DHCPv6 IAID . . . . . . . . . . . : 436213085 
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-AD-0A-F4-18-DB-F2-15-03-E7 
    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 
             fec0:0:0:ffff::2%1 
             fec0:0:0:ffff::3%1 
    NetBIOS over Tcpip. . . . . . . . : Enabled 

Ethernet adapter vEthernet (External Virtual Switch): 

    Connection-specific DNS Suffix . : global.sdl.corp 
    Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2 
    Physical Address. . . . . . . . . : 18-DB-F2-15-03-E7 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 
    Link-local IPv6 Address . . . . . : fe80::5814:8934:3247:a4bf%10(Preferred) 
    IPv4 Address. . . . . . . . . . . : 10.98.5.139(Preferred) 
    Subnet Mask . . . . . . . . . . . : 255.255.0.0 
    Lease Obtained. . . . . . . . . . : Tuesday, 11 April 2017 08:08:21 
    Lease Expires . . . . . . . . . . : Wednesday, 19 April 2017 08:08:20 
    Default Gateway . . . . . . . . . : 10.98.1.1 
    DHCP Server . . . . . . . . . . . : 10.98.3.7 
    DHCPv6 IAID . . . . . . . . . . . : 504945650 
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-AD-0A-F4-18-DB-F2-15-03-E7 
    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 
             fec0:0:0:ffff::2%1 
             fec0:0:0:ffff::3%1 
             10.98.3.7 
             10.98.3.5 
             10.20.3.169 
    Primary WINS Server . . . . . . . : 10.100.3.100 
    NetBIOS over Tcpip. . . . . . . . : Enabled 

Wireless LAN adapter Local Area Connection* 2: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter 
    Physical Address. . . . . . . . . : B8-08-CF-44-25-D9 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 

Ethernet adapter Bluetooth Network Connection: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network) 
    Physical Address. . . . . . . . . : B8-08-CF-44-25-DC 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 

Ethernet adapter vEthernet (Wireless External Virtual Switch): 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : global.sdl.corp 
    Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3 
    Physical Address. . . . . . . . . : B8-08-CF-44-25-D8 
    DHCP Enabled. . . . . . . . . . . : Yes 
    Autoconfiguration Enabled . . . . : Yes 

Tunnel adapter isatap.global.sdl.corp: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : global.sdl.corp 
    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2 
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 
    DHCP Enabled. . . . . . . . . . . : No 
    Autoconfiguration Enabled . . . . : Yes 

Tunnel adapter isatap.{5C890AAE-6E73-44BB-BB1E-DE8EB4794BF8}: 

    Media State . . . . . . . . . . . : Media disconnected 
    Connection-specific DNS Suffix . : 
    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3 
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 
    DHCP Enabled. . . . . . . . . . . : No 
    Autoconfiguration Enabled . . . . : Yes 

アップデート3で

- 問題

私はちょうどWindowsの10クリエイターの更新にアップグレードして突然問題が停止した固定。今のところ、私はWindows Updateを通じて修正された問題を考えています。しかし、似たような問題を抱えている人には、私はアップデートの一週間遅れであり、それが問題ではないと私は信じています。それが再び起こるかどうか見られる。ドッカーサンプルの

+0

ファイアウォールがブロックしていないか確認してください –

+0

どのファイアウォールですか?コンテナの内部かホストの内部(Windows 10)?それがホスト上でブロックされている場合は、他のすべてが動作しているのはなぜですか?また、突然の変化をどう説明しますか?ドッカーはシステム上で何かをやっているのですか?ウィンドウの更新は上書きできますか? –

+0

ホストファイアウォール。多くのものは、それがオンの場合、信頼できないほどうまくいくかもしれません。 –

答えて

0

一つは、あなたがこれを実行するように指示:これはあなたの窓の容器内部のDNSにいくつかの問題に対処することになっている

RUN Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord 

。それがあなたを助けるとは確信していませんが、一発の価値があります。

+0

ありがとうございました。私は現在コンテナで作業していないし、問題は停止する前にしばらく停止していたため、確認できません。しかし、将来の参照や同じ問題に遭遇するかもしれない他の人のために覚えておくことは興味深い示唆です。 –

関連する問題