user3731315
user3731315

Reputation: 23

Jmeter java.net.SocketException: Connection reset by peer: socket write error

Jmeter 5.1.1 running on AWS EC2 windows box and also Server Agent 2.2.3. and added jp@gc - PerfMon Metrics Collector to collect the EC2 machine CPU Utilization, Memory, and Network I/O metrics and in PerfMon Metrics Collector plugin I have provided the EC2 instance Public IP and server agent port 4444. After running the script for the single thread I am getting java.net.connectException Connection timed out: connect. [jp@gc - PerfMon Metrics Collector- java.net.connectexception][1] [1]: https://i.sstatic.net/VIiIi.png

I also tried with providing the Private IP and port 4444, After running the script Server Agent gets closed immediately and I have received error java.net.SocketException: Connection reset by peer: socket write error.

on EC2 instance I have edited the inbound rule and opened port like this
All TCP TCP 0 - 65535 0.0.0.0/0

Upvotes: 0

Views: 1617

Answers (1)

Dmitri T
Dmitri T

Reputation: 168092

  1. If you run Server Agent and JMeter on the same machine just use localhost

  2. You may need to open the port 4444 in Windows Firewall

  3. You may need to to set java.net.preferIPv4Stack property to true in case if Server Agent is bound to the IPv6 address

  4. It should be sufficient to open only one port in the Security Groups like:

    enter image description here

    also there is a difference between EC2 security groups and VPC security groups make sure to use the right one

More information: How to Monitor Your Server Health & Performance During a JMeter Load Test

Upvotes: 0

Related Questions