Resolving Problems with SAS Environment Manager Agents

When you try to configure the SAS Environment Manager Agent, it does not start and you receive the error message No token file found, waiting for Agent to initialize
  1. Stop the SAS Environment Manager agent.
  2. Verify that the agent wrapper processes and the agent Java processes have stopped.
  3. On the W6X platform, verify that the directory %SystemRoot%/TEMP exists. Remove the file %SystemRoot%/TEMP/agent.encrypt.lock.
    On all other UNIX platforms, search for the java.io.tmpdir environment variable in the agent wrapper process and the agent Java process. By default, the value of the variable will be set to the /tmp or /var/tmp directory. If the variable exists, remove the file agent.encrypt.lock under the specified directory.
The agent.log file contains the message java.lang.OutOfMemoryError: GC overhead limit exceeded
Include these JVM options in the start-up script for each agent:
-XX:NewRatio=8
 -XX:+CMSClassUnloadingEnabled
 -XX:+UseTLAB
 -XX:+UseCompressedOops
Modify the file SAS-configuration_directory/LevX/Web/SASEnvironmentManager/agent-5.8.0-EE/bundles/agent-5.8.0/bin/hq-agent.sh or hq-agent.bat and add these JVM options to the CLIENT_CMD variable:
 CLIENT_CMD="${HQ_JAVA} \
   -D${AGENT_INSTALL_HOME_PROP}=${AGENT_INSTALL_HOME} \
   -D${AGENT_BUNDLE_HOME_PROP}=${AGENT_BUNDLE_HOME} \
   -XX:NewRatio=8 \
   -XX:+CMSClassUnloadingEnabled \
   -XX:+UseTLAB \
   -XX:+UseCompressedOops \
   -cp ${CLIENT_CLASSPATH} ${CLIENT_CLASS}"
After the agent successfully starts, some agent properties might get encrypted. If the agent cannot read the agent.scu file (which contains the encryption keys), it cannot decrypt the properties. The agent will not start and the agent.log or the wrapper.log file contains the error org.jasypt.exceptions.EncryptionOperationNotPossibleException.
  1. Stop the SAS Environment Manager agent.
  2. In the directory SAS-configuration/Lev2/Web/SASEnvironmentManager/agent-5.8.0-EE , delete the /data directory.
  3. In the directory SAS-configuration/Lev2/Web/SASEnvironmentManager/agent-5.8.0-EE/conf, delete the agent.scu file.
  4. Modify the encrypted property to a plain text value. In the file SAS-configuration/Lev2/Web/SASEnvironmentManager/agent-5.8.0-EE/agent.properties, set the property agent.setup.camPword to a plain text value (if it is encrypted, it will appear as ENC(XXXXXXXXXX)).
  5. In the file SAS-configuration/Lev2/Web/SASEnvironmentManager/agent-5.8.0-EE/auto-approve.properties, change all values to True.
  6. Restart the agent.
On Windows, if you use Windows Services to stop the Hyperic Agent service, you will receive the error message Windows could not stop the SAS[SAS94-Lev1] SAS Environment Manager Agent on Local Computer. Clicking OK in the error message dialog box seems to stop the service, but the System Event Log contains the error The SAS [SAS94-Lev1] SAS Environment Manager Agent service terminated with service-specific error Incorrect function..
Use the command line, rather than Windows Services, to stop the agent. The command to stop the agent is <sas_configuration_directory>/Lev2/Web/SASEnvironmentManager/agent-5.8.0-EE/bin/hq-agent.bat stop.