swarm-dashboard icon indicating copy to clipboard operation
swarm-dashboard copied to clipboard

Expecting an object VirtualIPs but instead got Spec

Open aroundthecode opened this issue 8 years ago • 6 comments

I've run the service in my local swarm (docker 4 Mac) and it works perfectly

Client: Version: 17.06.1-ce API version: 1.30 Go version: go1.8.3 Git commit: 874a737 Built: Thu Aug 17 22:53:38 2017 OS/Arch: darwin/amd64

Server: Version: 17.06.1-ce API version: 1.30 (minimum version 1.12) Go version: go1.8.3 Git commit: 874a737 Built: Thu Aug 17 22:54:55 2017 OS/Arch: linux/amd64 Experimental: true

But when I deploy the same on my online swarm cluster

Client: Version: 17.06.0-ce API version: 1.30 Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:20:36 2017 OS/Arch: linux/amd64

Server: Version: 17.06.0-ce API version: 1.30 (minimum version 1.12) Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:21:56 2017 OS/Arch: linux/amd64 Experimental: false

the dashboard only shows me the error:

Expecting an object with a field named VirtualIPs at _.services[8].Endpoint but instead got: {"Spec":{}}

Since they run the same API version (both > 1.29) I'm quite puzzled, can you provide any hint ? thanks in advance

aroundthecode avatar Sep 13 '17 08:09 aroundthecode

I'm also seeing the same thing. Docker 17.06.1-ce

killcity avatar Sep 14 '17 04:09 killcity

Yes, the same for me. 17.05.0-ce

srigaux avatar Oct 16 '17 13:10 srigaux

This happens when services are running that are not attached to any swarm network. As a workaround, you can just make sure that every service uses at least one network, but ideally it should be able to handle that situation.

jamesmcdonald avatar Oct 19 '17 08:10 jamesmcdonald

Hi, you can use this stack.yml file. It's work for my swarm cluster.

version: "3.2"

services:
  dashboard:
    image: charypar/swarm-dashboard
    privileged: true
    volumes:
      - type: bind
        source: "/var/run/docker.sock"
        target: "/var/run/docker.sock"
    ports:
      - 8080:8080
    environment:
      PORT: 8080
    deploy:
      replicas: 1
      placement:
        constraints:
          - node.role == manager

satishsverma avatar Oct 26 '17 07:10 satishsverma

This also happens if you use dnsrr instead of vip.

stevenklar avatar Feb 16 '18 12:02 stevenklar

As @stevenklar mentioned, this also happens when using endpoint_mode: dnsrr. Not sure why we don't get any virtual IP's when we inspect (I still use a network, so I should get one, right?), but maybe we shouldn't crash if we don't have one. Sure, we can't show the network connection in the dashboard, but I guess it's better than crashing?

anton-johansson avatar Oct 19 '18 16:10 anton-johansson