zoukankan      html  css  js  c++  java
  • LoadRunner场景运行错误解决方法

    前言

    本文主要是收集以往性能测试中碰到的错误,所做的总结,主要根据不同的报错类型进行归类,如1、下的错误类型是同类型错误。

    1、超时问题Error -27783、-27782、-27730、 -27728

    错误:-27783=Timeout(XXX seconds) exceeded while attempting to etablish connnectgion to houst “http://...”
    解决方法:增加连接超时时间(HTTP-request connect timeout)
    错误:-27782=Timeout(XXX seconds)exceeded while waiting to receive data for URL"http://......"
    解决方法:增加接收超时时间( HTTP-request receive timeout)
    错误:-27730=Timeout ofXXX expired when waiting for the completion of URL "http://......"
    解决方法: 增加接收超时时间( HTTP-request receive timeout)
    Error -27728: Step download timeout (120 seconds) has expired
    解决方法:run time setting中>Internet Protocol:Preferences>Options中三项参数HTTP-request connect timeout,HTTP-request receieve timeout,Step download timeout,分别建议修改为1200、1200、1200。

    2、Error -27796

    Error -27796: Failed to connect to server "www.baidu.com:80": [10048] Address already in use
    Try changing the registry value
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\TcpTimedWaitDelay to 30
    and HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\MaxUserPort to 65534
    and rebooting the machine
    See the readme.doc file for more information

    Error -27796: Failed to connect to server "192.168.5.132:8083": [10055] No buffer space available
    解决方法:run-time Settings > Browser Emulation 去掉勾选Simulate a new user on each iteration

    3、Oracle协议脚本报错

    vuser_init.c(23): Error: lrdo_initialize_db: "OCIInitialize" return-code=256818888, error-code is unavailable. The message text is unavailable
    vuser_init.c(23): lrd.c/fjInitDB: None of the library combinations specified in section [ORACLE_WINNT] in the "lrd.ini" file could be loaded. Initializing for ORACLE failed
    vuser_init.c(23): lrd_initialize_db: ERROR, return-code=LRDE2015
    解决方法:本机安装Oracle服务端

    4、cannot connect to server:无法连接到服务器。

    原因分析:服务器的配置有问题,服务器无法承受过多的并发连接了。
    解决方法:优化服务器的配置,如tomcat的配置。
    Error -27791: Server has shut down the connection prematurely HTTP Status-Code=503 (Service Temporarily Unavailable)
    原因分析:一般都是由于服务器配置不够好引起的,
    解决方法:tomcat优化,如果仍旧不行,需要优化硬件和调整程序了。
    HTTP Status-Code=500 (Internal Server Error) for
    解决方法:
    1、应用服务宕掉,重新启动应用服务。
    2、当应用系统处于的可用内存处于阀值以下时,出现HTTP Status-Code=500的概率非常高,此时只要增加应用系统的内存,问题即可解决。

    5、服务器日志报错open many files

    原因分析:问题一般都在压力较大的时候出现,由于服务器或者应用中间件本身对于打开的文件数有最大值限制造成
    查看当前系统设置的最大句柄数:ulimit -a
    open files一行就代表系统目前允许单个进程打开的最大句柄数
    使用命令lsof -p 进程id可以查看单个进程所有打开的文件详情,使用命令lsof -p 进程id | wc -l可以统计进程打开了多少文件,使用命令lsof |wc -l 可以统计总共打开多少文件
    如果文件数过多使用lsof -p 进程id命令无法完全查看的话,可以使用lsof -p 进程id > openfiles.log将执行结果内容输出到日志文件中查看。
    解决方法:
    1、增大允许打开的文件数——命令方式
    1)增大允许打开的文件数——修改系统配置文件
    vim /etc/security/limits.conf
    在最后加入
    root soft nofile 819200

    root hard nofile 819200
    修改完后xshell重新登录执行命令ulimit -a 验证是否生效
    注意”nofile”项有两个可能的限制措施。就是项下的hard和soft。 要使修改过得最大打开文件数生效,必须对这两种限制进行设定。 如果使用”-“字符设定, 则hard和soft设定会同时被设定。
    2)修改系统总限制:修改 /etc/sysctl.conf, 加入fs.file-max = 6553560

    执行生效命令sysctl.conf -p

    再执行命令ulimit -a验证是否已生效

    3、检查程序问题
    如果你对你的程序有一定了解的话,应该对程序打开文件数(链接数)上限有一定的估算,如果感觉数字异常,请使用第一步的lsof -p 进程id > openfiles.log命令,获得当前占用句柄的全部详情进行分析,
    1)打开的这些文件是不是都是必要的?
    2)定位到打开这些文件的代码
    3)是否程序操作了文件写入,但是没有进行正常关闭
    4)是否程序进行了通讯,但是没有正常关闭(也就是没有超时结束的机制)
    如果程序中存在这些问题的话,无论系统句柄数设置的多么大,随着时间的推移,也一定会占用完。

    6、压测时出现超出游标问题

    java.sql.SQLException: ORA-01000: maximum open cursors exceeded

    查看参数值(默认值300):

    su - oracle;
    sqlplus / as sysdba;
    show parameter open_cursors;
    修改参数值:
    alter system set open_cursors =3000;
    commit;
    该值调整后,依然出现超出游标问题,就有可能是代码或者测试脚本中有连接未关闭。

    7、webservice协议接口场景执行报错

    脚本使用 web_service_call方法,并发时报错
    Error -108824:Action.c(6) Error

    Failed to retrieve output arguments/checkpoints - SOAP fault occurred

    Error -108825:Action.c(6) Error
    Expected SOAP result_ received SOAP fault

    Error -108960:Action.c(6) Error Web service call "PageQuery_102" execution failed
    LR的webservice三种使用方法 https://wenku.baidu.com/view/c10647738e9951e79b89277f.html
    解决方法:使用HTTP方式

    8、上传类场景添加多个负载机报错:Action.c(38): Error -26488: Could not obtain information about submitted

    Action.c(38): Error -26488: Could not obtain information about submitted file "C:\Users\csb\AppData\Local\Temp\brr_mYv.387\netdir\D\2019年_6月_全区公安机关自助信息资源采集上传子系统\脚本\上传excel200colum3w\200colum3w32820.xls": _stat32 rc=-1, errno=2 [No such file or directory]. Using an empty file
    解决方法:
    1.先执行一次场景,让其报错,主要是为了创建完整的路径

    2.在负载机查找路径C:\Users\csb\AppData\Local\Temp\brr_mYv.387
    3.brr_mYv.387目录下会产生从controller机器传送过来的脚本文件,从报错信息可知完整路径C:\Users\csb\AppData\Local\Temp\brr_mYv.387\netdir\D\2019年_6月_全区公安机关自助信息资源采集上传子系统\脚本\上传excel200colum3w\200colum3w32820.xls
    将原始脚本的文件放在该目录下即可解决

    9、测试中需要在本地缓存数据导致内存不足报错

    Action.c(38): Fatal Error -26000: Not enough memory (53036360 bytes) for "submission data buffer". Aborting
    Action.c(38): Error: C interpreter run time error: Action.c (38): Error -- memory violation : Exception ACCESS_VIOLATION received.
    解决思路:
    1)释放内存
    例:使用函数 lr_free_parameter释放参数内存,lr_free_parameter("schemaName");
    2)增加负载机

    10、IP欺骗跑场景时报错60990(验证不通过,待解决) IP欺骗不能使用时直接采用多台负载机即可

    1. Code -60990 Error: Two Way Communication Error: Function two_way_comm_post_message /two_way_comm_post_message_ex failed.
    2. Code -29739 Error: Service client with id=1 failed to post a message, reason -communication error.
    3. Code -16895 Error: Failed to post xdr buffers data array by post_ex.
    4. Code -10343 Error: Communication error: Cannot send the message since reached theshared memory buffer max size.
      原因:共享内存缓存溢出,造成Controller和Load Generator之间通讯出现问题。IP设置较多,客户端空间不足。
      解决方案(配置后不一定能解决,空间不足):
        修改两个配置文件。
        1.安装目录下\dat\channel_configure.dat
        2. 安装目录下\launch_service\dat\channel_configure.dat
        在这两个文件中的[general]部分下添加如下配置。
        shared_memory_max_size=100(修改共享内存为100MB,默认是50MB)
        重新启动Controller,问题解决。
        问题诱因2——验证不通过,待解决
        打开 controller中的 diagnostics菜单,点掉复选框..点掉 Enable the following diagnostics

    11、错误 -26601: 解压缩函数(wgzMemDecompressBuffer)失败,返回代码=-5 (Z_BUF_ERROR)、inSize=0、inUse=0、outUse=0

  • 相关阅读:
    sonar6.7.2启动报错
    linux 查看/修改jdk版本
    idea一款颜值很高的theme
    生成唯一UUID
    连接池异常
    手机网页点击后出现蓝色框
    iScroll4中事件点击一次却触发两次解决方案
    base.js
    javascript与css3动画学习笔记
    javascript对象学习笔记
  • 原文地址:https://www.cnblogs.com/seamy/p/15654597.html
Copyright © 2011-2022 走看看