scope: weave scope doesn`t work behind a proxy

Hi,

I execute weave scope behind our proxy on docker.

The UI is hanging with word in the page “Trying to reconnect”. image

I think it because below log error: test@ubuntu:~/kube/weavescope$ dclo 6055a77b8b3a time=“2018-06-27T06:05:58Z” level=info msg=“publishing to: 127.0.0.1:4040” <probe> INFO: 2018/06/27 06:05:58.261942 command line args: --mode=probe --probe.docker=true <probe> INFO: 2018/06/27 06:05:58.261995 probe starting, version 1.9.0, ID 798650ad12beaf25 <probe> ERRO: 2018/06/27 06:05:58.264117 Error fetching app details: Get http://127.0.0.1:4040/api: dial tcp 127.0.0.1:4040: getsockopt: connection refused <app> INFO: 2018/06/27 06:05:58.275037 app starting, version 1.9.0, ID 656befb6fc536a2b <app> INFO: 2018/06/27 06:05:58.275114 command line args: --mode=app --probe.docker=true <app> INFO: 2018/06/27 06:05:58.279899 listening on :4040 <app> WARN: 2018/06/27 06:05:58.289779 Error updating weaveDNS, backing off 20s: Error running weave ps: exit status 1: “Link not found\n”. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the --weave=false option. <probe> WARN: 2018/06/27 06:05:58.754623 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. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the --weave=false option. <probe> WARN: 2018/06/27 06:05:58.755011 Cannot resolve ‘scope.weave.local.’: dial tcp 172.17.0.1:53: getsockopt: connection refused <probe> ERRO: 2018/06/27 06:05:58.760821 conntrack stderr:NOTICE: Netlink socket buffer size has been set to 8388608 bytes. <probe> WARN: 2018/06/27 06:05:58.766280 Error collecting weave ps, backing off 20s: exit status 1: “Link not found\n”. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the --weave=false option. <probe> INFO: 2018/06/27 06:05:59.267008 Control connection to 127.0.0.1 starting <probe> INFO: 2018/06/27 06:05:59.308211 Publish loop for 127.0.0.1 starting <probe> WARN: 2018/06/27 06:06:08.755302 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. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the --weave=false option. <app> WARN: 2018/06/27 06:06:18.312002 Error updating weaveDNS, backing off 40s: Error running weave ps: exit status 1: “Link not found\n”. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the --weave=false option. <probe> WARN: 2018/06/27 06:06:18.776096 Error collecting weave ps, backing off 40s: exit status 1: “Link not found\n”. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the --weave=false option. <probe> WARN: 2018/06/27 06:06:28.756010 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. If you are not running Weave Net, you may wish to suppress this warning by launching scope with the --weave=false option.

I have add proxy and no_proxy ENV as below in the docker container: bash-4.3# env NO_PROXY=localhost,127.0.0.1 http_proxy=153.88.253.150:8080 https_proxy=153.88.253.150:8080 HTTPS_PROXY=153.88.253.150:8080 no_proxy=localhost,127.0.0.1 HTTP_PROXY=153.88.253.150:8080

Get information busyboxs wget cant support no_proxy env. Do you think in weavescope docker container should package other edition of wget?

Many thanks.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 4
  • Comments: 23 (2 by maintainers)

Most upvoted comments

I lost 12h on this problem.

At the end, the issue was my adblock. I disabled it and worked! Dont forget to test your page in at least 2 browsers and pay attention to the console.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.org/websocket-services: weave-scope-app
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^(/map)$ /map/ permanent;

  name: ingress-weavescope
spec:
  rules:
  - http:
      paths:
      - path: /map(/|$)(.*)
        backend:
          serviceName: weave-scope-app
          servicePort: 80

I want to deploy scope under the subpath of ingress like that:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  namespace: weave
  name: scope-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  tls:
    - hosts:
        - myhost.com
      secretName: myhost.com
  rules:
    - host: myhost.com
      http:
        paths:
          - path: /scope
            backend:
              serviceName: weave-scope-app
              servicePort: 80

But it didn’t work properly.
I thought specify the -app.externalUI to /scope in weave-scope-app can work, but the log told me -app.externalUI was a boolean flag.
What can I do then?