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

Scope doesn't see connections between the pyapp and goapp in the example #111

Closed
tomwilkie opened this issue May 26, 2015 · 13 comments
Closed
Assignees

Comments

@tomwilkie
Copy link
Contributor

I'm thinking this is because http keep alive isn't being honoured or something. But connections are definitely going through.

@peterbourgon
Copy link
Contributor

  • pyapp calls out to goapp?
  • where do the curls come in to play?

@tomwilkie
Copy link
Contributor Author

pyapp calls out to goapp?

yes; it goes:

curl -> pyapp --> goapp -> elasticsearch
              |
              --> qotd -> internet   
              |
              --> redis

because...

@tomwilkie
Copy link
Contributor Author

I've seen it connect occasionally, which leads me to think its that the requests are just too quick.

@peterbourgon
Copy link
Contributor

Did you try tweaking the -probe.spy.interval?

edit: I'm surprised the Python requests module doesn't maintain KeepAlive connections...

@tomwilkie
Copy link
Contributor Author

Yes even then its intermitted. As far as I can tell the connections are kept alive...

@tomwilkie
Copy link
Contributor Author

Interestingly I also see the python client talking to the scope probe sometimes, which I pretty sure can't happen...

@tomwilkie
Copy link
Contributor Author

So there are no incoming connections to the goapp in proc:

vagrant@ubuntu-14:~/src/github.com/weaveworks/scope/experimental/example$ cat /proc/12032/net/tcp
  sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode                                                     
   0: E60011AC:8EA7 E30011AC:23F0 01 00000000:00000000 02:0000026C 00000000     0        0 14003503 2 0000000000000000 20 4 32 10 -1                 
   1: E60011AC:CBEA E40011AC:23F0 01 00000000:00000000 02:0000026C 00000000     0        0 14003504 2 0000000000000000 20 4 32 10 -1                 
   2: E60011AC:D585 E50011AC:23F0 01 00000000:00000000 02:0000099F 00000000     0        0 14002653 2 0000000000000000 20 4 32 10 -1

23F0 = 9200, the elastic search port

@tomwilkie
Copy link
Contributor Author

But the connections do appear in the python add:

vagrant@ubuntu-14:~/src/github.com/weaveworks/scope/experimental/example$ cat /proc/13357/net/tcp | grep 1F90
   4: F10011AC:8A81 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
   7: F10011AC:D97A F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  10: F10011AC:8A6D EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  12: F10011AC:D913 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  14: F10011AC:D8E1 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  15: F10011AC:D909 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  21: F10011AC:8A51 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  22: F10011AC:D956 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  23: F10011AC:8A7D EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  25: F10011AC:8AB5 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  26: F10011AC:D8E9 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  28: F10011AC:8A64 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  29: F10011AC:8A3C EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  31: F10011AC:8A1E EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  32: F10011AC:8ABA EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  33: F10011AC:D8F2 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  34: F10011AC:D902 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  36: F10011AC:8A56 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  37: F10011AC:8ACD EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  44: F10011AC:D969 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  45: F10011AC:8A44 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  50: F10011AC:8A71 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  51: F10011AC:8ABD EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  52: F10011AC:8A2D EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  54: F10011AC:D96E F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  55: F10011AC:8A59 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  56: F10011AC:D929 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  60: F10011AC:8AC1 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  61: F10011AC:D94D F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  62: F10011AC:D93E F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  66: F10011AC:D961 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  70: F10011AC:D933 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  71: F10011AC:8AA9 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  72: F10011AC:8AAC EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  74: F10011AC:8A90 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  75: F10011AC:D8FD F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  76: F10011AC:D915 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  77: F10011AC:D8EF F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  80: F10011AC:D8F9 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  81: F10011AC:8A7A EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  83: F10011AC:D98F F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  84: F10011AC:8ACA EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  88: F10011AC:D966 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  89: F10011AC:D927 F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  93: F10011AC:D95F F00011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000                                      
  94: F10011AC:8A88 EF0011AC:1F90 06 00000000:00000000 03:00000000 00000000     0        0 0 3 0000000000000000    

@tomwilkie
Copy link
Contributor Author

So no inode associate with those connections

@tomwilkie
Copy link
Contributor Author

and the state 06 is TIME_WAIT

@tomwilkie
Copy link
Contributor Author

So yeah, no keep alive...

@tomwilkie
Copy link
Contributor Author

And its the python end

15:36:47.976890 IP 172.17.0.241.56451 > 172.17.0.240.http-alt: Flags [F.], seq 180, ack 134, win 237, options [nop,nop,TS val 248901589 ecr 248901589], length 0
    0x0000:  4500 0034 fbfb 4000 4006 e4c4 ac11 00f1  E..4..@.@.......
    0x0010:  ac11 00f0 dc83 1f90 4773 14d7 34c8 77c6  ........Gs..4.w.
    0x0020:  8011 00ed 5a2a 0000 0101 080a 0ed5 efd5  ....Z*..........
    0x0030:  0ed5 efd5                                ....
15:36:47.977136 IP 172.17.0.240.http-alt > 172.17.0.241.56451: Flags [F.], seq 134, ack 181, win 235, options [nop,nop,TS val 248901589 ecr 248901589], length 0
    0x0000:  4500 0034 9897 4000 4006 4829 ac11 00f0  E..4..@.@.H)....
    0x0010:  ac11 00f1 1f90 dc83 34c8 77c6 4773 14d8  ........4.w.Gs..
    0x0020:  8011 00eb 5a2a 0000 0101 080a 0ed5 efd5  ....Z*..........
    0x0030:  0ed5 efd5                                ..

@tomwilkie
Copy link
Contributor Author

python requests does keep alive within a session....

FFS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants