hello and thanks for the suggestions.

I will try a distributed configuration today. Right now I suspect a limit
in the vm, or possibly in jorphan, so splitting over 2 servers should help.

At the OS level (logs in /var/logs, number of open files...) I don't see
anything suspicious

IPSec is most likely not the problem either, I tried with a simple bash
loop and I can open all 100 connections.
for conn in {1..100} ; do ipsec up env-$conn & echo ; done

With "ipsec status" I see there are 100 active tunnels; with "ip addr show"
I see there are 100 ip addresses, and the 100 tunnels do work (I tried
another bash loop to send a dns request to a server, using dig -b <address>
@<server in the vpn>...)

So, narrowing it down towards a Java (VM, or the Jorphan classes). Thanks
and I'll post an update, it might be interesting for other testers who use
the OS Process Sampler

best regards
Ivan

On Tue, Mar 8, 2016 at 11:11 PM, Sergio Boso <ser...@bosoconsulting.it>
wrote:

> HI,
> also, I would check the IPSEC client configuration.
> It looks like you are hitting some configuration limit somewhere.
>
> A distributed configuration would work around these values.
>
> Regards
>
> Sergio
>
>
> Il 08/03/2016 19.59, chaitanya bhatt ha scritto:
>
>> Have you looked at linux kernel/os logs?
>>
>>   Also, to prove OS is not the bottleneck try launching 2 Jmeter instances
>> on the same machine with 50 threads on each. If you still see the problem
>> OS could be the culprit.
>>
>> Thanks
>> Chaitanya M Bhatt
>>
>> On Tue, Mar 8, 2016 at 3:02 AM, Ivan Rancati <ivan.ranc...@gmail.com>
>> wrote:
>>
>> Hello again,
>>>
>>> I am still struggling with the "IOException: Stream closed" problem.
>>> Quick question: as BufferedInputStream is not a file object (it's VM
>>> internal), there is no point in investigating file descriptor limits at
>>> the
>>> OS (Linux) level, correct?
>>>
>>> Other than this, suggestions or also hints how to further troubleshoot
>>> are
>>> welcome.
>>>
>>>
>>>
>>> Best regards
>>> Ivan
>>>
>>>
>>>
>>> On Thu, Mar 3, 2016 at 10:20 AM, Ivan Rancati <ivan.ranc...@gmail.com>
>>> wrote:
>>>
>>> Good morning,
>>>>
>>>> I am using the OS Process sampler to start an ipsec (StrongSwan)
>>>> connection, and it’s working well until I hit about 100 threads, then
>>>> the
>>>> following exception appears
>>>>
>>>> WARN  - jorphan.exec.StreamCopier: Error writing stream
>>>> java.io.IOException: Stream closed
>>>>
>>>> and the samples start timing out
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2016/03/01 13:44:30 INFO  - jmeter.reporters.Summariser: summary +
>>>>  50
>>>> in  30.2s =    1.7/s Avg: 18785 Min: 14642 Max: 23661 Err:     0 (0.00%)
>>>> Active: 99 Started: 99 Finished: 0
>>>>
>>>> 2016/03/01 13:44:30 INFO  - jmeter.reporters.Summariser: summary =
>>>> 338
>>>> in   320s =    1.1/s Avg:  6789 Min:   101 Max: 23661 Err:     0 (0.00%)
>>>>
>>>> 2016/03/01 13:44:32 INFO  - jmeter.threads.JMeterThread: Thread started:
>>>> Open ipsec connections 1-100
>>>>
>>>> 2016/03/01 13:45:01 INFO  - jmeter.reporters.Summariser: summary +
>>>>  49
>>>> in  30.2s =    1.6/s Avg: 21878 Min: 17053 Max: 26981 Err:     0 (0.00%)
>>>> Active: 100 Started: 100 Finished: 0
>>>>
>>>> 2016/03/01 13:45:01 INFO  - jmeter.reporters.Summariser: summary =
>>>> 387
>>>> in   350s =    1.1/s Avg:  8700 Min:   101 Max: 26981 Err:     0 (0.00%)
>>>>
>>>> 2016/03/01 13:45:14 WARN  - jorphan.exec.StreamCopier: Error writing
>>>> stream java.io.IOException: Stream closed
>>>>
>>>>          at
>>>> java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
>>>>
>>>>          at
>>>>
>>> java.io.BufferedInputStream.read1(BufferedInputStream.java:291)
>>>
>>>>          at
>>>> java.io.BufferedInputStream.read(BufferedInputStream.java:345)
>>>>
>>>>          at java.io.FilterInputStream.read(FilterInputStream.java:107)
>>>>
>>>>          at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
>>>>
>>>>          at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
>>>>
>>>>          at
>>>> org.apache.jorphan.exec.StreamCopier.run(StreamCopier.java:57)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> My configuration:
>>>>
>>>> I am running Jmeter 2.13 in text (non-GUI) mode on a Ubuntu 15.10
>>>> server.
>>>> I also tried the nightly build r1732820 as I saw a possibly related
>>>>
>>> bugfix
>>>
>>>> **, no change
>>>>
>>>> java version "1.8.0_74" (Oracle Jdk). I have also tried the OpenJdk, no
>>>> change
>>>>
>>>>
>>>>
>>>> The testplan looks so
>>>>
>>>>
>>>>
>>>> setUp Thread Group
>>>>
>>>>    os Process Sampler: restart networking
>>>>
>>>>    os Process Sampler: delete a ipsec log file, so it does not grow too
>>>>
>>> big
>>>
>>>>    os Process Sampler: start the ipsec services
>>>>
>>>>    constant timer, wait 5 seconds
>>>>
>>>>
>>>>
>>>> main thread group: 100 threads, run 1 hour with scheduler, rampup 10
>>>> minutes
>>>>
>>>>    os Process Sampler: ipsec up (the name of the connection is a fixed
>>>> string plus the thread number)
>>>>
>>>>       verify that an ip address is given, return code is 0, the string
>>>> “successfully is displayed”
>>>>
>>>>    constant timer, wait 30 seconds
>>>>
>>>>    os Process Sampler: ipsec down (name of the connection as above)
>>>>
>>>>
>>>>
>>>> tearDown
>>>>
>>>>    os Process Sampler: stop the ipsec services
>>>>
>>>>
>>>>
>>>> In the test plan, there are a “View Results Tree” and an “Aggregate
>>>> Report”, which I assume are not used in text mode.
>>>>
>>>> I have the same test plan on another computer, where I copy the .jtl
>>>> file
>>>> and use JMeter in GUI Mode to look at the results.
>>>>
>>>>
>>>>
>>>> During the execution of the tests, the server does not show overload
>>>> (cpu/memory, checked with top)
>>>>
>>>> I have also verified manually (for loop in bash) that the ipsec
>>>> connections configured in ipsec.conf start correctly
>>>>
>>>>
>>>>
>>>> In the test plan, I tried two variants to execute the command
>>>>
>>>> 1: use /bin/bash as the Command, and /usr/local/sbin/ipsec as a
>>>> parameter
>>>> (other parameters are then “up” and the name of the connection)
>>>>
>>>> 2: use directly /usr/local/sbin/ipsec as the Command, parameters as
>>>> above
>>>>
>>>> Here there is also no difference
>>>>
>>>>
>>>> Is there a limit on the number of open streams?
>>>>
>>>> I have tried to run the test with 99 threads, the “Stream closed”
>>>> exception still appears, if I let the test run long enough, so it does
>>>>
>>> not
>>>
>>>> look like there is a hard coded limit of 100
>>>>
>>>>
>>>>
>>>> Thanks for any suggestion and best regards
>>>>
>>>> Ivan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ** Use Java7 try with resources
>>>>
>>>> Close stream leak
>>>>
>>>> Remove commented code
>>>>
>>>> Fix synchro issue in comparison
>>>>
>>>>
>>>> git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1719558
>>>>
>>>>
>
> --
>
> Ing. Sergio Boso
>
>
>
>

Reply via email to