Posts in category testing

Testing client/server communication

Defining LICORN_SERVER environment variable (in latest stable code) provides an easy way to test bi-directionnal communication between 2 or more Licorn® daemons installed on distinct machines.

WARNING: this is meant for testing and development purposes only. In production environments, there should be a DHCP server on the Licorn® machine with the SERVER role, and the CLIENTs will discover it automatically.

To use:

  • be sure all machines are on the same IP network.
  • set up one of the machine with licornd.role = SERVER in /etc/licorn/licorn.conf.
    • find the IP address of this machine and remember it.
  • set up all other machines with licornd.role = CLIENT
    • open a Terminal on each, and run export LICORN_SERVER=<IP_address> with the IP address of your server.
  • start all licornd, ending with the server one (else it won't detect the clients because they currently don't push their status to the server).
    • alternatively, if you want to force detection of new clients started after the server, you can run add machines --discover <IP_subnet/mask> on the server, it will scan the subnet and register all new machines.

Besides this, be sure to set experimental.enabled = True on the SERVER machine, to get the Machines tab in the WMI.

You can now enjoy remotely shutting down client machines.