51Testing软件测试论坛
标题:
求助:有关WinSock脚本回放时出现10053错误的问题!
[打印本页]
作者:
bsd3000
时间:
2005-1-11 16:57
标题:
求助:有关WinSock脚本回放时出现10053错误的问题!
使用WinSock协议录制脚本,Init中录制的是启动浏览器,连接到目的主页的操作,回放时出错,
错误提示:
vuser_init.c(26): Error : socket0 - Software caused connection abort.
Error code : 10053.
出错的语句:
lrs_receive("socket0", "buf4", LrsLastArg);
对应的Buffer:
recv buf4 1483
"HTTP/1.1 200 OK\r\n"
"Server: Microsoft-IIS/5.0\r\n"
"Date: Fri, 07 Jan 2005 03:10:19 GMT\r\n"
"Content-Length: 1289\r\n"
"Content-Type: text/html\r\n"
"Expires: Fri, 07 Jan 2005 03:10:19 GMT\r\n"
"Cache-control: Private\r\n"
"\r\n"
"\n"
"<HTML><head>\n"
"<script language=\"JavaScript\">\n"
"<!--\n"
"function form_onsubmit(obj)\n"
"{\n"
"var error;\n"
"error=\"\";\n"
"ValidationPassed = true;\n"
"if(obj.UserName.value==\"\")\n"
"{\n"
"\terror=error+\"请输入用户名!\\n\";\n"
"}\n"
"if(obj.PassWord.value==\"\")\n"
"{\n"
"\terror=error+\"请输入密码!\\n\";\n"
"}\n"
"if(error!=\"\")\n"
"{\n"
"\talert(error);\n"
"\tValidationPassed = false;\n"
"\treturn;\n"
"}\n"
"return true;\n"
"}\n"
"-->\n"
"</script>\n"
"<link rel=\"stylesheet\" href=\"WebCSS.css\"
type=\"text/css\">\n"
"</head>\n"
"<BODY topMargin=0 onload=\"form1.UserName.focus();\"
BACKGROUND=\"\">\n"
"<center><br><br>\n"
"<form name=\"form1\" method=\"post\"
action=\"LoginProcess.asp\" onSubmit="
"\"return ValidationPassed\">\n"
"\t<table align=center border=1 borderColor=silver
borderColorDark=#ffffff "
" bgColor=#E2E2E2 cellPadding=4 cellSpacing=0>\n"
"\t <tr><td align=center background=\"images/bg1.gif\">--开发网 · 登录--<"
"/td></tr>\n"
"\t <tr><td height=25>用户名称:<input type=\"text\"
name=\"UserName\" sty"
"le=\"width:100px;font-size:12px\" class=input></td></tr>\n"
"\t <tr><td height=25>你的密码:<input type=\"password\"
name=\"PassWord\""
" style=\"width:100px;font-size:12px\"
class=input></td></tr>\n"
"\t <tr><td align=\"center\" height=40> \n"
"\t <INPUT src=\"img/login.gif\" type=image
onclick=\"form_onsubmit(th"
"is.form);\">\n"
"\t </td></tr>\t \n"
"\t</table>\n"
"</form>\n"
"<p><a href=\"/help/index.htm\"
target=\"_blank\">帮助查看</a></p>\n"
"</center>\n"
"</BODY>\n"
"</HTML>"
出错时运行日志里的信息:
vuser_init.c(26): lrs_receive(socket0, buf4)
vuser_init.c(26): fiInitRecv: socket: socket0 (496), buffer: buf4, expected
size: 1483
vuser_init.c(26): callRecv: Tue Jan 11 15:27:54.480: About to read 1483
bytes from socket0 (496)
vuser_init.c(26): fiPerformReceive: Tue Jan 11 15:27:54.480: Waiting
for readable socket 10 secs, 0 usecs
vuser_init.c(26): fiPerformReceive: Tue Jan 11 15:27:54.490: Trying to
read 8192 bytes
vuser_init.c(26): Error : socket0 - Software caused connection abort.
Error code : 10053.
请问出现这种错误原因一般是什么?如何解决?
日志里第二行显示了 “expected size: 1483”,那为什么在倒数第二行里还会显示“Trying to read 8192 bytes”?
callRecv、fiPerformReceive、fiPerformReceive都是windows API函数吗?
[
Last edited by bsd3000 on 2005-1-12 at 17:15
]
作者:
bsd3000
时间:
2005-1-11 17:44
这是在运行时设置里设置日志为只输出服务器返回的数据时,运行日志里的全部信息,
Virtual User Script started
Starting action vuser_init.
vuser_init.c(12): lrs_create_socket(socket0, TCP, ...)
vuser_init.c(16): lrs_send(socket0, buf0)
vuser_init.c(22): lrs_receive(socket0, buf2)
================================RECEIVED BUFFER================================
"HTTP/1.1 302 Object moved\r\n"
"Server: Microsoft-IIS/5.0\r\n"
"Date: Tue, 11 Jan 2005 09:28:46 GMT\r\n"
"Pragma: No-Cache\r\n"
"Location: Login.asp\r\n"
"Content-Length: 121\r\n"
"Content-Type: text/html\r\n"
"Expires: Mon, 10 Jan 2005 09:28:46 GMT\r\n"
"Set-Cookie: ASPSESSIONIDAQQARSRT=MINHBHJBEADBHIFCKLPPIBKF; path=/\r\n"
"Cache-control: no-cache\r\n"
"\r\n"
"<head><title>Object moved</title></head>\n"
"<body><h1>Object Moved</h1>This object may be found <a HREF=\"\">here</a>."
"</body>\n"
===============================================================================
vuser_init.c(22): callRecv:431 bytes were received
vuser_init.c(24): lrs_send(socket0, buf3)
vuser_init.c(26): lrs_set_recv_timeout2(120, 0)
vuser_init.c(28): lrs_receive(socket0, buf4)
vuser_init.c(28): Error : socket0 - Software caused connection abort. Error code : 10053.
作者:
bsd3000
时间:
2005-1-17 09:03
有人可以帮忙解决一下吗?谢谢!
作者:
吱吱
时间:
2005-1-18 11:10
为什么不用web协议呢?winsock协议很麻烦,你这个问题可能是有某些数据需要关联,
作者:
bsd3000
时间:
2005-1-18 11:22
谢谢 吱吱!
我是想尝试一下WinSock协议。
这个端口号只是在这出现了一次,建立连接后只发送和接受了一次数据包就关闭了连接。所以我想应该不会跟哪有关联吧?
作者:
吱吱
时间:
2005-1-18 11:28
vuser_init.c(22): lrs_receive(socket0, buf2)
================================RECEIVED BUFFER================================
"HTTP/1.1 302 Object moved\r\n"
为什么会出现302错误?
作者:
bsd3000
时间:
2005-1-18 11:36
对HTTP错误不太了解,在一个地方看到这个说明:
301 Moved Permanently
302 Moved Temporarily
作者:
bsd3000
时间:
2005-1-18 11:41
“这个端口号只是在这出现了一次,建立连接后只发送和接受了一次数据包就关闭了连接。所以我想应该不会跟哪有关联吧?”
不好意思,刚才这个回复写错地方了。
作者:
zhengaiqi
时间:
2013-6-3 15:49
一直在论坛查找这问题的解决办法,确没人说答案!!!
作者:
icestick8586
时间:
2013-6-3 20:12
学习了
作者:
zhengaiqi
时间:
2013-6-7 11:28
关注中。。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2