jmeter 常见错误


java.lang.OutOfMemoryError: Java heap space

changed HEAP settings in jmeter.bat from

-Xms512m -Xmx512m

to

-Xms2048m -Xmx2048m

这里的最小跟最大内存,根据实际情况设置

java.net.BindException: Address already in use: connect

This is the exception I encountered whenever I run load test against HTTP or Web Service Requests using JMeter.

I am running 120 concurrent threads using a Windows based notebook.

After searching, I found that this problem is Windows based. There is a article at http://support.microsoft.com/kb/q196271, which says Windows XP only will make outbound TCP/IP connections using ports 1024-5000, and takes up to 4 minutes to recycle them. Therefore, if you do a lot of connections in a short amount of time, you can easily eat that port range up.

The steps:

1、 Start Registry Editor.

2、 Locate the following subkey in the registry, and then click Parameters: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

3、 On the Edit menu, click New, and then add the following registry entry:

Value Name: MaxUserPort

Value Type: DWORD

Value data: 65534

Valid Range: 5000-65534 (decimal)

Default: 0x1388 (5000 decimal)

Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically , ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive.

4、Exit Registry Editor, and then restart the computer.

打开注册表:开始--运行:regedit) 当您试图从大于 5000 的 TCP 端口连接时收到错误 WSAENOBUFS (10055)

重要此分区、方法,或任务包含告诉您如何修改注册表的步骤。但是,如果注册表修改不当可能会出现严重问题。因此,请确保您仔细按照这些步骤。附加的保护注册表之前先备份您对其进行修改。然后,您可以在出现问题时还原注册表。有关如何备份和还原注册表的详细信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:322756 如何备份和还原在 Windows 注册表

默认最大数目的临时的 TCP 端口为"适用于"部分中包括的产品中的5000。这些产品中添加了一个新参数。若要增加最大数量的临时端口,请按照下列步骤操作:

1. 启动注册表编辑器。 
2. 在注册表中,找到下面的子项,然后单击 参数:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3. 在编辑 菜单上单击 新建,然后添加以下注册表项: 
    值名称: MaxUserPort
    值类型: DWORD
    值数据: 65534
    有效范围: 5000-65534 (十进制)
    默认值: 0x1388 (5000 十进制)

    说 明: 此参数控制程序从系统请求任何可用的用户的端口时所用的最大端口数。 通常,1024年的值 (含) 之间的 5000 之间分配暂时 (短期) 的端口。发布的安全公告 ms08-037 Windows Server 2003 的行为已更改为更接近后与 Windows Server 2008 和 Windows Vista。Microsoft 安全公告 ms08-037 有关的详细信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章: 
    951746  ms08-037: 说明 Windows Server 2008 中,Windows Server 2003,和 Windows 2000 服务器 (DNS 服务器端) 的 DNS 的安全更新: 2008 年 7 月 8
    951748  ms08-037: 说明在 Windows Server 2003 中、 Windows XP 中和 Windows 2000 Server (客户端) 中的 DNS 的安全更新: 2008 年 7 月 8
    953230  ms08-037: 在 DNS 中的漏洞可能允许欺骗
4. 退出注册表编辑器,然后重新启动计算机。

注意一个附加的 TCPTimedWaitDelay注册表参数确定一个闭合的长端口一直等待,直到已关闭的端口可重复使用。

Non HTTP response message: Unconnected sock

If you’re testing HTTPS with JMeter 2.3.2 and a current version of Java greater than 1.5 e.g.

java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)

Then you are likely to encounter this error when using the standard HTTP Request sampler:

Response code: Non HTTP response code: java.net.SocketException

Response message: Non HTTP response message: Unconnected sockets not implemented

If you have the opportunity, use the HTTP Request HTTPClient sampler instead and this problem should be resolved. Otherwise use Java 1.5 instead. If you’ve already recorded your test plan in JMeter or other tools (like BadBoy) then some simple regular expressions on the jmx file will fix the problem manually.

Windows:

ruby -pi.bak -e "gsub(/

ruby -pi.bak -e "gsub(/HTTPSampler>/, 'HTTPSampler2>')" *.jmx

Mac:

ruby -pi.bak -e "gsub(/

ruby -pi.bak -e "gsub(/HTTPSampler>/, 'HTTPSampler2>')" *.jmx

Tim Koopmans | April 28th, 2009 | Tags: jmeter | Category: 90kts, Altentee

1 comment to JMeter Non HTTP response message: Unconnected sockets not implemented Tarun

June 3rd, 2009 at 8:08 pm
Thank you so much. I was really stuck with this. I am using java version “1.6.0_11″. Recorded https with badboy. Now when I tried HTTP Request HTTPClient and it is working Thanks again…

server启动失败:Cannot start. Unable to get local host IP address. is a loopback address

在Windows下启动Jmeter非常顺利,转到Linux下居然启动失败。

想起之前 遇到“/etc/hosts文件设置不对导致Jboss启动失败”,立马把焦点指向/etc/hosts。

果然还是这个问题,贴/etc/hosts示例:

127.0.0.1       localhost.localdomain localhost

