sixeyed / whoami-dotnet

Who am I? - .NET Core style
MIT License
1 stars 0 forks source link

WinServer 2019 #1

Open cphillips83 opened 4 years ago

cphillips83 commented 4 years ago

I was following along https://blog.sixeyed.com/getting-started-with-docker-on-windows-server-2019/ and everything worked like a charm up to the replicas part. I have been googling this for hours trying to find out what could be wrong.

I tried init'ing the swarm on the 127.0.0.1 and its network IP. I have tried using the interface instead of the IP. I have tried whoami-dotnet:3.0 I have tried IPs, localhost, hostname, etc. Firewall is disabled.

No matter what I do I can not connect to any of the replicas through ingress from neither public, VPN or local.

I'm running latest 2019 standard 1809 17763.973 and all updated applied. Docker 19.03.5 build 2ee0c57608

Yes I switched to 8080 because a single container without swarm worked over 8080 and was trying to eliminate possibilities.

Here is a dump of the setup, the only thing I find strange is, should there still be ports exposed under ps -a that ingress is routing to?

PS C:\Users\Administrator> docker service ls
ID                  NAME                    MODE                REPLICAS            IMAGE                       PORTS
3ijpaulomu4l        wonderful_ardinghelli   replicated          5/5                 sixeyed/whoami-dotnet:3.0   *:8080->80/tcp
PS C:\Users\Administrator> docker node ls
ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
q6f5v8utd9cujomfd818kpczs *   WIN-SNOHFD6K111     Ready               Active              Leader              19.03.5
PS C:\Users\Administrator> docker ps -a
CONTAINER ID        IMAGE                       COMMAND               CREATED             STATUS                               PORTS               NAMES
efe173ad51be        sixeyed/whoami-dotnet:3.0   "dotnet whoami.dll"   7 minutes ago       Up 7 minutes                                             wonderful_ardinghelli.1.rngqkm08v2he02kudluja6684
1c774433d096        sixeyed/whoami-dotnet:3.0   "dotnet whoami.dll"   7 minutes ago       Up 7 minutes                                             wonderful_ardinghelli.2.l8edmb754j2kw1dryrelm0yvq
37b17cf2421c        sixeyed/whoami-dotnet:3.0   "dotnet whoami.dll"   7 minutes ago       Up 7 minutes                                             wonderful_ardinghelli.4.slde16a3e58wty8xuybzflqt2
866103370c98        sixeyed/whoami-dotnet:3.0   "dotnet whoami.dll"   7 minutes ago       Up 7 minutes                                             wonderful_ardinghelli.5.1pz9qzmz61trnhqyqip77joaw
9c7491339bea        sixeyed/whoami-dotnet:3.0   "dotnet whoami.dll"   7 minutes ago       Up 7 minutes                                             wonderful_ardinghelli.3.s2aeh5x2aymis5i3mhuggjh1v
2e3ed1f495d6        sixeyed/whoami-dotnet:3.0   "dotnet whoami.dll"   2 hours ago         Exited (3221225786) 54 minutes ago                       intelligent_ellis
PS C:\Users\Administrator> docker network inspect ingress
[
    {
        "Name": "ingress",
        "Id": "glr5eywx4bgjc6ji953numv6j",
        "Created": "2020-01-22T14:41:29.4968326-08:00",
        "Scope": "swarm",
        "Driver": "overlay",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "10.0.0.0/24",
                    "Gateway": "10.0.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": true,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "1c774433d096c17c1d3c3b5544e2d41e59e68c70cc64b1b9c8483215ff65eced": {
                "Name": "wonderful_ardinghelli.2.l8edmb754j2kw1dryrelm0yvq",
                "EndpointID": "933a3f5b6153b2ccec5460ae4a30764209e5bc654dd9f4d245a91f76ba79239a",
                "MacAddress": "00:15:5d:49:df:b3",
                "IPv4Address": "10.0.0.5/24",
                "IPv6Address": ""
            },
            "37b17cf2421c1db5372d30b318c4cec7ca439eb504fe88f65c4b1f8790b09958": {
                "Name": "wonderful_ardinghelli.4.slde16a3e58wty8xuybzflqt2",
                "EndpointID": "b7f3ce0be5b2da77b09d63dfd3b67020581191227be052beb15afe9ff9417927",
                "MacAddress": "00:15:5d:49:d4:ae",
                "IPv4Address": "10.0.0.7/24",
                "IPv6Address": ""
            },
            "866103370c98ad349292a1647424aea3176328f2745a2ee8efc8831fd64cba98": {
                "Name": "wonderful_ardinghelli.5.1pz9qzmz61trnhqyqip77joaw",
                "EndpointID": "6b3329016d09e848f9b2b499939a586a17fc02c125cdfa09dcc37b734329dd70",
                "MacAddress": "00:15:5d:49:d5:39",
                "IPv4Address": "10.0.0.8/24",
                "IPv6Address": ""
            },
            "9c7491339bea56ad01680e6451dd58a1a18e3baa403d6ed374397a86983c5c96": {
                "Name": "wonderful_ardinghelli.3.s2aeh5x2aymis5i3mhuggjh1v",
                "EndpointID": "ef1044d83b9a1b98d451a06e286ce964b82417b415545a9861ee445cda7ffb45",
                "MacAddress": "00:15:5d:49:dd:71",
                "IPv4Address": "10.0.0.6/24",
                "IPv6Address": ""
            },
            "efe173ad51be6b802700aefcc235c6b1ee895846c7affefa9bd90ee902788cd3": {
                "Name": "wonderful_ardinghelli.1.rngqkm08v2he02kudluja6684",
                "EndpointID": "463248c7f43d8ff6633d25b98617d4affffb9f50093536bde2ef089d8049af44",
                "MacAddress": "00:15:5d:49:de:9f",
                "IPv4Address": "10.0.0.4/24",
                "IPv6Address": ""
            },
            "ingress-sbox": {
                "Name": "ingress-endpoint",
                "EndpointID": "8855db38abd7e60536c2c60ab63de94ba33273332f961555ca9edb2e257807f3",
                "MacAddress": "00:15:5d:49:d8:63",
                "IPv4Address": "10.0.0.2/24",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.driver.overlay.vxlanid_list": "4096",
            "com.docker.network.windowsshim.hnsid": "2B170FCD-27CF-4860-806D-BEC013BC3E45"
        },
        "Labels": {},
        "Peers": [
            {
                "Name": "8cb5c83cd564",
                "IP": "127.0.0.1"
            }
        ]
    }
]
PS C:\Users\Administrator> ipconfig

Windows IP Configuration

Ethernet adapter NIC2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : example.com

Ethernet adapter NIC1:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::4d78:c833:dea:85dd%5
   IPv4 Address. . . . . . . . . . . : 10.100.222.193
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.100.222.5

Ethernet adapter vEthernet (Ethernet):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::9f7:562a:5ef1:e864%16
   IPv4 Address. . . . . . . . . . . : 169.254.0.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (nat):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::5152:9419:1112:a2be%20
   IPv4 Address. . . . . . . . . . . : 172.21.48.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :
cphillips83 commented 4 years ago

Well after trying tons more things like create my own overlay networks and disable NICs and who knows what else, it is now working externally, but will not work locally via IP/HOST/LOCALHOST.