0
votes

I have Jmeter docker container. I can run this container locally and connect from Jmeter master and run test. I upload this container to Amazon ECR and created task in ECS, here container running well and logs are good. I setup security groups and can connect to Public IP of my jmeter-server ECS container using curl 18.191.194.238:40000

My jmeter.properties file remote_hosts: 18.191.194.238

But I can not connect to this IP with from my local PC with Jmeter master: Error in rconfigure() method java.rmi.ConnectException: Connection refused to host: 172.31.16.138; - but 172.31.16.138 this is local IP of a container - that means Public IP work well.

I try to set jmeter.properties file remote_hosts:18.191.194.238:40000 - error no such object in table

What I have to do?

1

1 Answers

0
votes

This IP address 172.31.16.138 belongs to Class B network, it means that it resides in private internet

As per Configure a Network chapter of ECS documentation:

If your service's task definition uses the awsvpc network mode, you must configure a VPC, subnet, and security group for your service.

If your service's task definition does not use the awsvpc network mode, you can move on to the next step, Step 3: Configuring Your Service to Use a Load Balancer.

The awsvpc network mode does not provide task ENIs with public IP addresses for tasks that use the EC2 launch type. To access the internet, tasks that use the EC2 launch type must be launched in a private subnet that is configured to use a NAT gateway. For more information, see NAT Gateways in the Amazon VPC User Guide. Inbound network access must be from within the VPC using the private IP address or DNS hostname, or routed through a load balancer from within the VPC. Tasks launched within public subnets do not have outbound network access.

So most probably you need to add a NAT Gateway in order to be able to reach your container from the Internet.

Also make sure to open the following ports:

  • 1099(or whatever you define as the server.rmi.port)
  • the port you define as server.rmi.localport
  • the port(s) you define as client.rmi.localport

References: