LR报错Address already in use. Error code : 10048.(已解决)
本人测的是一个C/S架构的软件登录,回放脚本的时候出现错误:Action.c(118): Error : socket8 - Address already in use. Error code : 10048.然后我就把改行的LocalHost的值给改了一下,运行的时候还是报这个错,所以我干脆把有影响的LocalHost都改了以下,回放脚本成功,但是我放在场景里面测试5个人并发的时候还是出现这种错误,然后我就干脆把所有的LocalHost都参数化了,设置参数的时候我尽量使在同一次并发时不出现同样的LocalHost值,参数取值的策略设置为:Unique + Once,但是运行场景的时候还是报这个错误,我想问一下这个问题该怎么解决啊,感激不尽!!
下面是我都脚本和参数的数据
我已经把所有的Socket都关掉了
我把IP都改成了......,不好意思啊,
Action()
{
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=......",LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=......",LrsLastArg);
lrs_create_socket("socket2", "TCP", "LocalHost=0", "RemoteHost=......",LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_send("socket1", "buf4", LrsLastArg);
lrs_receive("socket1", "buf5", LrsLastArg);
lrs_send("socket2", "buf6", LrsLastArg);
lrs_receive("socket2", "buf7", LrsLastArg);
lrs_close_socket("socket2");
lr_start_transaction("登录");
lr_rendezvous("登录");
lr_think_time(20);
lrs_create_socket("socket3", "TCP", "LocalHost=0", "RemoteHost=......",LrsLastArg);
lrs_send("socket3", "buf8", LrsLastArg);
lrs_create_socket("socket4", "UDP", "LocalHost=<LocalHost1>",LrsLastArg);
lrs_receive("socket3", "buf9", LrsLastArg);
lrs_send("socket4", "buf10", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf11", LrsLastArg);
lrs_send("socket4", "buf12", "TargetSocket=......", LrsLastArg);
lrs_disable_socket("socket3", DISABLE_SEND);
lrs_close_socket("socket3");
lrs_create_socket("socket5", "TCP", "LocalHost=0", "RemoteHost=......",LrsLastArg);
lrs_send("socket4", "buf13", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf14", LrsLastArg);
lrs_send("socket4", "buf15", "TargetSocket=......", LrsLastArg);
lrs_send("socket5", "buf16", LrsLastArg);
lrs_receive("socket4", "buf17", LrsLastArg);
lrs_send("socket4", "buf18", "TargetSocket=......", LrsLastArg);
lrs_receive("socket5", "buf19", LrsLastArg);
lrs_disable_socket("socket5", DISABLE_SEND);
lrs_close_socket("socket5");
lrs_create_socket("socket6", "UDP", "RemoteHost=......",LrsLastArg);
lrs_close_socket("socket6");
lrs_receive("socket4", "buf20", LrsLastArg);
lrs_send("socket4", "buf21", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf22", LrsLastArg);
lrs_send("socket4", "buf23", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf24", LrsLastArg);
lrs_send("socket4", "buf25", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf26", LrsLastArg);
lrs_create_socket("socket7", "TCP", "LocalHost=<LocalHost3>", "RemoteHost=......",LrsLastArg);
lrs_send("socket4", "buf27", "TargetSocket=......", LrsLastArg);
lrs_send("socket7", "buf28", LrsLastArg);
lrs_receive("socket4", "buf29", LrsLastArg);
lrs_send("socket4", "buf30", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf31", LrsLastArg);
lrs_send("socket4", "buf32", "TargetSocket=......", LrsLastArg);
lrs_receive("socket7", "buf33", LrsLastArg);
lrs_close_socket("socket7");
lrs_create_socket("socket8", "TCP", "LocalHost=<LocalHost4>", "RemoteHost=......",LrsLastArg);
lrs_send("socket8", "buf34", LrsLastArg);
lrs_receive("socket8", "buf35", LrsLastArg);
lrs_create_socket("socket9", "UDP", "RemoteHost=......",LrsLastArg);
lrs_close_socket("socket8");
lrs_close_socket("socket9");
lrs_create_socket("socket10", "UDP", "LocalHost=<LocalHost5>",LrsLastArg);
lrs_send("socket10", "buf36", "TargetSocket=......", LrsLastArg);
lrs_receive("socket10", "buf37", LrsLastArg);
lrs_send("socket10", "buf38", "TargetSocket=......", LrsLastArg);
lrs_receive("socket10", "buf39", LrsLastArg);
lrs_send("socket10", "buf40", "TargetSocket=......", LrsLastArg);
lrs_close_socket("socket10");
lrs_create_socket("socket11", "UDP", "LocalHost=<LocalHost2>",LrsLastArg);
lrs_send("socket11", "buf41", "TargetSocket=......", LrsLastArg);
lrs_receive("socket11", "buf42", LrsLastArg);
lrs_send("socket11", "buf43", "TargetSocket=......", LrsLastArg);
lrs_receive("socket11", "buf44", LrsLastArg);
lrs_send("socket11", "buf45", "TargetSocket=......", LrsLastArg);
lrs_receive("socket11", "buf46", LrsLastArg);
lrs_create_socket("socket12", "UDP", "RemoteHost=......",LrsLastArg);
lrs_receive("socket11", "buf47", LrsLastArg);
lrs_close_socket("socket12");
lrs_send("socket11", "buf48", "TargetSocket=......", LrsLastArg);
lrs_create_socket("socket13", "TCP", "LocalHost=<LocalHost6>", "RemoteHost=......",LrsLastArg);
lrs_send("socket13", "buf49", LrsLastArg);
lrs_receive("socket13", "buf50", LrsLastArg);
lrs_close_socket("socket13");
lrs_create_socket("socket14", "TCP", "LocalHost=<LocalHost7>", "RemoteHost=......",LrsLastArg);
lrs_send("socket14", "buf51", LrsLastArg);
lrs_receive("socket14", "buf52", LrsLastArg);
lrs_close_socket("socket14");
lrs_create_socket("socket15", "TCP", "LocalHost=<LocalHost8>", "RemoteHost=......",LrsLastArg);
lrs_send("socket15", "buf53", LrsLastArg);
lrs_receive("socket15", "buf54", LrsLastArg);
lrs_close_socket("socket15");
lrs_create_socket("socket16", "TCP", "LocalHost=<LocalHost9>", "RemoteHost=......",LrsLastArg);
lrs_send("socket16", "buf55", LrsLastArg);
lrs_receive("socket16", "buf56", LrsLastArg);
lrs_close_socket("socket16");
lrs_create_socket("socket17", "TCP", "LocalHost=<LocalHost0>", "RemoteHost=......",LrsLastArg);
lrs_send("socket17", "buf57", LrsLastArg);
lrs_receive("socket17", "buf58", LrsLastArg);
lrs_close_socket("socket17");
lrs_create_socket("socket18", "TCP", "LocalHost=0", "RemoteHost=......",LrsLastArg);
lrs_send("socket18", "buf59", LrsLastArg);
lrs_receive("socket18", "buf60", LrsLastArg);
lrs_close_socket("socket18");
lrs_create_socket("socket19", "TCP", "LocalHost=0", "RemoteHost=......",LrsLastArg);
lrs_send("socket19", "buf61", LrsLastArg);
lrs_receive("socket19", "buf62", LrsLastArg);
lrs_close_socket("socket19");
lr_end_transaction("登录", LR_AUTO);
lrs_close_socket("socket1");
lrs_close_socket("socket4");
lrs_close_socket("socket11");
return 0;
}
LocalHost1,LocalHost2,LocalHost0,LocalHost3,LocalHost4,LocalHost5,LocalHost6,LocalHost7,LocalHost8,LocalHost9
5006,5067,3507,3501,3502,5062,3503,3504,3505,3506
5001,5062,3508,3502,3503,5063,3504,3505,3506,3507
5002,5063,3509,3503,3504,5064,3505,3506,3507,3508
5003,5064,3510,3504,3505,5065,3506,3507,3508,3509
5004,5065,3511,3505,3506,5066,3507,3508,3509,3510
5005,5066,3512,3506,3507,5067,3508,3509,3510,3511
麻烦大家帮我解决,不然的话这个东西没法测了,有什么说的不够详细明白的情说!!!
[ 本帖最后由 huangkai 于 2009-5-8 17:52 编辑 ]
关注-学习
关注ing...学习ing...关注 关注 关注
问题很严重 朋友很着急 帮你顶了期待高手们 原帖由 kuangquanshui 于 2009-5-8 11:29 发表 http://bbs.51testing.com/images/common/back.gif问题很严重 朋友很着急 帮你顶了期待高手们
谢谢楼上的兄弟!!! 有没有高手帮我解决下啊,小弟我急用啊!!!谢谢啦!!!
回复 6# 的帖子
你要是做ip欺骗不是这么做的论坛里有方法找找吧 原帖由 kuangquanshui 于 2009-5-8 14:40 发表 http://bbs.51testing.com/images/common/back.gif你要是做ip欺骗不是这么做的论坛里有方法找找吧
设置了IP欺骗又出现了新的错误,Action.c(12): Error : Timeout expired while trying to connect. Error code : 9017.我都把连接的时间设置成600秒了,而且这个错误是我一运行场景就出现的!!
回复 8# 的帖子
朋友 你重启电脑了吗 在压力生成器中连接上了吗 找找这个方面的资料 一看就会了 学习一下。。慢慢进阶 原帖由 kuangquanshui 于 2009-5-8 14:40 发表 http://bbs.51testing.com/images/common/back.gif
你要是做ip欺骗不是这么做的论坛里有方法找找吧
感谢kuangquanshui的回答,问题解决了,太感谢了!!! 客气了是你自己的努力很高兴认识你交个朋友吧285431693
回复 12# 的帖子
求之不得啊!!!呵呵!!! 原帖由 kuangquanshui 于 2009-5-8 17:55 发表 http://bbs.51testing.com/images/common/back.gif客气了是你自己的努力很高兴认识你交个朋友吧285431693
加不了啊,提示对方拒绝被添加!!!你加我的吧,328510445,只要不嫌我是新手问的问题简单,只要不嫌麻烦的朋友都可以加哈,呵呵
[ 本帖最后由 huangkai 于 2009-5-8 18:00 编辑 ]
回复 14# 的帖子
呵呵忘了 我设置了回去改一下回复 15# 的帖子
等你的消息哈,真的很荣幸认识你,以后还请多多指教啊!!!回复 17# 的帖子
是的 针对两位问题表示怀疑如下:
1,问题解决了,现象得表征是什么?服务端确定 与client通信完成 ?
2,通讯协议到底是什么?看你脚本中既有 TCP ,又有UDP 。。。
3,脚本中一直在创建端口,每次发送结束就重新再次维护socket链接,为什么不用循环?
4,socket脚本中的 buf19-----buf 61内容是什么东东?属于可控,还是非控制变量?
回复 19# 的帖子
上面的这位大哥,你说的问题有点深奥,对于我这初学者还不太了解,不能回答你的问题,不好意思, 学习中,碰到和你一样的问题 回复 10# huangkai能说一下最后是怎么解决的吗,现在我也碰到了这问题,求解。
页:
[1]