10.20.10.31   higkoo.rdev.company.net higkoo

执行命令hostname查看当前机器名如果当前机器名与/etc/hosts不一致,可手动先执行成一次hostname yourhostname或直接加到jmeter-server文件中(注意机器名中不要含域信息,譬如:myname.rdev.company.com。这样设置仍然启动失败)。

由/etc/hosts文件导致启动失败的错误有: 1. Created remote object: UnicastServerRef [liveRef: [endpoint:10.20.10.31:62090,objID:[2c639f6d:12794fca52a:-7fff, 712947915258586677]]]

Server failed to start: java.rmi.RemoteException: Cannot start. higkoo is a loopback address.

  1. Created remote object: UnicastServerRef [liveRef: [endpoint:10.20.10.31:38796,objID:[-b0d822e:12794fee8b1:-7fff, 8314597152635832475]]]

Server failed to start: java.rmi.RemoteException: Cannot start. Unable to get local host IP address.

Response too large to be displayed. Size: 4

List:       jmeter-user
Subject:    Re: Query | Help needed in Regular Expression
From:       sebb <sebbaz () gmail ! com>
Date:       2008-09-18 15:42:09
Message-ID: 25aac9fc0809180842y850c7c0p81be19e54570b138 () mail ! gmail ! com
[Download message RAW]

On 18/09/2008, Mohamed Niyas <niyas.mohd@gmail.com> wrote:
> Hi Sebb,
>
>  Due to our stage build instability the samplers landed to error page.
>  I confirmed this by checking other scripts which was working well with the
>  RE attached with it.
>  When i ran those scripts, that RE samplers didnot get the exact values which
>  it retreives properly before.
>
>  So i wait for sometime for the latest build, & checked with the RE. It
>  worked well. The other point which i shown in the Jmeter log does not having
>  any issue even though it is shown as "Response data too Large".  All the

This is because of the potential problems when displaying large amounts of data.

See:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#View_Results_Tree

where it says:

"If the response data is larger than 200K, then it won't be displayed.
To change this limit, set the JMeter property
view.results.tree.max_size "

You can also save the response to a file using:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file

