alexellis / alexellis/swarmmode-tests
arm-alpinehello: curl service:port gets stuck
- 主要言語
- JavaScript
- スター
- 55
- フォーク
- 20
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi @alexellis
First of all, thanks for putting all of this together... That's definitely an amazing job! I'm building my own Raspberry PI cluster for Demos as well here in San Diego...
So, I'm building the second scenario for the web test... Curl gets stuck even though PORT `3000` is bound on the host after starting a service. I built an image based on yours that shows the container ID during bootstrap and when we curl it. The service starts all the swarm workers but does not respond when I curl in the assigned port. Nothing returns...
```
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ sudo lsof -i :3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dockerd 447 root 12u IPv6 646053 0t0 TCP *:3000 (LISTEN)
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ curl localhost:3000
```
Setup
======
Built Image: Show container ID
-----
* Built new image to show the container ID and pushed to my hub's account in case you want to verify.
```
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ docker tag arm-alpinehello marcellodsales/swarmmode-tests:arm-alpinehello
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ docker push marcellodsales/swarmmode-tests:arm-alpinehello
```
Running the container locally works
-----
```
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ docker run -ti -p 8800:3000 arm-alpinehello
> hello@1.0.0 start /root
> node index.js
I'm listening from aa64f2e6e8f8
```
* Curl the container
```
HypriotOS/armv7: pirate@pimanager in ~
$ curl localhost:8800
Hello... I am aa64f2e6e8f8
```
Docker Service - curl Swarm in cluster gets stuck
=========
* Created a new service
```
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ docker service create --name hello1 --publish 3000:3000 --replicas=4 --constraint 'node.role != manager' marcellodesales/swarmmode-tests:arm-alpinehello
2o3wioznayggqjmsujq9v0jzz
```

* All services are running
```
$ docker service ls
ID NAME REPLICAS IMAGE COMMAND
2o3wioznaygg hello1 4/4 marcellodesales/swarmmode-tests:arm-alpinehello
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ docker service ps hello1
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
7sfsdwvfmdrpfuxgu6jy8fy8q hello1.1 marcellodesales/swarmmode-tests:arm-alpinehello pi1 Running Running 9 minutes ago
9qqwztah6mhkds3opcieltc8q hello1.2 marcellodesales/swarmmode-tests:arm-alpinehello pi6 Running Running 9 minutes ago
ac660ksernqp3v77lifci3xrf hello1.3 marcellodesales/swarmmode-tests:arm-alpinehello pi2 Running Running 9 minutes ago
acst6eo351ny1tb0x80z4ye36 hello1.4 marcellodesales/swarmmode-tests:arm-alpinehello pi5 Running Running 9 minutes ago
```
* Inspect
```
$ docker service inspect hello1
[
{
"ID": "2o3wioznayggqjmsujq9v0jzz",
"Version": {
"Index": 3062
},
"CreatedAt": "2016-11-02T16:06:50.874712696Z",
"UpdatedAt": "2016-11-02T16:16:54.40703003Z",
"Spec": {
"Name": "hello1",
"TaskTemplate": {
"ContainerSpec": {
"Image": "marcellodesales/swarmmode-tests:arm-alpinehello"
},
"Resources": {
"Limits": {},
"Reservations": {}
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
},
"Placement": {
"Constraints": [
"node.role != manager"
]
}
},
"Mode": {
"Replicated": {
"Replicas": 4
}
},
"UpdateConfig": {
"Parallelism": 1,
"FailureAction": "pause"
},
"EndpointSpec": {
"Mode": "vip",
"Ports": [
{
"Protocol": "tcp",
"TargetPort": 3000,
"PublishedPort": 3000
}
]
}
},
"Endpoint": {
"Spec": {
"Mode": "vip",
"Ports": [
{
"Protocol": "tcp",
"TargetPort": 3000,
"PublishedPort": 3000
}
]
},
"Ports": [
{
"Protocol": "tcp",
"TargetPort": 3000,
"PublishedPort": 3000
}
],
"VirtualIPs": [
{
"NetworkID": "cmwweoiyu8ojhxsenug4s0uj9",
"Addr": "10.255.0.9/16"
}
]
},
"UpdateStatus": {
"StartedAt": "0001-01-01T00:00:00Z",
"CompletedAt": "0001-01-01T00:00:00Z"
}
}
]
```
The overlay network is there...
```
$ docker network ls
NETWORK ID NAME DRIVER SCOPE
58aeb3ff08fe bridge bridge local
cbe39b4c1bf2 docker_gwbridge bridge local
78ce6c5f5693 host host local
cmwweoiyu8oj ingress overlay swarm
cc3b9dab3ab5 none null local
745b81768d0a pirate_default bridge local
```
Worker Container Logs
----
Here's the container logs for a given worker of this service.
```
HypriotOS/armv7: pirate@pi1 in ~
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a6fc7622db1e marcellodesales/swarmmode-tests:arm-alpinehello "npm start" 30 minutes ago Up 30 minutes 3000/tcp hello1.1.7sfsdwvfmdrpfuxgu6jy8fy8q
HypriotOS/armv7: pirate@pi6 in ~
$ docker logs c4c527961338
> hello@1.0.0 start /root
> node index.js
I'm listening from c4c527961338
```
Host info
=====
* uname
```
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ uname -a
Linux pimanager 4.4.24-hypriotos-v7+ #1 SMP PREEMPT Tue Oct 11 17:15:58 UTC 2016 armv7l GNU/Linux
```
* docker info
```
HypriotOS/armv7: pirate@pimanager in ~/swarmmode-tests/arm/arm-alpinehello on master*
$ docker info
Containers: 7
Running: 1
Paused: 0
Stopped: 6
Images: 26
Server Version: 1.12.2
Storage Driver: overlay
Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: overlay bridge host null
Swarm: active
NodeID: e6ul9drjqhtwfdcdv05p20duk
Is Manager: true
ClusterID: c2asemc2yxv3c88is69tgyxlk
Managers: 1
Nodes: 7
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.1.64
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.4.24-hypriotos-v7+
Operating System: Raspbian GNU/Linux 8 (jessie)
OSType: linux
Architecture: armv7l
CPUs: 4
Total Memory: 862 MiB
Name: pimanager
ID: MLM6:5GBI:OPZK:BXX5:HZGF:4N4E:7IW4:EUIR:G7EH:TRPF:YTQW:PVZC
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: marcellodesales
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。