Configure the Server License
  • 23 Dec 2024
  • 1 Minute to read
  • Dark
    Light

Configure the Server License

  • Dark
    Light

Article summary

Install or update your license on Polarity Server v5.

Installing or Updating Your Polarity Server License

You can update or install the license on your Polarity server by adding the license file to the correct location on the Polarity Server.  The license file will be named polarity.lic and should be located in the directory /app/license on your Polarity server.

Start by copying your license file to license directory.

cp polarity.lic /app/license/polarity.lic

Restart the Polarity Server containers so the license is loaded.

cd /app && ./down.sh && ./up.sh

Questions?
Please contact Polarity Customer Success at CustomerSuccess@Polarity.IO for questions about your license file.

Troubleshooting

Check out the common issues below if you run into problems after installing your license file.

Solve CR/LF Endings on the License File 

If the Polarity Server license file has Windows-style line endings in it, the server will throw errors but will not crash.  You can check the server status by running the following commands:

cd /app
./health_check.sh

To diagnose the issue, you can run the following grep on the server log:

docker logs polarity_platform | grep "scheduler.schedule"

If you see the error message:

  TypeError: scheduler.schedule is not a function

you likely have a license with Windows line endings. You can confirm that there are Windows line endings by running the file command on the license file. The output will show CR/LF line terminators.

file /app/license/polarity.lic

The following output indicates this issue:

  polarity.lic: ASCII text, with very long lines, with CRLF line terminators

To convert the line endings, you can use the following command which will rewrite the existing license file:

vi polarity.lic -c "set ff=unix" -c ":wq"

If the user has access to yum you can also install dos2unix and use that utility to convert the file:

yum install dos2unix
dos2unix /app/license/polarity.lic

Restart the server process after running the above commands.

cd /app && ./down.sh && ./up.sh

Was this article helpful?