hdc163 发表于 2009-8-27 15:22:02

socket回放报尝试 accept connection 的超时时间已到

/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Thu Aug 27 14:38:04
*********************************************************************/

#include "lrs.h"


Action()
{
    lrs_create_socket("socket0", "TCP", "RemoteHost=mylinux:8088",LrsLastArg);

    lrs_send("socket0", "buf0", LrsLastArg);

    lrs_receive("socket0", "buf1", LrsLastArg);

    lrs_send("socket0", "buf2", LrsLastArg);

    lrs_receive("socket0", "buf3", LrsLastArg);

    lrs_send("socket0", "buf4", LrsLastArg);

    lrs_receive("socket0", "buf5", LrsLastArg);

    lrs_send("socket0", "buf6", LrsLastArg);

    lrs_receive("socket0", "buf7", LrsLastArg);

    lrs_send("socket0", "buf8", LrsLastArg);

    lrs_receive("socket0", "buf9", LrsLastArg);

    lr_think_time(8);

    lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=mylinux:21",LrsLastArg);

    lrs_receive("socket1", "buf10", LrsLastArg);

    lrs_send("socket1", "buf11", LrsLastArg);

    lrs_receive("socket1", "buf12", LrsLastArg);

    lrs_send("socket1", "buf13", LrsLastArg);

    lrs_receive("socket1", "buf14", LrsLastArg);

    lrs_send("socket1", "buf15", LrsLastArg);

    lrs_receive("socket1", "buf16", LrsLastArg);

    lrs_create_socket("socket2", "TCP", "LocalHost=0", "Backlog=1",LrsLastArg);

    lrs_send("socket1", "buf17", LrsLastArg);

    lrs_receive("socket1", "buf18", LrsLastArg);

    lrs_send("socket1", "buf19", LrsLastArg);

    lrs_receive("socket1", "buf20", LrsLastArg);

    lrs_accept_connection("socket2", "socket3");

    lrs_close_socket("socket2");

    lrs_receive("socket3", "buf21", LrsLastArg);

    lrs_close_socket("socket3");

    lrs_receive("socket1", "buf22", LrsLastArg);

    lrs_send("socket1", "buf23", LrsLastArg);

    lrs_receive("socket1", "buf24", LrsLastArg);

    lrs_close_socket("socket1");

   }

data.ws文件如下:

;WSRData 2 1

sendbuf0 141
      "<?xml version=\"1.0\" encoding=\"GB2312\"?><packet><head><packet_id>22</pa"
      "cket_id></head><body><user>admin</user><psw>admin</psw></body></packet>"

recvbuf1 154
      "00000146<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
      "<packet><head><packet_id>22</packet_id></head><body><result>0</result><rig"
      "ht>127</right></body></packet>\r\n"

sendbuf2 102
      "<?xml version=\"1.0\" encoding=\"GB2312\"?><packet><head><packet_id>15</pa"
      "cket_id></head><body /></packet>"

recvbuf3 105
      "00000097<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
      "<packet><head><packet_id>15</packet_id></head></packet>\r\n"

sendbuf4 101
      "<?xml version=\"1.0\" encoding=\"GB2312\"?><packet><head><packet_id>7</pac"
      "ket_id></head><body /></packet>"

recvbuf5 153
      "00000145<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
      "<packet><head><packet_id>7</packet_id></head><body><cryptkey>a1b2c3d4e5f6g"
      "7h</cryptkey></body></packet>\r\n"

sendbuf6 160
      "<?xml version=\"1.0\" encoding=\"GB2312\"?><packet><head><packet_id>43</pa"
      "cket_id></head><body><select>select DeptName,DeptDesc from T_dept</select>"
      "</body></packet>"

recvbuf7 394
      "00000386<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
      "<packet><head><packet_id>43</packet_id></head><body><DeptName>娴嬭瘯閮"
      "\xa8"
      "</DeptName><DeptDesc>娴嬭瘯閮"
      "\xa8"
      "</DeptDesc></body><body><DeptName>鎴戠殑閮ㄩ棬</DeptName><DeptDesc>閮ㄩ棬<"
      "/DeptDesc></body><body><DeptName>寮"
      "\x80"
      "鍙戦儴</DeptName><DeptDesc>寮"
      "\x80"
      "鍙戦儴</DeptDesc></body><body><DeptName>宸ョ▼閮"
      "\xa8"
      "</DeptName><DeptDesc>宸ョ▼</DeptDesc></body></packet>\r\n"

sendbuf8 102
      "<?xml version=\"1.0\" encoding=\"GB2312\"?><packet><head><packet_id>63</pa"
      "cket_id></head><body /></packet>"

recvbuf9 228
      "00000220<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
      "<packet><head><packet_id>63</packet_id></head><body><ftpname>192.168.1.55<"
      "/ftpname><ftpport>21</ftpport><username>ftpuser</username><userpwd>ftpuser"
      ".123</userpwd></body></packet>\r\n"

