Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weave Scope queries repeatedly for DNS name "true" #2142

Closed
bergtwvd opened this issue Jan 20, 2017 · 9 comments
Closed

Weave Scope queries repeatedly for DNS name "true" #2142

bergtwvd opened this issue Jan 20, 2017 · 9 comments
Assignees
Labels
bug Broken end user or developer functionality; not working as the developers intended it component/docs A documentation issue
Milestone

Comments

@bergtwvd
Copy link

bergtwvd commented Jan 20, 2017

I start Weave Scope as per instructions on https://www.weave.works/documentation/scope-latest-installing with:

version: '2'

services:
 scope:
  image: weaveworks/scope
  command:
  - "--probe.docker"
  - "true"
  privileged: true
  container_name: weavescope
  network_mode: "host"
  pid: "host"
  volumes:
  - /var/run/docker.sock:/var/run/docker.sock
  restart: always

When I do sudo tcpdump -v port 53 -i eth0 I see the following DNS messages.

13:28:40.762241 IP (tos 0x0, ttl 64, id 56717, offset 0, flags [DF], proto UDP (17), length 57)
    xxxx.51772 > yyyy: 23616+ AAAA? true.tno.nl. (29)
13:28:40.762319 IP (tos 0x0, ttl 64, id 56718, offset 0, flags [DF], proto UDP (17), length 57)
    xxxx.49673 > yyyy: 63954+ A? true.tno.nl. (29)
13:28:40.764365 IP (tos 0x0, ttl 125, id 17841, offset 0, flags [none], proto UDP (17), length 122)
    yyyy > xxxx.49673: 63954 NXDomain 0/1/0 (94)
13:28:40.764393 IP (tos 0x0, ttl 125, id 17842, offset 0, flags [none], proto UDP (17), length 122)
    yyyy > xxxxl.51772: 23616 NXDomain 0/1/0 (94)
13:28:40.764588 IP (tos 0x0, ttl 64, id 56719, offset 0, flags [DF], proto UDP (17), length 50)
    xxxx.49528 > yyyy: 26105+ AAAA? true. (22)
13:28:40.765360 IP (tos 0x0, ttl 64, id 56720, offset 0, flags [DF], proto UDP (17), length 50)
    xxxx.50258 > yyyy: 22506+ A? true. (22)
13:28:40.770368 IP (tos 0x0, ttl 125, id 17845, offset 0, flags [none], proto UDP (17), length 50)
    yyyy > xxxx.49528: 26105 ServFail 0/0/0 (22)
....

My company's DNS server is "bombarded" with these DNS queries, because this goes on forever.

How can thsi be resolved?
What is the meaning of the option "true" in the container command?

@2opremio
Copy link
Contributor

Our bad, it should be "--probe.docker=true", in a single line.

I will make sure this is fixed.

@bergtwvd
Copy link
Author

bergtwvd commented Jan 20, 2017

Ok, that is clarified 👍

Related question - while on topic - : how can a list of hostnames be passed into scope (i.e. where peer scope instances run) ? And/or will scope discover these itself in case Weave networking is used?

@2opremio
Copy link
Contributor

how can a list of hostnames be passed into scope (i.e. where peer scope instances run) ?

I am not sure I understand what you mean. Can you please clarify?

will scope discover these itself in case Weave networking is used.

Yes, it will

@rade rade added the bug Broken end user or developer functionality; not working as the developers intended it label Jan 20, 2017
@bergtwvd
Copy link
Author

In scope launch I can add a list of IP addresses. Where can I put that list in the Compose file?

@bergtwvd
Copy link
Author

I see that the issue is closed, but still some follow up:

I still see that scope repeatedly queries the DNS server (roughly every 10s) for the hostnames I provided in the compose file. Doesn't scope cache the IP addresses, so it only has to query once?

Compose file:

services:
 scope:
  image: weaveworks/scope
  command: --probe.docker=true app-docker01 app-docker02 app-docker03 app-docker04 app-docker05
  privileged: true
  container_name: weavescope
  network_mode: "host"
  pid: "host"
  volumes:
  - /var/run/docker.sock:/var/run/docker.sock
  restart: always

@2opremio
Copy link
Contributor

In scope launch I can add a list of IP addresses. Where can I put that list in the Compose file?

At the end of the command section (where "true" was incorrectly placed)

version: '2'

services:
 scope:
  image: weaveworks/scope
  command:
  - "--probe.docker=true"
  - <target1>
  - <target2>
  - <target3>
  privileged: true
  container_name: weavescope
  network_mode: "host"
  pid: "host"
  volumes:
  - /var/run/docker.sock:/var/run/docker.sock
  restart: always

Doesn't scope cache the IP addresses, so it only has to query once?

Querying repeatedly is intentional. 10s seems reasonable, why is that a problem?

@bergtwvd
Copy link
Author

It eats away some CPU time and networking comms, which is not needed if you would cache the IP address after the first query. Hosts won't change IP address that quickly.

And my company's system admin was actually complaining :-).

@2opremio
Copy link
Contributor

2opremio commented Jan 23, 2017

It eats away some CPU time and networking comms

That should be negligible

And my company's system admin was actually complaining

What was the complaint exactly? Was he annoyed by the traffic?

@bergtwvd
Copy link
Author

Yep :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken end user or developer functionality; not working as the developers intended it component/docs A documentation issue
Projects
None yet
Development

No branches or pull requests

3 participants