Configuring Preview Server

The Preview Server enables preview generation for the Zoom setup. It acts as a cache between various Zoom Clients and the Zoom Server.
Preview Server needs a running Zoom server to work with, without any Zoom server Preview Server won’t work and can’t serve the request.

Prerequisites/Checklist

  1. Up and Running Zoom server. It may be on the same machine or different machine.
    1. Make sure the Zoom server has valid license installed.
    2. Make sure the Zoom server has super admin account created.
  2. Information about Zoom server URL with protocol, host and port.
    1. Zoom Server URL will look like: https://zoom-server:8880.
    2. Make sure you know the correct port and host name of the Zoom server.
  3. Make sure the Zoom server version is compatible with the Preview Server.
  4. Make sure you can ping the Zoom server host from the Preview Server.
  5. Important: Make sure the Zoom server port is reachable from the Preview Server. Many times Admins forget to whitelist or open the Zoom server port. Please make sure to add proper firewall/iptables rules which allows access to Zoom server port from the Preview Server.
  6. Important: Further configuration assumes, you have access to the Preview Server machine, like SSH or RDP access to the main server machine.

Locate Preview Server Configuration XML File

On Windows
  • C:\Program Files (x86)\Evolphin\DAM\conf\preview-server.xml

Note: If you don’t find the server at this location, you might have installed the server in a different Drive or directory.

On Linux
  • /home/evolphin/zoom/conf/preview-server.xml

Note: If you don’t find the server at this location, you might have installed the server in a different Drive or directory.

Connect Preview Server with Zoom Server

  • Open and edit preview-server.xml file.
  • Locate XML tag <zoomServerHostPort>.
  • Enter the Zoom server URL in the <zoomServerHostPort> tag.
    Like: <zoomServerHostPort>https://zoom-server:8880</zoomServerHostPort>.
  • Save the file and restart the Preview Server.
  • Open Webclient and see if you are able to connect and work.

Set Preview Server Cache Location

The default Preview Server cache location is [SERVER_INSTALL_DIR]/webcontext/servers/PreviewServer/cache
The “[SERVER_INSTALL_DIR]” is the installation location of the Preview Server.

  • Open and edit preview-server.xml file.
  • Locate the XML tag <previewCacheLocation>.
  • Change the cache location according to you need.
    Like: <previewCacheLocation>/home/evolphin/zoom-deploy/preview-cache</previewCacheLocation>.
  • Save the file and restart the Preview Server.

Note: If you are relocating the Preview Server cache, it would be best to copy the contents of existing cache directory to the new location. Otherwise Preview Server has to generate the cache files again.

Configure Preview Server Cache Cleanup

By default Preview Server doesn’t do any cache cleanup. Over the time that will result in the increased disk usage.
It is recommended to enable the cache clean up and keep cache size in check. Please follow the below given details carefully to setup the cache cleaning rules.

Note: If this is a fresh install of Windows Server, it is recommended to use an alternative text editor such as Notepad++ for editing the text files. It makes reading the configuration files more legible.

Setting Cache Cleaning Rules

  • To setup the cache cleaning rules, you need to access to the preview-server.xml file. A section above explains where to find the preview-server.xml on the Preview Server.
  • Once you have located the preview-server.xml file, open it in your favorite editor.
  • Locate the section: <cacheCleaningRules> in the preview-server.xml file

Here is an example of how this section looks in the XML file:

<previewserverspec>
...
...
<!-- EXAMPLE OF CACHE CLEANING RULES -->
<!-- These rules keeps the cache size under 200GB and performs the clean up in every 7 days -->
 <cacheCleaningRules>
    <cleanFrequencyInDays>7</cleanFrequencyInDays>
    <cleanFrequencyHours>0</cleanFrequencyHours>
    <cleanFrequencyMinutes>0</cleanFrequencyMinutes>
    <cacheCleanThresholdPercentage>90</cacheCleanThresholdPercentage>
    <maxAllowedCacheSizeInGB>200.0</maxAllowedCacheSizeInGB>
    <cleanDownloadsOlderThan>5</cleanDownloadsOlderThan>
    <additionalCleanupOption>DEFAULT</additionalCleanupOption>
  </cacheCleaningRules>
...
...
</previewserverspec>

Understanding the cache cleaning tags:

  • cleanFrequencyInDays – Controls the clean up schedule in terms of days.
  • cleanFrequencyHours – Controls the clean up schedule in terms of hours.
  • cleanFrequencyMinutes – Controls the clean up schedule in terms of minutes.
  • cacheCleanThresholdPercentage – This values controls the minimum threshold to trigger the cleanup is cache is filled up-to this threshold. For example: if maxAllowedCacheSizeInGB is set to 100GB, and cacheCleanThresholdPercentage is 80, then the Preview server will try to maintain the cache size between 80GB to 100GB.
  • maxAllowedCacheSizeInGB – Max allowed cache size in GB. Beyond this point, Preview Server will clean the files in the reverse chronological of their last access time. Server will give the preference to the files which have not been accessed recently.
  • cleanDownloadsOlderThan – Max cleanup time in days for the custom downloads like zips, collection downloads etc…
  • additionalCleanupOption – This is for now has to be set to DEFAULT.

Note: In the preview-server.xml you might see more options inside the cache cleaning rules tag. You can ignore other options which are not listed here. Those options are planned to be removed in the future releases.

Note: Make sure to save the changes and restart the Preview Server afterwards. Preview server logs can be inspected for the cleaning working. Preview server will print the various logs messages related to the cache size and found files during the cleanup.

Setting Preview Server Location

From Zoom 7.3 onwards, location can be set for the Preview Server which in turn will be the location of all the web-based Zoom apps connecting to this Preview Server.

Note: Locations are configured on the Zoom Server using Server Zoom Properties page in the Web Management Console. After these locations are set up, these may be chosen by any desktop Zoom Clients or set for the Preview Server.

Follow these steps to set the location for the Preview Server:

  1. You could set the location for Preview Server using one of two files. Update any one of these files on the Preview Server:
    1. Option 1: Using preview-server.xml.
      1. Set the tag <currentLocation> to the desired location. If the tag exists then update its value and if it does not exist then add it. For example:
        <previewserverspec>
        ….
        <currentLocation>Bristol</currentLocation>

        </previewserverspec>
      2. Note: This location must already be present and configured on the Zoom Server.
      3. Save the changes and restart the Preview Server.
    1. Option 2: Using zoom.properties:
      1. Open zoom.properties for editing from the .zm folder for the Preview Server (Windows – [OSInstallDir]\Windows\System32\config\systemprofile\.zm\ and Linux – $Home/.zm/)
      2. Set the property CURRENT_LOCATION property to the desired location. If the property exists then update its value and if it does not exist then add it. For example:
        CURRENT_LOCATION=Bristol
      3. Note: This location must already be present and configured on the Zoom Server.
      4. Save the changes and restart the Preview Server.

The desired location has now been set for the Preview Server. This location will now be used for web-based Zoom clients like the Web Client and Web Asset Browser.

Leave a Comment