Troubleshoot logs

edit

This section provides possible solutions for errors you might encounter while onboarding your logs.

User does not have permissions to create API key
edit

When adding a new data using the guided instructions in your project (Add dataCollect and analyze logsStream log files), if you don’t have the required privileges to create an API key, you’ll see the following error message:

You need permission to manage API keys

Solution
edit

You need to either:

  • Ask an administrator to update your user role to at least Developer by going to the user icon on the header bar and opening OrganizationMembers. Read more about user roles in Assign user roles and privileges. After your use role is updated, restart the onboarding flow.
  • Get an API key from an administrator and manually add the API to the Elastic Agent configuration. See Configure the Elastic Agent for more on manually updating the configuration and adding the API key.
Observability project not accessible from host
edit

If your Observability project is not accessible from the host, you’ll see the following error message after pasting the Install the Elastic Agent instructions into the host:

Failed to connect to {host} port {port} after 0 ms: Connection refused
Solution
edit

The host needs access to your project. Port 443 must be open and the project’s Elasticsearch endpoint must be reachable. You can locate your project’s endpoint by clicking the help icon (Help icon) and selecting Endpoints. Run the following command, replacing the URL with your endpoint, and you should get an authentication error with more details on resolving your issue:

curl https://your-endpoint.elastic.cloud
Download Elastic Agent failed
edit

If the host was able to download the installation script but cannot connect to the public artifact repository, you’ll see the following error message:

Download Elastic Agent

Failed to download Elastic Agent, see script for error.
Solutions
edit
  • If the combination of the Elastic Agent version and operating system architecture is not available, you’ll see the following error message:

    The requested URL returned error: 404

    To fix this, update the Elastic Agent version in the installation instructions to a known version of the Elastic Agent.

  • If the Elastic Agent was fully downloaded previously, you’ll see the following error message:

    Error: cannot perform installation as Elastic Agent is already running from this directory

    To fix this, delete previous downloads and restart the onboarding.

  • You’re an Elastic Cloud Enterprise user without access to the Elastic downloads page.
Install Elastic Agent failed
edit

If an Elastic Agent already exists on your host, you’ll see the following error message:

Install Elastic Agent

Failed to install Elastic Agent, see script for error.
Solution
edit

You can uninstall the current Elastic Agent using the elastic-agent uninstall command, and run the script again.

Uninstalling the current Elastic Agent removes the entire current setup, including the existing configuration.

Waiting for Logs to be shipped…​ step never completes
edit

If the Waiting for Logs to be shipped…​ step never completes, logs are not being shipped to your Observability project, and there is most likely an issue with your Elastic Agent configuration.

Solution
edit

Inspect the Elastic Agent logs for errors. See the Debug standalone Elastic Agents documentation for more on finding errors in Elastic Agent logs.