Troubleshoot logs
Find solutions to errors you might encounter while onboarding your logs.
This section provides possible solutions for errors you might encounter while onboarding your logs.
User does not have permissions to create API key
When adding a new data using the guided instructions in your project (Add data → Collect and analyze logs → Stream 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
You need to either:
- Ask an administrator to update your user role to at least Deployment access → Admin. 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
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
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 () 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
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
-
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
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
You can uninstall the current Elastic Agent using the elastic-agent uninstall
command, and run the script again.
Warning
Uninstalling the current Elastic Agent removes the entire current setup, including the existing configuration.
Waiting for Logs to be shipped... step never completes
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
Inspect the Elastic Agent logs for errors. See the Debug standalone Elastic Agents documentation for more on finding errors in Elastic Agent logs.