>  latest scripts which includes RE extract the right data with this warning
>  too. This is all for your information.
>
>  I didnt check the debug sampler + Tree listener yet. Will check it tomorrow.
>
>
>  Thanks a lot for your quick response.
>
>
> Regards
>
> Mohamed Niyas M
>
>
>  On Thu, Sep 18, 2008 at 5:51 PM, sebb <sebbaz@gmail.com> wrote:
>
>  > On 18/09/2008, Mohamed Niyas <niyas.mohd@gmail.com> wrote:
>  > > Hi Sebb,
>  > >
>  > >  I have recreated the script again & it worked well with the same RE.
>  > Thanks
>  > >  a lot.
>  >
>  > So what was the problem?
>  > Was there a typo in the original script?
>  >
>  > >  As you said in previous mail to add the Debug sampler with the tree
>  > >  listener. I tried this.
>  > >  I have added a DEBUG post processor succeeded with the tree listener,
>  > But
>  > >  the regular expression values
>  > >  i am not seeing that.
>  > >
>  > >  Thread Group
>  > >   sampler - 1
>  > >   sampler - 2
>  > >     RE - 1
>  > >     debug sampler
>  > >     Tree Listener
>  >
>  > Thread Group
>  > + sampler - 1
>  > + sampler - 2
>  > + +   RE - 1
>  > + debug sampler
>  > + + Tree Listener  OR
>  > + Tree Listener
>  >
>  > >  By this set up, will i be able to see the extracted values in the
>  > listeners?
>  >
>  > Yes, check the response data pane - the debug sampler returns the
>  > information as response data.
>  >
>  > >  Or Did i miss something here to fulfill my request?
>  > >
>  > >  Regards
>  > >
>  > > Mohamed Niyas M
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >  On Thu, Sep 18, 2008 at 9:12 AM, Mohamed Niyas <niyas.mohd@gmail.com>
>  > wrote:
>  > >
>  > >  >  Hi sebb,
>  > >  >
>  > >  > I have tried the RE which you suggested. It is still returned -1 which
>  > is a
>  > >  > default value i set in RE.
>  > >  > But the Jmeter log says the sampler data which i am using this RE
>  > >  > says "Response too large to be displayed. Size: 412152 > Max: 204800 "
>  > >  >
>  > >  > Below the JMeter log contents.
>  > >  >
>  > >  > 2008/09/18 09:02:22 WARN -
>  > jmeter.visualizers.ViewResultsFullVisualizer:
>  > >  > Response too large to be displayed. Size: 412152 > Max: 204800
>  > >  > 2008/09/18 09:02:33 WARN -
>  > jmeter.visualizers.ViewResultsFullVisualizer:
>  > >  > Response too large to be displayed. Size: 412152 > Max: 204800
>  > >  > 2008/09/18 09:02:47 WARN -
>  > jmeter.visualizers.ViewResultsFullVisualizer:
>  > >  > Response too large to be displayed. Size: 412152 > Max: 204800
>  > >  >
>  > >  > *Note:* Thanks a lot for your quick response. I checked the RE in ORO
>  > >  > link, it is working fine. I am able to extract the right values which
>  > i want
>  > >  > to extract. but the same it not working in the test plan samplers.
>  > >  >
>  > >  > Please suggest me if i can increase the size of response page. Any
>  > >  > thoughts/suggestions are welcome.
>  > >  >
>  > >  > Regards
>  > >  > Mohamed Niyas M
>  > >  >   On Wed, Sep 17, 2008 at 4:57 PM, sebb <sebbaz@gmail.com> wrote:
>  > >  >
>  > >  >> On 17/09/2008, Mohamed Niyas <niyas.mohd@gmail.com> wrote:
>  > >  >> > hello team,
>  > >  >> >
>  > >  >> >  I just wanted your help to resolve the issues with the regular
>  > >  >> expression.
>  > >  >> >
>  > >  >> >  In my web request one of the web request response page contains
>  > the
>  > >  >> >  following data.
>  > >  >> >
>  > >  >> >  <li><a
>  > >  >> href="hotelDetails.form?octopusPropertyCode=T04185&cityId=3117735"
>  > >  >> >  title="HIGH TECH AVENIDA - Rank - 1 ">
>  > >  >> >  <li><a
>  > href="hotelDetails.form?octopusPropertyCode=TRA1&cityId=3117735"
>  > >  >> >  title="TRAVELODGE TORRELAGUNA - Rank - 2 ">
>  > >  >> >
>  > >  >> >  I wanted to extract
>  > >  >> >
>  > >  >> >  1) octopusPropertyCode="*T04185*"
>  > >  >> >  2) cityId="*3117735*"
>  > >  >> >
>  > >  >> >  I have given the following pattern for Property Code
>  > >  >> >
>  > >  >> >  *Regular Expression:*
>  > >  >> href="hotelDetails.form?octopusPropertyCode=(.*?)&
>  > >  >>
>  > >  >> That should be: href="hotelDetails.form\?octopusPropertyCode=(.*?)&
>  > >  >>
>  > >  >> because form? means "for" optionally followed by "m".
>  > >  >>
>  > >  >> >  *Template :* $1$
>  > >  >> >  *match No:* 1
>  > >  >> >  *Default value :* -1
>  > >  >> >
>  > >  >> >  For city ID
>  > >  >> >
>  > >  >> >  *Regular Expression:*
>  > >  >> href="hotelDetails.form?octopusPropertyCode=(.*?)"
>  > >  >> >  I thought it must have the extracted value as "*
>  > >  >> >  octopusPropertyCode=T04185&cityId=3117735*" if so, how can i split
>  > city
>  > >  >> id
>  > >  >> >  from this,
>  > >  >> >  provided if the regular expression is working correct.
>  > >  >> >
>  > >  >> >  But it returned the default value only (-1). Do i need to escape
>  > the
>  > >  >> "?"
>  > >  >> >  character? if so, how?
>  > >  >>
>  > >  >> See above.
>  > >  >>
>  > >  >> >  can anybody  please help me to extract the property code & city id
>  > from
>  > >  >> this
>  > >  >> >  expression?
>  > >  >>
>  > >  >> href="hotelDetails.form\?octopusPropertyCode=(.*?)&cityId=(\d+)
>  > >  >>
>  > >  >> property code will be in $1$ and cityId in $2$
>  > >  >>
>  > >  >> >  Sometimes back i have seen a mail to print the extracted code in
>  > the
>  > >  >> title
>  > >  >> >  bar?
>  > >  >>
>  > >  >> What title bar? Do you mean the Name of a sampler?
>  > >  >> If so, just use ${variable} in the name.
>  > >  >>
>  > >  >> >  can any one please tell me how to see the extracted values from
>  > the web
>  > >  >> >  request?
>  > >  >>
>  > >  >> Or use the Debug Sampler together with Tree View Listener.
>  > >  >>
>  > >  >> >
>  > >  >> >  Awaiting to hear from you team
>  > >  >> >
>  > >  >> >  Thanks in advance
>  > >  >> >
>  > >  >> > Mohamed Niyas M
>  > >  >> >
>  > >  >>
>  > >  >> ---------------------------------------------------------------------
>  > >  >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > >  >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  > >  >>
>  > >  >>
>  > >  >
>  > >  >
>  > >  > --
>  > >  > Regards, Mohamed Niyas M Mobile: 98804 59080 niyas.mohd@gmail.com
>  > >  > to_niyas@yahoo.co.in
>  > >  >
>  > >
>  > >
>  > >
>  > >  --
>  > >  Regards, Mohamed Niyas M Mobile: 98804 59080 niyas.mohd@gmail.com
>  > >  to_niyas@yahoo.co.in
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>
>
>  --
>  Regards, Mohamed Niyas M Mobile: 98804 59080 niyas.mohd@gmail.com
>  to_niyas@yahoo.co.in
Joyce /
Published under (CC) BY-NC-SA in categories jmeter  tagged with jmeter  execption