Troubleshooting the Failure of eG Agent to Connect to the Citrix Hypervisor and Collect Metrics from it

Sometimes, if the eG agent is unable to establish a connection with the hypervisor, no tests can be run on the server. Similarly, if the eG tests are incorrectly configured, the tests will not execute in the desired manner, nor will the required metrics be reported.

To enable administrators to quickly isolate issues in connection and test configuration, the eG agent is bundled with a EgXenReport command. Upon execution, this command reports real-time statistics that shed light on connection bottlenecks between the agent and the hypervisor, improper test configuration, inexplicable delays in connection, and more. The procedure for executing this command may slightly differ depending upon the operating system on which the eG agent is executing. The OS-specific procedures have been detailed below.

Executing the 'EgXenReport' command on a Windows host

  1. Login to the Windows system hosting the eG agent.
  2. Go to the command prompt.
  3. Set the Java path variable using the following command:

    set path=.;<eg_install_dir>\JRE\bin;%path%

    Example: set path=.;C:\eGurkha\JRE\bin;%path%

  4. Set the classpath variable using the following command:

    set classpath=.;<eg_install_dir>\lib\ws-commons-util.jar;<eGurkha_Install_dir>\lib\XenSourceAPI.jar<eg_install_dir>\lib\xmlrpc-client.jar;<EG_INSTALL_DIR>\lib\xmlrpc-common.jar; <eg_install_dir>\lib\eg_agent.jar;<eGurkha_Install_dir>\lib\eg_util.jar;%classpath%

    Example: set classpath=.;C:\eGurkha\lib\ws-commons-util.jar;C:\eGurkha\lib\XenSourceAPI.jar;C:\eGurkha\lib\xmlrpc-client.jar;C:\eGurkha\lib\xmlrpc-common.jar;C:\eGurkha\lib\eg_agent.jar;C:\eGurkha\lib\eg_util.jar;%classpath%

  5. Run the EgXenReport command as indicated below:

    java EgXenReport <ipaddress> <port> <user> <password> <ssl>

    Here:

    <ipaddress> refers to the IP address of the managed XenServer in the eG Enterprise system

    <port> refers to the port number that was defined when adding the XenServer to the eG Enterprise system

    <user> refers to the user name configured against the xen user test parameter

    <password> refers to the password that you have specified against the xen password test parameter. This password should be provided in a decrypted format. For the decrypted password, do the following:

    • Open the eg_agents.ini file in the <eg_install_dir>\agent\config directory on the agent host.
    • Look for entries related to the tests that the agent has executed on the target Xen server.
    • These entries will typically include a -xen_password parameter, which will be followed by the decrypted xen password.
    • Make a note of the decrypted password, and substitute the <password> variable in the java EgXenReport command with it.

    <ssl> indicates the status of the ssl flag in the test configuration (i.e., whether true/false)

    Example: java EgXenReport 192.168.10.156 80 root C13120CB9E5D4B1423419897808BAE65 false

  6. Figure 1 displays the sample output of the command.

    Figure 1 : Sample output of the EgXenReport command if connection succeeds

  7. If the command is able to connect to the XenServer successfully, the output will indicate the same with the message Successfully Connected. In addition, the time taken for this connection to be established will also be reported as part of the output. With the help of this metric, you can quickly detect connection latencies/bottlenecks. Besides the above, the command collects a wide variety of host-level metrics from the hypervisor in real-time and reports the same in the output.
  8. On the other hand, if the command is unable to establish a connection with the hypervisor, the connection failure and the reasons for the same will be cited as part of the output (see Figure 2).

    Figure 2 : Sample output of the EgXenReport command if connection fails

    If the connection failed because incorrect values were provided as arguments to the EgXenReport command, then the output will indicate the exact argument that caused the failure. This way, you will be able to check the correctness of your test configuration, spot errors in the same, and change it.

Executing the 'EgXenReport' command on a Solaris/Linux host

  1. Login to the Solaris/Linux system hosting the eG agent.
  2. Go to the command prompt.
  3. Set the Java path variable using the following command:

    PATH=.:<eg_install_dir>/JRE/bin:$PATH

    export $PATH

    Example:

    PATH=.:/opt/egurkha/jre/bin:$PATH

    export $PATH

  4. Set the classpath variable using the following command:

    CLASSPATH=.:<eG_Install_dir>/lib/ws-commons-util.jar:<eG_Install_dir>/lib/XenSourceAPI.jar:<eG_Install_dir>/lib/xmlrpc-client.jar:<eG_Install_dir>/lib/xmlrpc-common.jar:<EG_INSTALL_DIR>/lib/eg_agent.jar:<EG_iNSTALL_DIR>/lib/eg_util.jar:$CLASSPATH

    export $CLASSPATH

    Example:

    CLASSPATH=.:/opt/egurkha/lib/ws-commons-util.jar:/opt/egurkha/lib/XenSourceAPI.jar:/opt/egurkha/lib/xmlrpc-client.jar:/opt/egurkha/lib/xmlrpc-common.jar:/opt/egurkha/lib/eg_agent.jar:/opt/egurkha/lib/eg_util.jar:$CLASSPATH

    export $CLASSPATH

  5. Run the EgXenReport command as indicated below:

    java EgXenReport <ipaddress> <port> <user> <password> <ssl>

    Here:

    <ipaddress> refers to the IP address of the managed XenServer in the eG Enterprise system

    <port> refers to the port number that was defined when adding the XenServer to the eG Enterprise system

    <user> refers to the user name configured against the xen user test parameter

    <password> refers to the password that you have specified against the xen password test parameter. This password should be provided in a decrypted format. For the decrypted password, do the following:

    • Open the eg_agents.ini file in the /opt/egurkha/agent\config directory on the agent host.
    • Look for entries related to the tests that the agent has executed on the target Xen server.
    • These entries will typically include a -xen_password parameter, which will be followed by the decrypted xen password.
    • Make a note of the decrypted password, and substitute the <password> variable in the java EgXenReport command with it.

    <ssl> indicates the status of the ssl flag in the test configuration (i.e., whether true/false)

    Example: java EgXenReport 192.168.10.156 80 root C13120CB9E5D4B1423419897808BAE65 false

  6. The sample output of the command and their interpretations are available in the Figure 2