dockersamples/docker-swarm-visualizer

Not showing anything

eoli3n opened this issue · 4 comments

Description
When i start viz service, and access to localhost:8080, it just run without end and print nothing.

Steps to reproduce the issue, if relevant:

root@tspeda-swarm-manager1:~/infra-docker-swarm/swarm-visualizer# docker node ls
ID                            HOSTNAME                STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
o6uj4aowtwvb2c01wx9uqkp55 *   tspeda-swarm-manager1   Ready               Active              Leader              19.03.5
ixumejo17osiyuqpvsy1y2537     tspeda-swarm-worker1    Ready               Active                                  19.03.5
fg1r0xrbhr9fmemx6u8tf8diz     tspeda-swarm-worker2    Ready               Active                                  19.03.5
root@tspeda-swarm-manager1:~/infra-docker-swarm/swarm-visualizer# docker service create \
>   --name=viz \
>   --publish=8080:8080/tcp \
>   --constraint=node.role==manager \
>   --mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
>   dockersamples/visualizer
uhcy84krr14t8hlp79zterh96
overall progress: 1 out of 1 tasks 
1/1: running   [==================================================>] 
verify: Service converged 
root@tspeda-swarm-manager1:~/infra-docker-swarm/swarm-visualizer# docker service logs 
elk_es-master1  elk_es-master2  elk_es-master3  elk_kibana      elk_logstash    viz             
root@tspeda-swarm-manager1:~/infra-docker-swarm/swarm-visualizer# docker service logs viz 
viz.1.pqghicp061dg@tspeda-swarm-manager1    | > swarmVisualizer@0.0.1 start /app
viz.1.pqghicp061dg@tspeda-swarm-manager1    | > node server.js

Describe the results you received:

root@tspeda-swarm-manager1:~/infra-docker-swarm/swarm-visualizer# nc -vz localhost 8080
localhost [127.0.0.1] 8080 (http-alt) open
root@tspeda-swarm-manager1:~/infra-docker-swarm/swarm-visualizer# LANG=C wget http://localhost:8080
--2019-12-13 09:29:45--  http://localhost:8080/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response... 

Describe the results you expected:
Any answer from the server

Output of docker version:

Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:25:38 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:24:09 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker info:

Client:
 Debug Mode: false

Server:
 Containers: 5
  Running: 3
  Paused: 0
  Stopped: 2
 Images: 6
 Server Version: 19.03.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: journald
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: o6uj4aowtwvb2c01wx9uqkp55
  Is Manager: true
  ClusterID: en5z1k445f3tn07hir8sz9hpl
  Managers: 1
  Nodes: 3
  Default Address Pool: 10.0.0.0/8  
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 162.38.60.60
  Manager Addresses:
   162.38.60.60:2377
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.19.0-6-amd64
 Operating System: Debian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 7.749GiB
 Name: tspeda-swarm-manager1
 ID: TOTE:LPTO:HBYI:35QZ:QPBI:F5B6:Y35I:LAOQ:3CN2:7H72:YNIW:7JPY
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

I confirmed that on 3 different swarms. It works well with docker run cmd but not with docker service one.

Late response, but do you get a response by hitting http://0.0.0.0:8080? I ran into the same issue and think it may be related to this ipv6 issue with Swarm.

@eoli3n
Your browser seems to have chosen the IPv6 localhost.
And Docker Swarm still doesn't work with IPv6.
Try http://127.0.0.1:8080

Looks like this issue isn't related to this image. Indeed, on certain linux system "localhost" points to ::1 IPv6 so you'll need to point to 127.0.0.1. I'll close this issue for now.