Unanswered question

Can i use a custom port for the docker neoload-loadgenerator port?

I'm running a neoload farm via docker/docker-compose and i need to spawn 2 loadgenerators on the same server.
In the second one i'm setting the LG_PORT env variable to 7110 and publish the related port but the LG doesn't pop up on NeoloadWeb.

(simplified) docker run command: docker run -p 7110:7110 -e LG_PORT=7110 neotys/neoload-loadgenerator

Despite my port settings this the LG log

2021/03/23 11:58:31 INFO - neoload.agent.Agent: Start transport API server on port: 7100
2021/03/23 11:59:51 FATAL - neoload.agent.Agent: Can't create server socket. port 7100 java.net.BindException: Address already in use

Luca C.
Luca C.

Luca C.

Level
0
2 / 100
points

Answers

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

The port inside the container will be 7100, you have to map the external ones

docker run -p 7110:7100 -e LG_PORT=7110

Alternatively, why not create a docker compose file like this...

version: '3'

services:
nlw-controller-mount:
container_name: nlw-controller-mount
hostname: docker-controller
image: neotys/neoload-controller:7.7
env_file:

  • ./nlweb_controller.env
  • ./nlweb.env
  • links:

    • nlw-lg
    • networks:

      • nlw
      • nlw-lg:
        image: neotys/neoload-loadgenerator:7.7
        env_file:

        • ./nlweb.env
        • networks:

          • nlw
          • networks:
            nlw:

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

Command to call is
sudo docker-compose --file /home/nwilliams/my_nlweb_files/nlweb_infra_scale.yaml up --scale nlw-lg=3

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

I should add, the env files contain
#nlweb controller
MODE=Managed

#nlw
NEOLOADWEB_URL=https://nlweb:8080/
NEOLOADWEB_TOKEN=abc123
ZONE=qwerty