|
在选用oracle nca协议录制完脚本,进行回放的时候往往会出现
connect_server error的错误。
此时要从以下几个方面进行排查。
The above error occurs when LoadRunner is having problem connecting to the server. Some of the most common causes are
1. Make sure that your script is recorded in either of the following mode:
a. HTTP mode, or
b. HTML mode with non-HTML generated elements recorded in separate steps
If not, regenerate (Tools -> Regenerate Vuser) your script.
Note:If you have LoadRunner 7.51 SP1 or below, you will need to re-record.
2. Make sure that NCAJServSessionID is correlated correctly. While generating script, LoadRunner assume that the buffer ended with \r. However, there are cases that it ends with \n. LoadRunner currently does not check for the correct boundary. To verify, replay the script in extended log to find out the correct boundary. If needed, change the RB argument for the web_reg_save_param function.
Example:
web_reg_save_param("NCAJServSessionId", "LB=\r\n\r\n", "RB=\n", "ORD=1", "LAST");
3. On the web_url statement that has the NCAJServSessionID substituted, make sure that the resource argument is set to 0. This will ensure that the resource in which NCAJServSessionID is used is always downloaded regardless of what is set in Run Time Settings.
Example:
web_url("oracle.forms.servlet.ListenerSer",
"URL=http://ABC-123<NCAJServSessionId>?ifcmd=getinfo&ifhost=mercury&ifip=123.45.789.12",
"TargetFrame=",
"Resource=0",
"RecContentType=application/octet-stream",
LAST);
4. Open the default.cfg file in the script directory using notepad and make sure that it has UseServletMode=2 under the [HttpConnectMode] section for an environment with Forms Listener Servlet.
5. Make sure that there are no changes on the server port number. LoadRunner replays the script with the port number that the application uses during the recording session, a change could cause a problem. To resolve the issue, find out the current port number and modify the connect_server statement to reflect the correct port number.
6. Make sure that you specify the correct SSL version. To do so, add following statement at the beginning of the script,
web_set_sockets_options("SSL_VERSION", "3");
Note: This is a web function. If only Oracle NCA was selected for Multi-Protocol Vuser, make the following changes to .usr file found in script directory:
Change
AdditionalTypes=Oracle_NCA
ActiveTypes=Oracle_NCA
GenerateTypes=Oracle_NCA
to
AdditionalTypes=Oracle_NCA,HTTP
ActiveTypes=Oracle_NCA,HTTP
GenerateTypes=Oracle_NCA,HTTP
有时回放时出现错误,可通过如下方法进行解决
1.
Apply the LR80P23 and LR80P46 patches.
Then replace the "ncarp11i.dll" file with the one in attached.
This is the patch our R&D developped most recently.
2.
Add new parameter to script's default.cfg file under the section for [NCA_GENERAL].
Add as the next parameter:
E.g.
[NCA_GENERAL]
...
NcaTimerWaitMode=3
3.
Add Java_prop array to script,and use function:"nca_java_set_reply_property(JAVA_PROP)" before nca_connect_server to enable the jave_prop.
E.g.
char * JAVA_PROP[][] = {
{"35", "getDStatus", "0"},
{"35", "GetHostname", "0jameszh"},
{"35", "UserHome", "C:\\Documents and Settings\\Administrator.JAMESZH"},
{"35", "makeDirStat", "1"},
{"35", "UGetProperty", "Administrator"},
{"35", "OsName", "Windows 2000"},
{"35", "FileOperation", "C:\\Documents and Settings\\Administrator.JAMESZH\\sysrt.bat,C,echo %WINDIR%"},
{"35", "getCStatus", "0"},
{"35", "getOsDir", "C:\\WINNT"},
{"35", "getDStatus", "0"},
{"35", "getEStatus", "0"},
{"35", "GetPFStatus", "0"},
{"35", "getLineCnt", "1"},
{"35", "GetVString", "javatwain.dll=1.0"},
{"36", "UserHome", "C:\\Documents and Settings\\Administrator.JAMESZH"},
{"35", "", ""}
};
The first part of the array :"35" is the object name/id.
The second part:"getDStatus" is the Property value in execution log.
The third part:"0" is the Property value in client message.
About how to set up the Java_prop array,Add "nca_java_set_reply_property(JAVA_PROP);" before nca_conncet_server.
4.Replay and you will find the successful result!
[ 本帖最后由 wuyqwuyq 于 2006-12-9 11:43 编辑 ] |
|