Open mkt-mohit opened 4 years ago
having the same issue here
Hi all, are you still seeing this is sue? I've not been able to reproduce it myself.
I am but I am using WSL2 and so I wonder if there's something with my local environment
kubectl sniff hemitest-5fd4456b7f-v8fqj -c main -n stage
INFO[0000] using tcpdump path at: '/home/bitva/.krew/store/sniff/v1.5.0/static-tcpdump'
INFO[0000] sniffing method: upload static tcpdump
INFO[0000] sniffing on pod: 'hemitest-5fd4456b7f-v8fqj' [namespace: 'stage', container: 'main', filter: '', interface: 'any']
INFO[0000] uploading static tcpdump binary from: '/home/bitva/.krew/store/sniff/v1.5.0/static-tcpdump' to: '/tmp/static-tcpdump'
INFO[0000] uploading file: '/home/bitva/.krew/store/sniff/v1.5.0/static-tcpdump' to '/tmp/static-tcpdump' on container: 'main'
INFO[0000] executing command: '[/bin/sh -c ls -alt /tmp/static-tcpdump]' on container: 'main', pod: 'hemitest-5fd4456b7f-v8fqj', namespace: 'stage'
INFO[0001] command: '[/bin/sh -c ls -alt /tmp/static-tcpdump]' executing successfully exitCode: '2', stdErr :'ls: cannot access '/tmp/static-tcpdump': No such file or directory
'
INFO[0001] file not found on: '/tmp/static-tcpdump', starting to upload
INFO[0002] verifying file uploaded successfully
INFO[0002] executing command: '[/bin/sh -c ls -alt /tmp/static-tcpdump]' on container: 'main', pod: 'hemitest-5fd4456b7f-v8fqj', namespace: 'stage'
INFO[0002] command: '[/bin/sh -c ls -alt /tmp/static-tcpdump]' executing successfully exitCode: '0', stdErr :''
INFO[0002] file found: '-rwxr-xr-x 1 root root 2696368 Jan 1 1970 /tmp/static-tcpdump
'
INFO[0002] file uploaded successfully
INFO[0002] tcpdump uploaded successfully
INFO[0002] spawning wireshark!
INFO[0002] start sniffing on remote container
INFO[0002] executing command: '[/tmp/static-tcpdump -i any -U -w - ]' on container: 'main', pod: 'hemitest-5fd4456b7f-v8fqj', namespace: 'stage'
INFO[0003] starting sniffer cleanup
INFO[0003] sniffer cleanup completed successfully
Error: exit status 1
ngpe72mgtb26 ~# kubectl sniff -n mvnr-paas istio-pilot-5cc98fd795-bczx6 INFO[0000] sniffing method: upload static tcpdump INFO[0000] using tcpdump path at: '/root/.krew/store/sniff/v1.4.2/static-tcpdump' INFO[0000] no container specified, taking first container we found in pod. INFO[0000] selected container: 'discovery' INFO[0000] sniffing on pod: 'istio-pilot-5cc98fd795-bczx6' [namespace: 'mvnr-paas', container: 'discovery', filter: '', interface: 'any'] INFO[0000] uploading static tcpdump binary from: '/root/.krew/store/sniff/v1.4.2/static-tcpdump' to: '/tmp/static-tcpdump' INFO[0000] uploading file: '/root/.krew/store/sniff/v1.4.2/static-tcpdump' to '/tmp/static-tcpdump' on container: 'discovery' INFO[0000] executing command: '[/bin/sh -c ls -alt /tmp/static-tcpdump]' on container: 'discovery', pod: 'istio-pilot-5cc98fd795-bczx6', namespace: 'mvnr-paas' INFO[0000] command: '[/bin/sh -c ls -alt /tmp/static-tcpdump]' executing successfully exitCode: '0', stdErr :'' INFO[0000] file found: '-rwxr-xr-x 1 root root 2696368 Jan 1 1970 /tmp/static-tcpdump ' INFO[0000] file was already found on remote pod INFO[0000] tcpdump uploaded successfully INFO[0000] spawning wireshark! INFO[0000] start sniffing on remote container INFO[0000] executing command: '[/tmp/static-tcpdump -i any -U -w - ]' on container: 'discovery', pod: 'istio-pilot-5cc98fd795-bczx6', namespace: 'mvnr-paas' INFO[0000] starting sniffer cleanup INFO[0000] sniffer cleanup completed successfully Error: exit status 1 ngpe72mgtb26 ~#
I am getting Error: exit status 1 at the end. where i can see logs to troubleshoot.
@eldadru please suggest
also where i can see the tcpdump on worker node