Forward Your Linux Licensing Woes to Windows
By James Sahaj, Product Development Manager, Synergex
Development for Linux has taken great steps recently. With the advent of lightweight virtual machines and containers, such as WSL2 (Windows Subsystem for Linux) and Docker, it’s become much easier to set up one of these virtual machines and start to develop Linux applications quickly on them. The problem is, until recently, it was difficult to set up a Synergy license server on a Linux virtual machine and populate it with licenses so you could test your Synergy program. Now, with Synergy/DE 12, you have an easy way to quickly set up licensing on a Linux machine by using licenses from a designated Windows license server. Welcome to the new Linux license forwarding feature!
Linux license forwarding was developed primarily for use with virtual machines and containers, but it can be used on any Linux system. Linux license forwarding has several advantages over the previous licensing mechanism. First, after configuring the Linux forwarder to connect to the Windows license server, there is no additional license setup. The Linux machine will use the existing subscription licenses (traditional ALM licenses are not supported) on the Windows machine, just like any other Windows license client. The Windows license server maintains those licenses by polling the Synergy License Web Service, so no updates are necessary on the Linux system. Another advantage is that, just like a Windows license client, the Linux system can use a Windows backup license server, if configured, if the primary license server goes down. Then, when the primary license server returns, the Linux system switches back to the primary.
To use this feature, you’ll need the 12.1 LTS release or the latest licensing upgrade package for your Linux machine. The Windows license server must have REV11 licensing and be on the same network as the Linux machine, with no firewalls blocking socket access between the two. Also, if a backup Windows license server is configured, you should ensure that the Linux machine has direct access to that too. And make sure that the Windows server has enough licenses to satisfy license requests from both Windows and Linux machines.
How do you set up license forwarding? When running the installation script on a new Linux installation, it prompts you to use licenses from an existing REV11 Windows server. If you respond positively, it asks for the name and port of the Windows license server and attempts to connect to it. If the connection is successful, you’re good to go. To configure Linux license forwarding on a machine with an existing installation of Synergy, you can use the lmu -nf option.
You can confirm forwarding is configured properly by running lmu with no options on the Linux machine. Within that display you’ll see the line “Forwarding To: host:port” and the licenses displayed will be those retrieved from the Windows license server. Once licenses are being used on Linux, if you display the current usage of a particular license mnemonic on the Windows server, such as “lmu -u RUN12”, it will display the machine name and process identifier of the Linux clients currently using that license.
How does the forwarder work? The Linux license forwarder is a synd that waits for license requests. Once it receives a request from a Linux process—be it a license login, logout, or status check—it formats the request and forwards it via a socket connection to the Windows license server. Upon receiving the response from the Windows license server, the Linux synd reformats it and presents it to the Linux process that requested the license. The Linux synd keeps track of processes that are using a Synergy license. Every 10 minutes it checks that the Linux client process is still alive. If it’s not, and Linux synd hasn’t received a logout request, it sends a logout request to Windows synd and then removes that client from the active process list. If the process is still alive, Linux synd sends an authorization request to Windows synd to indicate that. Should the Linux synd be shut down, it will issue a logout request for any processes still in its active process list at the time of shutdown. This way, the Windows synd does not have extra licenses reserved for all those Linux clients.
If you wish to take advantage of lightweight virtual machines and containers, such as WSL2 or Docker, then you should seriously consider upgrading to Synergy/DE 12 to take advantage of the Linux license forwarding feature. It will make setup a breeze and save you time in getting Synergy licenses ready for your Linux system. For more information on Linux license forwarding, check out “Using Linux license forwarding” in the Synergy/DE documentation.