51Testing软件测试论坛

标题: winxp32 ,LoadRunner11监控tomcat报错如图 [打印本页]

作者: likaihon    时间: 2014-7-4 18:03
标题: winxp32 ,LoadRunner11监控tomcat报错如图
代码:
Action()
{
       

        lr_start_transaction("monitor tomcat");

        web_reg_save_param("JVMFreeMemory",
                                           "LB=Free memory: ",
                                           "RB= MB",
                                           "Ord=1",
                                           LAST);
   
        web_reg_save_param("JVMTotalMemory",
                                           "LB=Total memory: ",
                                           "RB= MB",
                                           "Ord=1",
                                           LAST);

        web_reg_save_param("JVMMaxMemory",
                                           "LB=Max memory: ",
                                           "RB= MB",
                                           "Ord=1",
                                           LAST);

        web_set_user("admin","123456","127.0.0.1:8080");

        web_url("status",
                        "URL=http://127.0.0.1:8080/manager/status",
                        "Resource=0",
                        "RecContentType=text/html",
                        "Referer=",
                        "Snapshot=t1.inf",
                        "Mode=HTTP",
                        LAST);

        lr_end_transaction("monitor tomcat",LR_AUTO);

        //Tomcat jvm metrics
        lr_user_data_point("Tomcat JVM Free Memory",atof(lr_eval_string("{JVMFreeMemory}")));
        lr_user_data_point("Tomcat JVM Total Memory",atof(lr_eval_string("{JVMTotalMemory}")));
        lr_user_data_point("Tomcat JVM Max Memory",atof(lr_eval_string("{JVMMaxMemory}")));

        return 0;
}

运行结果:

Starting action Action.
Action.c(6): Notify: Transaction "monitor tomcat" started.
Action.c(8): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(14): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(20): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(26): web_set_user was successful          [MsgId: MMSG-26392]
Action.c(28): Error -26628: HTTP Status-Code=403 (Forbidden) for "http://127.0.0.1:8080/manager/status"          [MsgId: MERR-26628]
Action.c(28): Error -26377: No match found for the requested parameter "JVMFreeMemory". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(28): Error -26377: No match found for the requested parameter "JVMTotalMemory". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(28): Error -26377: No match found for the requested parameter "JVMMaxMemory". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(28): web_url("status") highest severity level was "ERROR", 5813 body bytes, 681 header bytes, 24 chunking overhead bytes          [MsgId: MMSG-26387]
Action.c(28): Notify: Transaction "monitor tomcat" ended with "Fail" status (Duration: 0.6659 Wasted Time: 0.5223).
Ending action Action.

不知道哪里出错了,一直都没有成功,哪位大侠帮忙解决一下,非常感谢
作者: 城邦    时间: 2014-7-23 11:32
这个没试过,帮你顶下




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2