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

离线回放流量失败 #398

Open
sunmuchao opened this issue Jan 4, 2023 · 1 comment
Open

离线回放流量失败 #398

sunmuchao opened this issue Jan 4, 2023 · 1 comment

Comments

@sunmuchao
Copy link

./tcpcopy -l /opt/smc/tcpcopy/tcpcopy.log -x 12701-192.168.5.94:12701 -s 192.168.5.22 -c 192.168.2.254 -i /opt/smc/test2.pcap
执行以下回放命令。
测试机器是192.168.5.94:12701 拦截器的机器是192.168.5.22
通过tcpdump抓取12701的数据包后,执行了几个请求之后间隔120多s tcpcopy发送RST数据包断开连接。数据包中包含grpc请求,不清楚是不是tcpcopy无法解析部分grpc请求的原因?

日志内容如下:
2023/01/04 21:07:16 +118 [notice] set global port for tcpcopy
2023/01/04 21:07:16 +118 [notice] raw_clt_tf_ip:192.168.2.254
2023/01/04 21:07:16 +118 [notice] parallel connections per target:2
2023/01/04 21:07:16 +118 [notice] accelerated 1 times,interval:0 ms
2023/01/04 21:07:16 +118 [notice] s parameter:192.168.5.22
2023/01/04 21:07:16 +118 [notice] set only ip for tcpcopy
2023/01/04 21:07:16 +118 [info] connect to remote server(192.168.5.22:36524)
2023/01/04 21:07:16 +118 [info] connect to remote server(192.168.5.22:36524)
2023/01/04 21:07:16 +118 [notice] open pcap success:/opt/smc/test2.pcap
2023/01/04 21:07:16 +118 [notice] send the first packets here
2023/01/04 21:07:46 +118 [notice] active:3,rel:0,obs del:0,tw:0
2023/01/04 21:07:46 +118 [notice] conns:3,resp:31,c-resp:16
2023/01/04 21:07:46 +118 [notice] resp fin:0,resp rst:0
2023/01/04 21:07:46 +118 [notice] send:23,send content:11
2023/01/04 21:07:46 +118 [notice] send syn:3, fin:0,reset:0
2023/01/04 21:07:46 +118 [notice] reconnect:0,for no syn:0
2023/01/04 21:07:46 +118 [notice] retransmit:0
2023/01/04 21:07:46 +118 [notice] recv packs after retransmission:0
2023/01/04 21:07:46 +118 [notice] syn cnt:3,all clt:109,clt cont:103
2023/01/04 21:07:46 +118 [notice] total cont retransmit:0, frag:0
2023/01/04 21:07:46 +118 [notice] total captured packets:198
2023/01/04 21:07:50 +180 [notice] stop, null from pcap_next
2023/01/04 21:08:16 +118 [notice] user time used:0
2023/01/04 21:08:16 +118 [notice] sys time used:0
2023/01/04 21:08:16 +118 [notice] max memory size:6616
2023/01/04 21:08:16 +118 [notice] Total allocated space (bytes): 109408
2023/01/04 21:08:16 +118 [notice] Total free space (bytes): 25760
2023/01/04 21:08:16 +118 [notice] Top-most, releasable space (bytes): 25520
2023/01/04 21:08:16 +118 [notice] active:3,rel:0,obs del:0,tw:0
2023/01/04 21:08:16 +118 [notice] conns:3,resp:31,c-resp:16
2023/01/04 21:08:16 +118 [notice] resp fin:0,resp rst:0
2023/01/04 21:08:16 +118 [notice] send:23,send content:11
2023/01/04 21:08:16 +118 [notice] send syn:3, fin:0,reset:0
2023/01/04 21:08:16 +118 [notice] reconnect:0,for no syn:0
2023/01/04 21:08:16 +118 [notice] retransmit:0
2023/01/04 21:08:16 +118 [notice] recv packs after retransmission:0
2023/01/04 21:08:16 +118 [notice] syn cnt:3,all clt:120,clt cont:114
2023/01/04 21:08:16 +118 [notice] total cont retransmit:0, frag:0
2023/01/04 21:08:16 +118 [notice] total captured packets:222
2023/01/04 21:08:46 +118 [notice] active:3,rel:0,obs del:0,tw:0
2023/01/04 21:08:46 +118 [notice] conns:3,resp:31,c-resp:16
2023/01/04 21:08:46 +118 [notice] resp fin:0,resp rst:0
2023/01/04 21:08:46 +118 [notice] send:23,send content:11
2023/01/04 21:08:46 +118 [notice] send syn:3, fin:0,reset:0
2023/01/04 21:08:46 +118 [notice] reconnect:0,for no syn:0
2023/01/04 21:08:46 +118 [notice] retransmit:0
2023/01/04 21:08:46 +118 [notice] recv packs after retransmission:0
2023/01/04 21:08:46 +118 [notice] syn cnt:3,all clt:120,clt cont:114
2023/01/04 21:08:46 +118 [notice] total cont retransmit:0, frag:0
2023/01/04 21:08:46 +118 [notice] total captured packets:222
2023/01/04 21:09:16 +118 [notice] user time used:0
2023/01/04 21:09:16 +118 [notice] sys time used:0
2023/01/04 21:09:16 +118 [notice] max memory size:6616
2023/01/04 21:09:16 +118 [notice] Total allocated space (bytes): 109408
2023/01/04 21:09:16 +118 [notice] Total free space (bytes): 25760
2023/01/04 21:09:16 +118 [notice] Top-most, releasable space (bytes): 25520
2023/01/04 21:09:16 +118 [notice] active:3,rel:0,obs del:0,tw:0
2023/01/04 21:09:16 +118 [notice] conns:3,resp:31,c-resp:16
2023/01/04 21:09:16 +118 [notice] resp fin:0,resp rst:0
2023/01/04 21:09:16 +118 [notice] send:23,send content:11
2023/01/04 21:09:16 +118 [notice] send syn:3, fin:0,reset:0
2023/01/04 21:09:16 +118 [notice] reconnect:0,for no syn:0
2023/01/04 21:09:16 +118 [notice] retransmit:0
2023/01/04 21:09:16 +118 [notice] recv packs after retransmission:0
2023/01/04 21:09:16 +118 [notice] syn cnt:3,all clt:120,clt cont:114
2023/01/04 21:09:16 +118 [notice] total cont retransmit:0, frag:0
2023/01/04 21:09:16 +118 [notice] total captured packets:222
2023/01/04 21:09:46 +118 [notice] active:1,rel:2,obs del:2,tw:0
2023/01/04 21:09:46 +118 [notice] conns:3,resp:31,c-resp:16
2023/01/04 21:09:46 +118 [notice] resp fin:0,resp rst:0
2023/01/04 21:09:46 +118 [notice] send:25,send content:11
2023/01/04 21:09:46 +118 [notice] send syn:3, fin:0,reset:2
2023/01/04 21:09:46 +118 [notice] reconnect:0,for no syn:0
2023/01/04 21:09:46 +118 [notice] retransmit:0
2023/01/04 21:09:46 +118 [notice] recv packs after retransmission:0
2023/01/04 21:09:46 +118 [notice] syn cnt:3,all clt:120,clt cont:114
2023/01/04 21:09:46 +118 [notice] total cont retransmit:0, frag:0
2023/01/04 21:09:46 +118 [notice] total captured packets:222
2023/01/04 21:09:51 +007 [info] replay times:1
2023/01/04 21:09:51 +007 [notice] offline replay is complete
2023/01/04 21:09:51 +007 [warn] sig 64 received
2023/01/04 21:09:51 +007 [notice] active:1,rel:2,obs del:2,tw:0
2023/01/04 21:09:51 +007 [notice] conns:3,resp:31,c-resp:16
2023/01/04 21:09:51 +007 [notice] resp fin:0,resp rst:0
2023/01/04 21:09:51 +007 [notice] send:25,send content:11
2023/01/04 21:09:51 +007 [notice] send syn:3, fin:0,reset:2
2023/01/04 21:09:51 +007 [notice] reconnect:0,for no syn:0
2023/01/04 21:09:51 +007 [notice] retransmit:0
2023/01/04 21:09:51 +007 [notice] recv packs after retransmission:0
2023/01/04 21:09:51 +007 [notice] syn cnt:3,all clt:120,clt cont:114
2023/01/04 21:09:51 +007 [notice] total cont retransmit:0, frag:0
2023/01/04 21:09:51 +007 [notice] total captured packets:222
2023/01/04 21:09:51 +007 [info] session table, size:65536, total:1
2023/01/04 21:09:51 +007 [notice] tc_epoll_destroy, close fd:5
2023/01/04 21:09:51 +007 [notice] tc_epoll_destroy, close fd:6
2023/01/04 21:09:51 +007 [notice] tc_event_loop_finish over
2023/01/04 21:09:51 +007 [notice] user time used:0
2023/01/04 21:09:51 +007 [notice] sys time used:0
2023/01/04 21:09:51 +007 [notice] max memory size:6616
2023/01/04 21:09:51 +007 [notice] Total allocated space (bytes): 9584
2023/01/04 21:09:51 +007 [notice] Total free space (bytes): 125584
2023/01/04 21:09:51 +007 [notice] Top-most, releasable space (bytes): 34880

@wangbin579
Copy link
Member

能否解析这件事情,可以通过在测试服务器抓包来确认是否应用层拒绝了请求。
如果存在认证等安全过程,往往需要测试服务降低安全需求才能达到目的

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