Menu
AWS Application Discovery Service
User Guide

Troubleshooting the AWS Application Discovery Agent

The following documentation can help you troubleshoot problems with Application Discovery Service that you might encounter while migrating your on-premises servers to Amazon EC2.

General Troubleshooting Tools

Before you begin troubleshooting specific issues, it helps to familiarize yourself with following basic approaches and tools.

Inspect the AWSApplication Discovery Agent Configuration

You can find and inspect your existing AWSApplication Discovery Agent configuration file for your operating system:

  • On Linux: /opt/aws/aws/agent/etc/agent.cfg

  • On Windows: %Program Files%AWS%agent.cfg

Run the AWS Application Discovery Agent in Offline Mode

To inspect the raw data captured by your agent, you can run it in offline mode. While in offline mode, data collected by the agent is logged to a local file instead of being sent to Application Discovery Service.

To enter offline mode

  1. Create a temporary folder, such as /var/tmp for Linux or C:\tmp for Windows.

  2. Edit the file the appropriate file for your operating system:

    • Linux: /opt/aws/aws/agent/etc/agent.cfg

    • Windows: C:\ProgramData\Amazon Web Services\AWS Agent\agent.cfg

    Add the following lines; in addition to your temporary folder path, supply a file name where indicated.

    Copy
    { "MustCollect" : true, "Publisher": "File", "MsgFile": "temporary path and file", "SystemPerformanceMsgs": true, "SystemPerformanceUpdateFrequency": 1, "SystemPerformanceMsgFrequency": 30, "ProcessPerformanceMsgs": true, "ProcessPerformanceUpdateFrequency": 1, "ProcessPerformanceMsgFrequency": 30, "ListeningPortInfo": true, "Users": true, "Groups": true, "NetworkInterfaces": true, "Terminals": true, "PackageInfo": true, "InstanceMetaData": true, "NetworkConnections": true, "ListeningPorts" : true, "Processes": true, "CodeModules": true, "KernelModules": true, "DnsEntries": true, "Subscribers": "discovery" }

    This configuration causes the agent to write events to a location specified by MsgFile. The metrics that the agent collects are also specified. (In normal operation, the AWS endpoint would supply this information.)

  3. Stop and restart the agent using the command appropriate for your operating system:

    • For Linux, sudo /etc/init.d/awsagent stop and sudo /etc/init.d/awsagent start

    • For Windows, sc stop awsagent and sc start awsagent

  4. To inspect what events have been emitted by the agent, open the log file that you designated.

Enable Logging for the AWS Application Discovery Agent

Complete the following procedure to create a log of agent actions.

To activate debugging

  1. Add the following lines to agent.cfg:

    Copy
    { "SubSystems" : "ALL", "LogLevels" : "LogAll", "LogFile" : "c:\\tmp\\agent.log" }
  2. Stop and restart the agent using the command appropriate for your operating system:

    • For Linux, sudo /etc/init.d/awsagent stop and sudo /etc/init.d/awsagent start

    • For Windows, sc stop awsagent and sc start awsagent

Troubleshooting the AWS Application Discovery Agent Data

The following actions can assist with troubleshooting AWS Application Discovery Agent data.

  • Although AWS does not currently support console-based data visualization for the Application Discovery Agent, you can manually convert the CSV format of discovery data to GraphML format and view it offline with any open-source visualization tool that can consume GraphML format.

  • Download sample agent data in CSV format.

  • Contact AWS Support to have obsolete discovery data purged from the repository.

Troubleshooting AWS Application Discovery Agent Configuration

Use the following information to diagnose or repair errors with AWS Application Discovery Agent configuration.

AWS Application Discovery Agent Fails to Register

If you encounter the error "Registration failure reason: Authentication failure: Authentication failed as the incoming request was not signed by AWS credentials”, try the following approaches:

  • If you are using Linux, confirm that the .aws/credentials file is located in the root user's home directory as described in On-Premises Installation for Linux. The file must not be in some other user's home directory.

  • If you are using Windows, confirm that the AWS credentials are properly installed, as described in On-Premises Installation for Microsoft Windows. Check that the permissions provided for the AWS credentials conform to the appropriate managed policy, as described in Attach Required IAM User Policies.

  • Run the following commands:

    • Linux: /opt/aws/awsagent/etc/agent.cfg

    • Windows: C:\ProgramData\Amazon Web Services\AWS Agent .\AWSAgentStatus.exe

  • Check the region in the output. Agents should be configured to communicate with the endpoint of ADS in the us-west-2 region.

  • Check the time skew from your NTP servers and correct if necessary. Incorrect time skew causes the agent registration call to fail.

  • Check that you are meeting all prerequisites, including OS support. If you attempt to install the inspector agent package on Ubuntu and the operation fails with message containing "Failed to find an inspector agent package for this OS...", contact AWS Support.

  • If you use agentless discovery and don’t see inventory information after starting data collection with the connector, confirm that you have registered the connector with your vCenter Server instance. Agentless discovery does not support a standalone ESX host that is not part of the vCenter Server instance.

  • If you are using Windows 2008 R2, confirm that the security patches are up-to-date.

Failure to Create AWS Application Discovery Agent Credentials for Windows Server

If you try to install the AWS Application Discovery Agent on Windows Server but cannot find or create the credentials folder at %SystemRoot%\system32\config\systemprofile\.aws, you need to create the folder using the command line. If you still cannot create the .aws folder, try appending a period to the folder name (that is, .aws.).

Upgrading from Preview Versions

If you installed a Linux preview version of the AWS Application Discovery Agent, you must uninstall it or you won't be able to install the current version. This does not apply to the agent for Windows. Use the following command to download the removal script to your Linux instance or server:

Copy
curl -O https://d1wk0tztpsntt1.cloudfront.net/linux/latest/remove_preview_agent

To remove the preview agent, run the following command:

Copy
sudo ./remove_preview_agent