weaveworks / scope

Monitoring, visualisation & management for Docker & Kubernetes
https://www.weave.works/oss/scope/
Apache License 2.0
5.85k stars 709 forks source link

Scope app shows no containers when running in Kitematic #2927

Open squaremo opened 6 years ago

squaremo commented 6 years ago

Running this compose file against Docker running Kitematic in Windows :

scope:
   image: weaveworks/scope:1.6.4
   ports:
     - "0.0.0.0:4040:4040"
   network_mode: "host"
   pid: "host"
   privileged: true
   labels:
     - "works.weave.role=system"
   volumes:
     - "/var/run/docker.sock:/var/run/docker.sock:rw"
   command:
     - "--probe.docker=true"

The initial log is:

<app> INFO: 2017/11/08 10:18:10.648930 app starting, version 893537ca, ID 2049a7265109a5c4
time="2017-11-08T10:18:10Z" level=info msg="publishing to: 127.0.0.1:4040" 
<app> INFO: 2017/11/08 10:18:10.675344 command line args: --mode=app --probe.docker=true
<probe> INFO: 2017/11/08 10:18:10.675493 command line args: --mode=probe --probe.docker=true
<probe> INFO: 2017/11/08 10:18:10.675628 probe starting, version 893537ca, ID 7cb385a94120467a
<app> INFO: 2017/11/08 10:18:10.679796 listening on :4040
<probe> ERRO: 2017/11/08 10:18:10.679829 Error fetching app details: Get http://127.0.0.1:4040/api: dial tcp 127.0.0.1:4040: getsockopt: connection refused
<probe> WARN: 2017/11/08 10:18:10.743570 Error setting up the eBPF tracker, falling back to proc scanning: cannot open kprobe_events: open /sys/kernel/debug/tracing/kprobe_events: no such file or directory
<probe> ERRO: 2017/11/08 10:18:10.759054 Docker: problem with bridge docker0: route ip+net: no such network interface
<probe> ERRO: 2017/11/08 10:18:10.759540 Error getting docker bridge ip: route ip+net: no such network interface
<probe> ERRO: 2017/11/08 10:18:10.759589 plugins: problem loading: no such file or directory
<probe> ERRO: 2017/11/08 10:18:10.777999 conntrack stderr:NOTICE: Netlink socket buffer size has been set to 8388608 bytes.
<probe> WARN: 2017/11/08 10:18:10.778233 Error collecting weave status, backing off 10s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: getsockopt: connection refused
<probe> ERRO: 2017/11/08 10:18:10.781123 conntrack stderr:NOTICE: Netlink socket buffer size has been set to 8388608 bytes.
<app> WARN: 2017/11/08 10:18:10.817069 Error updating weaveDNS, backing off 20s: Error running weave ps: exit status 1: "Link not found\n"
<probe> WARN: 2017/11/08 10:18:10.817394 Error collecting weave ps, backing off 20s: exit status 1: "Link not found\n"
<probe> INFO: 2017/11/08 10:18:11.699627 Control connection to 127.0.0.1 starting
<probe> INFO: 2017/11/08 10:18:13.788245 Publish loop for 127.0.0.1 starting
<probe> WARN: 2017/11/08 10:18:20.785522 Error collecting weave status, backing off 20s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: getsockopt: connection refused
<app> WARN: 2017/11/08 10:18:30.848118 Error updating weaveDNS, backing off 40s: Error running weave ps: exit status 1: "Link not found\n"
<probe> WARN: 2017/11/08 10:18:30.864519 Error collecting weave ps, backing off 40s: exit status 1: "Link not found\n"
<probe> WARN: 2017/11/08 10:18:40.796235 Error collecting weave status, backing off 40s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: getsockopt: connection refused
<probe> INFO: 2017/11/08 10:19:49.301156 Pipe pipe-5708408872963668930 connection to 127.0.0.1 starting
<probe> INFO: 2017/11/08 10:19:52.204199 Pipe pipe-5708408872963668930 connection to 127.0.0.1 exiting

and the Scope app does not show any containers.

Removing network: ["host"] from the compose file results in an app that shows containers.

Sharing the /var/run/docker.sock in Kitematic breaks it again.

Before sharing: 1

After sharing: 2

rade commented 6 years ago

It looks like the underlying problem here is

Docker: problem with bridge docker0: route ip+net: no such network interface
Error getting docker bridge ip: route ip+net: no such network interface

which likely comes from net.InterfaceByName.

pdrcastro commented 5 years ago

hi @rade ,

I have Kubernetes cluster in AWS using EKS version 1.11. I am trying to deploy weave scope but i ma getting several errors.

`time="2019-05-23T13:18:02Z" level=info msg="publishing to: weave-scope-app.weave.svc.cluster.local:80"

INFO: 2019/05/23 13:18:02.894971 Basic authentication disabled INFO: 2019/05/23 13:18:02.906471 command line args: --mode=probe --probe-only=true --probe.docker=true --probe.docker.bridge=docker0 --probe.kubernetes.role=host weave-scope-app.weave.svc.cluster.local:80 INFO: 2019/05/23 13:18:02.906524 probe starting, version 1.11.0, ID 70680dd0d0b73cb8 ERRO: 2019/05/23 13:18:02.907837 Error getting docker bridge ip: route ip+net: no such network interface INFO: 2019/05/23 13:18:02.922468 Control connection to weave-scope-app.weave.svc.cluster.local starting WARN: 2019/05/23 13:18:03.199107 Error collecting weave status, backing off 10s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: connect: connection refused. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the `--weave=false` option. INFO: 2019/05/23 13:18:03.214804 Publish loop for weave-scope-app.weave.svc.cluster.local starting WARN: 2019/05/23 13:18:13.199534 Error collecting weave status, backing off 20s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: connect: connection refused. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the `--weave=false` option. WARN: 2019/05/23 13:18:33.199926 Error collecting weave status, backing off 40s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: connect: connection refused. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the `--weave=false` option.` I open a issue #3616 Someone can help me. Thanks.