If an error occurs when you use Logtail to collect logs, you can use the automatic diagnostic tool of Logtail to check whether the error occurs on the Logtail client. This way, you can efficiently identify and fix the error.
Diagnostic process

Download and run the diagnostic tool
Check the heartbeat status of the machine group
If you enter 1 to check the issue that Log Service cannot receive heartbeats from the Logtail client, the automatic diagnostic tool of Logtail performs the following checks:
Check whether errors occur when Logtail collects logs
If you enter 2 to check whether errors occur when Logtail collects logs, the automatic diagnostic tool of Logtail performs the following checks:
Submit a ticket if the issue still persists when all checks are passed
y
for the last option in the script and press Enter. Information similar to the following
example is returned: [Input]: please make sure all the check items above have passed. If the problem persists, please copy all the outputs and submit a ticket in the ticket system. : (y/N)y
Press y to submit a ticket. You must include the output of the check script in the ticket.
Run a quick check
./checkingtool.sh --logFile [LogFileFullPath]
command to perform a quick check. If an Error message appears, fix the error as
prompted.

Common Logtail collection errors
You can use the automatic diagnostic tool of Logtail to identify the causes of errors that occur when Logtail collects logs and fix the errors based on the causes. The following table describes the causes of common Logtail collection errors and the related solutions.
Error | Solution |
---|---|
Installation files are missing. | Reinstall Logtail. |
Logtail is not running. | Run the /etc/init.d/ilogtaild start command to start Logtail.
|
Multiple Logtail processes exist. |
|
Port 443 is disabled. | Configure the firewall to enable port 443. |
The configuration server cannot be found. | Check whether Logtail is installed on a Linux server.
If Logtail is not installed on the Linux server, rerun the installation command. For more information, see Install Logtail on a Linux server. |
The user configuration does not exist. | Check whether the following operations are performed:
|
The specified log file cannot be matched. | Check whether the Logtail configuration is valid. |
The specified log file is matched by more than one Logtail configurations. | If the log file is matched by more than one Logtail configurations, Logtail randomly selects a Logtail configuration. We recommend that you use only one Logtail configuration to match the log file. |
Common parameters of the diagnostic tool
Parameter | Description |
---|---|
--help |
Views the help documentation. |
--logFile [LogFileFullPath] |
Checks whether Logtail collects logs from the LogFileFullPath path and checks the properties of the basic runtime environment of Logtail, such
as the integrity of installation files, runtime status, Alibaba Cloud account ID,
and network connectivity.
|
--logFileOnly [LogFileFullPath] |
Checks whether Logtail collects logs from the LogFileFullPath path.
|
--envOnly |
Checks the properties of the runtime environment of Logtail. |