recvbuf10 53
      "220 mylinux FTP server (Version wu-2.6.1-20) ready.\r\n"

sendbuf11 14
      "USER ftpuser\r\n"

recvbuf12 36
      "331 Password required for ftpuser.\r\n"

sendbuf13 18
      "PASS ftpuser.00000000\r\n"

recvbuf14 78
      "230-System shutdown at Fri Jun 12 04:27:00 2009\r\n"
      "230 User ftpuser logged in.\r\n"

sendbuf15 8
      "TYPE A\r\n"

recvbuf16 20
      "200 Type set to A.\r\n"

sendbuf17 26
      "PORT 192,168,1,52,23,140\r\n"

recvbuf18 30
      "200 PORT command successful.\r\n"

sendbuf19 6
      "LIST\r\n"

recvbuf20 63
      "150 Opening ASCII mode data connection for directory listing.\r\n"

recvbuf21 600
      "total 72\r\n"
      "drwxr-xr-x   2 501      501          4096 Jan 24 09:45 Backup_DB\r\n"
      "drwxr-xr-x   2 501      501          4096 Jan 24 16:07 ServerPacket\r\n"
      "drwxr-xr-x   5 501      501          4096 Jan 24 16:10 test\r\n"
      "drwxr-xr-x   3 501      501          4096 Jan 21 16:04 uu\r\n"
      "drwxr-xr-x   2 501      501          4096 Jan 24 15:57 werewrew\r\n"
      "drwxr-xr-x   2 501      501          4096 Jan 24 16:09 zsDCMBackupFiles\r\n"
      "drwxr-xr-x   2 501      501          4096 Jan 24 15:34 zsDCMFiles\r\n"
      "drwxr-xr-x   4 501      501          4096 Jun 11 10:14 文档管理\r\n"
      "drwxr-xr-x   2 501      501          4096 Jun 11 06:17 子目录名\r\n"

recvbuf22 24
      "226 Transfer complete.\r\n"

sendbuf23 5
      "PWD\r\n"

recvbuf24 38
      "257 \"/ftpfile\" is current directory.\r\n"

-1

回放时执行到 lrs_accept_connection("socket2", "socket3");报以下错误:
虚拟用户脚本已启动
正在开始操作 vuser_init。
vuser_init.c(12): lrs_startup(257)
正在结束操作 vuser_init。
正在运行 Vuser...
正在开始迭代 1。
正在开始操作 Action。
Action.c(12): lrs_create_socket(socket0, TCP, ...)
Action.c(14): lrs_send(socket0, buf0)
Action.c(16): lrs_receive(socket0, buf1)
Action.c(18): lrs_send(socket0, buf2)
Action.c(20): lrs_receive(socket0, buf3)
Action.c(22): lrs_send(socket0, buf4)
Action.c(24): lrs_receive(socket0, buf5)
Action.c(26): lrs_send(socket0, buf6)
Action.c(28): lrs_receive(socket0, buf7)
Action.c(30): lrs_send(socket0, buf8)
Action.c(32): lrs_receive(socket0, buf9)
Action.c(36): lrs_create_socket(socket1, TCP, ...)
Action.c(38): lrs_receive(socket1, buf10)
Action.c(40): lrs_send(socket1, buf11)
Action.c(42): lrs_receive(socket1, buf12)
Action.c(44): lrs_send(socket1, buf13)
Action.c(46): lrs_receive(socket1, buf14)
Action.c(48): lrs_send(socket1, buf15)
Action.c(50): lrs_receive(socket1, buf16)
Action.c(52): lrs_create_socket(socket2, TCP, ...)
Action.c(54): lrs_send(socket1, buf17)
Action.c(56): lrs_receive(socket1, buf18)
Action.c(58): lrs_send(socket1, buf19)
Action.c(60): lrs_receive(socket1, buf20)
Action.c(60): Mismatch (expected 63 bytes, 78 bytes actually received)
Action.c(62): lrs_accept_connection(socket2, socket3)
Action.c(62): 错误: 尝试 accept connection 的超时时间已到。错误代码: 9017。
从操作调用了中止。
正在结束 Vuser...
正在开始操作 vuser_end。
vuser_end.c(12): lrs_cleanup()
vuser_end.c(12): 错误: socket3 - 在非套接字上执行套接字操作。错误代码: 10038。
从操作调用了中止。

急请高手指点!

hdc163 发表于 2009-8-28 09:10:27

高手哪里去了?怎么不出来啊!

hdc163 发表于 2009-9-25 13:20:13

都没搞定?要做端口的关联,关联后就可以了
页: [1]
查看完整版本: socket回放报尝试 accept connection 的超时时间已到