adding more diagnostic info:
PS > docker stack services app1stack
ID NAME MODE REPLICAS IMAGE PORTS
c0bdvuccpde9 app1stack_db replicated 1/1 mongo:latest
ngv38tj5mpof app1stack_web replicated 1/1 microsoft/iis:latest *:80->80/tcp
PS > ping app1stack_web
Ping request could not find host app1stack_web. Please check the name and try again.
PS > iwr http://localhost -UseBasicParsing
iwr : Unable to connect to the remote server
At line:1 char:1
- iwr http://localhost -UseBasicParsing
-
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS > docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b50429f850cc mongo:latest “mongod” 10 minutes ago Up 9 minutes 27017/tcp app1stack_db.1.xylm7wgweyjlv5vwgl3ukxv7q
b5edbc4fc432 microsoft/iis:latest “C:\ServiceMonitor…” 12 minutes ago Up 12 minutes 80/tcp app1stack_web.1.qpmtx7knk6m5n9msgo9jex8jv
8dfd1e2d1455 docker/ucp-agent-win:2.2.3 “/bin/ucp-agent.ex…” 33 hours ago Up 2 hours 0.0.0.0:12376->2376/tcp ucp-proxy
PS > docker exec b5edbc4fc432 ping app1stack_db
Pinging app1stack_db [10.0.0.2] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PS > docker exec b5edbc4fc432 ping b50429f850cc
Pinging b50429f850cc [10.0.0.3] with 32 bytes of data:
Reply from 10.0.0.3: bytes=32 time<1ms TTL=128
Reply from 10.0.0.3: bytes=32 time<1ms TTL=128
Reply from 10.0.0.3: bytes=32 time<1ms TTL=128
Reply from 10.0.0.3: bytes=32 time<1ms TTL=128
Ping statistics for 10.0.0.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PS > docker service inspect app1stack_web
[
{
“ID”: “ngv38tj5mpofy9tcwwlqlqdtn”,
“Version”: {
“Index”: 805
},
“CreatedAt”: “2017-10-09T13:37:50.2881996Z”,
“UpdatedAt”: “2017-10-09T13:39:04.6215664Z”,
“Spec”: {
“Name”: “app1stack_web”,
“Labels”: {
“com.docker.stack.image”: “microsoft/iis”,
“com.docker.stack.namespace”: “app1stack”
},
“TaskTemplate”: {
“ContainerSpec”: {
“Image”: “microsoft/iis:latest@sha256:868bca7e89e1743792e15f78edb5a73070ef44eae6807dc3f05f9b94c23943d5”,
“Labels”: {
“com.docker.stack.namespace”: “app1stack”
},
“Privileges”: {
“CredentialSpec”: null,
“SELinuxContext”: null
},
“StopGracePeriod”: 10000000000,
“DNSConfig”: {}
},
“Resources”: {},
“RestartPolicy”: {
“Condition”: “any”,
“Delay”: 5000000000,
“MaxAttempts”: 0
},
“Placement”: {
“Platforms”: [
{
“Architecture”: “amd64”,
“OS”: “windows”
}
]
},
“Networks”: [
{
“Target”: “053w1jawq9ic5apxwcqy1rl2b”,
“Aliases”: [
“web”
]
}
],
“ForceUpdate”: 0,
“Runtime”: “container”
},
“Mode”: {
“Replicated”: {
“Replicas”: 1
}
},
“UpdateConfig”: {
“Parallelism”: 1,
“FailureAction”: “pause”,
“Monitor”: 5000000000,
“MaxFailureRatio”: 0,
“Order”: “stop-first”
},
“RollbackConfig”: {
“Parallelism”: 1,
“FailureAction”: “pause”,
“Monitor”: 5000000000,
“MaxFailureRatio”: 0,
“Order”: “stop-first”
},
“EndpointSpec”: {
“Mode”: “vip”,
“Ports”: [
{
“Protocol”: “tcp”,
“TargetPort”: 80,
“PublishedPort”: 80,
“PublishMode”: “ingress”
}
]
}
},
“Endpoint”: {
“Spec”: {
“Mode”: “vip”,
“Ports”: [
{
“Protocol”: “tcp”,
“TargetPort”: 80,
“PublishedPort”: 80,
“PublishMode”: “ingress”
}
]
},
“Ports”: [
{
“Protocol”: “tcp”,
“TargetPort”: 80,
“PublishedPort”: 80,
“PublishMode”: “ingress”
}
],
“VirtualIPs”: [
{
“NetworkID”: “pytj7xgaf7zig7ugx0f7qqly3”,
“Addr”: “10.255.0.4/16”
},
{
“NetworkID”: “053w1jawq9ic5apxwcqy1rl2b”,
“Addr”: “10.0.0.4/24”
}
]
}
}
]
PS > docker service inspect app1stack_db
[
{
“ID”: “c0bdvuccpde9dmmjxv0b2iaqb”,
“Version”: {
“Index”: 805
},
“CreatedAt”: “2017-10-09T13:37:47.6728508Z”,
“UpdatedAt”: “2017-10-09T13:39:04.6215664Z”,
“Spec”: {
“Name”: “app1stack_db”,
“Labels”: {
“com.docker.stack.image”: “mongo”,
“com.docker.stack.namespace”: “app1stack”
},
“TaskTemplate”: {
“ContainerSpec”: {
“Image”: “mongo:latest@sha256:bb962ca3964c70069e652e814f7a495db19643ecb5bb62d799f621a68f4da90c”,
“Labels”: {
“com.docker.stack.namespace”: “app1stack”
},
“Privileges”: {
“CredentialSpec”: null,
“SELinuxContext”: null
},
“StopGracePeriod”: 10000000000,
“DNSConfig”: {}
},
“Resources”: {},
“RestartPolicy”: {
“Condition”: “any”,
“Delay”: 5000000000,
“MaxAttempts”: 0
},
“Placement”: {
“Platforms”: [
{
“Architecture”: “amd64”,
“OS”: “linux”
},
{
“Architecture”: “amd64”,
“OS”: “windows”
}
]
},
“Networks”: [
{
“Target”: “053w1jawq9ic5apxwcqy1rl2b”,
“Aliases”: [
“mymongodb”,
“db”
]
}
],
“ForceUpdate”: 0,
“Runtime”: “container”
},
“Mode”: {
“Replicated”: {
“Replicas”: 1
}
},
“UpdateConfig”: {
“Parallelism”: 1,
“FailureAction”: “pause”,
“Monitor”: 5000000000,
“MaxFailureRatio”: 0,
“Order”: “stop-first”
},
“RollbackConfig”: {
“Parallelism”: 1,
“FailureAction”: “pause”,
“Monitor”: 5000000000,
“MaxFailureRatio”: 0,
“Order”: “stop-first”
},
“EndpointSpec”: {
“Mode”: “vip”
}
},
“Endpoint”: {
“Spec”: {
“Mode”: “vip”
},
“VirtualIPs”: [
{
“NetworkID”: “053w1jawq9ic5apxwcqy1rl2b”,
“Addr”: “10.0.0.2/24”
}
]
}
}
]
PS >