What does the "Variable NX_KEY wasn't in the environment" message mean?

Document ID : KB000103886
Last Modified Date : 30/06/2018
Show Technical Document Details
Introduction:
When running pdm_status, pdm_load, or one of many Service Desk Manager-related commands, it's possible to see the error message "Variable NX_KEY wasn't in the environment". When this message is displayed, pdm_ commands will not function, some Service Desk Manager functionality may stop working, and the Service Desk Manager services may fail to start from a stopped state with a Windows "Error 1053" generic service failure message.
Question:
What is the meaning of the "Variable NX_KEY wasn't in the environment" message, and how can it be fixed?
Environment:
This message may appear in any Service Desk Manager version.
Answer:
This message indicates that the Service Desk Manager processes were unable to find one or more values needed from your environment's nx.env file. This file is typically located at the root of your Service Desk Manager install directory (e.g. C:\Program Files (x86)\CA\Service Desk Manager\). If this file is missing or renamed, the processes will not be able to find or read it, leading to this message. If the file is present but corrupted, or is missing some of its' necessary data, the file should be restored from a backup or copied from the template. To copy the template of nx.env and restore this file if it is missing or corrupt, please do the following:
  • Navigate from the root of the Service Desk Manager directory to the \pdmconf\ folder.
  • Locate the file nx.env_nt.tpl. Copy this file.
  • Return to the root directory. Paste your copied file.
  • Rename the copied file from nx.nv_nt.tpl to nx.env, allowing for the change in file extension. (If you are replacing a corrupted nx.env file, rename the corrupted version before renaming the template.)
As the template file may not have been updated recently, it is recommended to check a backup for a more recent copy of the file first.
Additional Information:
As Service Desk Manager keeps most of its' environment variables and settings in memory and other live working locations, any changes to nx.env while the system is running may not be immediately reflected in the environment - this is why a missing, renamed, or corrupted nx.env file may not immediately cause system-wide issues, but would cause trouble once services are trying to start up again.

After making changes to nx.env intentionally (e.g. changing a setting in Options Manager in the web interface or through the pdm_options_manager command), restarting the Service Desk Manager services is usually necessary. Manually editing the nx.env file is generally discouraged.