DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40750>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40750

           Summary: Behaviour when TCPSampler sockets are closed by remote
                    host
           Product: JMeter
           Version: 2.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Problem:
-------
When the socket connection used by TCPSampler is closed by the host, the socket
will time out, but leave the connection in a "viable" state. Jmeter does not
attempt to check for this.

If the Thread Group is looped, the same connection will be reused. But it is
closed from the host end so all the threads will just time out!

As a quick fix for myself, I modified TCPSampler.java. I changed getSocket() to
always attempt to close any Sockets already in the cp map, and then create a new
one.

Suggestions:
-----------
As suggested by sebb, if there is no way of automatically detecting and
resetting the connection, an option might be used to determine the behaviour if
a timeout occurs. This is probably the way to go since we cannot predict the
behaviour of every protocol???

THe Jmeter.log is below with TCPSampler debugging on. The actualy data sent and
recieved has been removed (just in case).

Relevant jmeter.log:
-------------------
2006/10/13 10:17:34 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler: Created
[EMAIL PROTECTED]
2006/10/13 10:17:34 INFO  - jmeter.protocol.tcp.sampler.TCPClientImpl: Using
eolByte=0
2006/10/13 10:17:34 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler:
[EMAIL PROTECTED]:
[EMAIL PROTECTED]
2006/10/13 10:17:34 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler: Using
Protocol Handler: org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl
2006/10/13 10:17:34 INFO  - jmeter.engine.StandardJMeterEngine: Running the 
test!
2006/10/13 10:17:34 INFO  - jmeter.gui.util.JMeterMenuBar: 
setRunning(true,local)
2006/10/13 10:17:35 INFO  - jmeter.engine.StandardJMeterEngine: Starting 1
threads for group Thread Group. Ramp up = 1.
2006/10/13 10:17:35 INFO  - jmeter.engine.StandardJMeterEngine: Continue on 
error
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler: Created
[EMAIL PROTECTED]
2006/10/13 10:17:35 INFO  - jmeter.protocol.tcp.sampler.TCPClientImpl: Using
eolByte=0
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler:
[EMAIL PROTECTED]:
[EMAIL PROTECTED]
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler: Using
Protocol Handler: org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl
2006/10/13 10:17:35 INFO  - jmeter.threads.JMeterThread: Thread Thread Group 1-1
started
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler: Thread 
Started
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler:
tcp://10.1.1.198:8081
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler:
[EMAIL PROTECTED]  Timeout 0 NoDelay false
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler: Created new
connection Socket[addr=addr/10.1.1.198,port=8081,localport=36474]
2006/10/13 10:17:35 DEBUG - jmeter.protocol.tcp.sampler.TCPClientImpl: Wrote:
<my_data>

2006/10/13 10:17:36 DEBUG - jmeter.protocol.tcp.sampler.TCPClientImpl: Read: 169
<my_recieved_message>

2006/10/13 10:17:36 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler:
tcp://10.1.1.198:8081
2006/10/13 10:17:36 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler:
[EMAIL PROTECTED] Reusing connection
Socket[addr=addr/10.1.1.198,port=8081,localport=36474]
2006/10/13 10:17:36 DEBUG - jmeter.protocol.tcp.sampler.TCPClientImpl: Wrote:
<my_data>

2006/10/13 10:17:36 DEBUG - jmeter.protocol.tcp.sampler.TCPClientImpl: Read: 0

2006/10/13 10:17:36 INFO  - jmeter.threads.JMeterThread: Thread Thread Group 1-1
is done
2006/10/13 10:17:36 INFO  - jmeter.engine.StandardJMeterEngine: Ending thread 0
2006/10/13 10:17:36 INFO  - jmeter.engine.StandardJMeterEngine: Stopping test
2006/10/13 10:17:36 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler: Thread 
Finished
2006/10/13 10:17:36 DEBUG - jmeter.protocol.tcp.sampler.TCPSampler:
[EMAIL PROTECTED] Closing connection
Socket[addr=addr/10.1.1.198,port=8081,localport=36474]
2006/10/13 10:17:36 INFO  - jmeter.engine.StandardJMeterEngine: Notifying test
listeners of end of test
2006/10/13 10:17:36 INFO  - jmeter.gui.util.JMeterMenuBar: 
setRunning(false,local)
2006/10/13 10:17:36 INFO  - jmeter.engine.StandardJMeterEngine: Test has ended

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to