How to run DR Server and Corona Licensing Server as services
It is possible to install and run Corona Renderer's Distributed Rendering Server and Licensing Server as Windows services. You can use the below script package for this:
- Corona Renderer 5 and newer:
- Corona Renderer 4 and older:
After the installation, both of the servers will be automatically run as services on system startup.
All the scripts for installing and removing services need administrator privileges to work properly. They must be run from an elevated command line or by right clicking and then selecting „Run as administrator“ option in the pop up menu.
The scripts expect that Corona Renderer was installed to the default location (C:\Program Files\Corona). If that is not the case, you need to modify the path at the top of each script before it is run, or install DrServer and Licensing Server in their default directories.
The .bat scripts can be removed after the installation, but as long as the services are installed, the nssm.exe must remain at the same location. Otherwise the services will stop working.
The scripts are registering Corona servers as services using the NSSM tool - http://www.nssm.cc/
Note: network drive mapping is not supported in service mode! The recommended solution is to use UNC paths instead.
How to enter email and password when the Licensing Server is running as a service?
When the Licensing Server is running as a service, you should create a LicensingServerLogin.txt file on the licensing server computer, in:
- Corona Renderer 3 and newer:
- C:\Program Files\Corona\Licensing Server\
Or, if the above method is not working: - C:\Windows\System32\config\systemprofile\AppData\Local\CoronaRenderer
- C:\Program Files\Corona\Licensing Server\
- Corona Renderer 2 and older:
- C:\Program Files\Corona\
- C:\Windows\SysWOW64\config\systemprofile\AppData\Local\CoronaRenderer
- C:\Program Files\Corona\
NOTE: when using LicensingServerLogin.txt, please consider that your login credentials are exposed to anyone with access to the computer!
Troubleshooting
1. The service does not start correctly, the command line window just stays open saying "Starting Corona Licensing Server service", and you can find the following lines in the system log:
Failed to start service Corona Licensing Server. Program C:\Program Files\Corona\LicensingServer.exe --noGui couldn't be launched. CreateProcess() failed: The system cannot find the file specified.
Solution:
- In the "servers-service" folder run "RemoveLicensingServer.bat" - this is just in case, to make sure that everything is uninstalled, and installed properly later.
- Edit the InstallLicensingServer.bat file.
- Make sure that the "nssm install "Corona Licensing Server"" line points to the correct location where your licensing server is located - by default it is installed to C:\Program Files\Corona\ in Corona Renderer 2 or C:\Program Files\Corona\Licensing Server\ in Corona Renderer 3, however it can be placed anywhere, as it does not require installation.
echo Installing Corona Licensing Server service
nssm install "Corona Licensing Server" "C:\Program Files\Corona\LicensingServer.exe"
echo Starting Corona Licensing Server service
nssm start "Corona Licensing Server"
pause
The "pause" line at the end is to prevent the cmd window shutting down once the operation is completed. Thanks to this, you should see a message "the operation completed successfully".
Remember about using quotes (") in the path to the licensing server. Otherwise the command will not work.
2. Where are the logs stored when the apps are running as services?
- Corona Renderer 3 and newer:
-
LicensingServerLog.txt will be stored in C:\Windows\System32\config\systemprofile\AppData\Local\CoronaRenderer
-
DR Server log will be stored in
C:\Windows\System32\config\systemprofile\AppData\Local\CoronaRenderer\DrData
-
-
Corona Renderer 2 and older:
-
LicensingServerLog.txt will be stored in C:\Windows\SysWOW64\config\systemprofile\AppData\Local\CoronaRenderer
-
DR Server log will be stored in
C:\Windows\SysWOW64\config\systemprofile\AppData\Local\CoronaRenderer\DrData
-
This is not possible directly, but the application which is used for launching the licensing server as a service (NSSM) supports some commands that may be helpful:
https://nssm.cc/commands
For example running
nssm status "Corona Licensing Server"will print "SERVICE_RUNNING"
Here:
Corona Renderer 2 and older:
5. Render node's RAM usage is not printed in the VFB on the workstation machine!
Render node's RAM usage will not be printed in the VFB when running the DR server as a service on the node. This is currently a limitation of using this method. We are aware of this issue and will do our best to fix it in the future.
In case of any issues with running these scripts or using the DR Sever or Licensing Server, please contact us by submitting a new support ticket.