Configure Crane Agent to Ensure Virtual Service Deployed on Private Location is Reachable

If you have deployed a virtual service on a private location and it is not reachable, it could be because the IP address that is assigned to the virtual service is not reachable.

To resolve the issue, follow these steps:

  1. Open a Terminal and use the ipconfig or ifconfig command to verify if the host has multiple network interfaces enabled.

  2. Identify an IP address that is reachable from the test client.

  3. Write down the associated interface name (for ex: eth0).

  4. Delete the existing virtual service.

  5. Regenerate the crane agent and modify the “docker run” command to set the “PREFERRED_INTERFACE” environment variable to the identified interface name:

    --env PREFERRED_INTERFACE=eth0
  6. Recreate the virtual service.

Now the endpoint has a reachable IP address.

Example:

docker run -d 
--env HARBOR_ID=<LOCATION_ID> --env SHIP_ID=<AGENT_ID> --env AUTH_TOKEN=<AUTH_TOKEN> --env A_ENVIRONMENT=https://a.blazemeter.net --env PREFERRED_INTERFACE=<INTERFACE_NAME> --name=<CRANE_AGENT_NAME> --restart=on-failure -v /var/run/docker.sock:/var/run/docker.sock -w /usr/src/app/ -v /tmp:/tmp --net=host blazemeter/crane python agent/agent.py

Return to agent installation steps