If no heartbeats are detected in a Logtail machine group when you use Logtail to collect logs, you can troubleshoot the error manually or by using the Logtail automatic diagnostic tool. A Logtail machine group contains servers on which Logtail is installed. This topic describes how to troubleshoot the error if a Logtail machine group has no heartbeats.
Troubleshooting process
- Automatic diagnostics: Log Service provides the Logtail automatic diagnostic tool. You can select this method only if Logtail is installed on Linux servers. For more information, see How do I use the Logtail automatic diagnostic tool?
- Manual diagnostics: If the Logtail automatic diagnostic tool fails to identify the root cause of the error or Logtail is installed on a Windows server, perform the following steps.

Step 1: Check whether Logtail is installed
View the status of Logtail to check whether Logtail is installed on a server.
- Linux:
Run the following command to view the status of Logtail:
sudo /etc/init.d/ilogtaild status
If the following information is returned, Logtail is installed:ilogtail is running
- Windows:
- Open the Run window and enter
services.msc
to open the Services window. - View the status of the LogtailDaemon and LogtailWorker services.
If the services are in the Running state, Logtail is installed.
- Open the Run window and enter
- If Logtail is not installed, install Logtail by following the instructions that are
provided in Install Logtail on a Linux server or Install Logtail on a Windows server.
Make sure that you install Logtail based on the region where your Log Service project resides and the network type that is used for log collection. For more information about network types, see Select a network type.
- If Logtail is installed, proceed to the next step.
Step 2: Check whether the Logtail installation parameters are correctly configured
When you install Logtail, you must specify a correct Log Service endpoint for Logtail to connect to Log Service. You must enter the name of the region where your project resides and select the installation method based on the network type. For more information about region names, see Region names for Logtail installation. For more information about network types, see Select a network type. If the installation parameters are incorrectly configured or the Logtail installation script is invalid, heartbeats may not be detected on the server on which Logtail is installed. For more information about Log Service endpoints for different regions, see Endpoints.
- Linux: /usr/local/ilogtail/ilogtail_config.json
- 64-bit Windows: C:\Program Files (x86)\Alibaba\Logtail\ilogtail_config.json
- 32-bit Windows: C:\Program Files\Alibaba\Logtail\ilogtail_config.json
- If the check fails, the installation parameters are incorrectly configured. The system displays a message indicating that an incorrect installation command is used. In this case, you must reconfigure the installation parameters. For more information, see Install Logtail on a Linux server or Install Logtail on a Windows server.
- If the installation parameters are correctly configured, proceed to the next step.
Step 3: Check whether the IP address that is specified in the machine group is correct
- If the hostname of the server is not bound to an IP address, Logtail obtains the IP address of the first network interface controller (NIC) of the server.
- If the hostname of the server is bound to an IP address, Logtail obtains the IP address.
You can view the hostname and IP address in the /etc/hosts file.
Note You can obtain a hostname from the hostname field.
- If the IP address that is specified in the machine group is different from the IP
address that is obtained by Logtail, change the IP address in the machine group.
- If the IP address that is specified in the machine group is incorrect, change the IP address in the machine group. Wait 1 minute and then check the heartbeat status of the machine group.
- If you change the network configurations of the server on which Logtail is installed,
restart Logtail to update the IP address that is obtained by Logtail. For example,
you can modify the /etc/hosts file to change the network configurations. Then, change the IP address in the machine
groups to the value of the
ip
field in theapp_info.json
file. You can restart Logtail by using the following methods:- Linux:
sudo /etc/init.d/ilogtaild stop sudo /etc/init.d/ilogtaild start
- Windows:
- Open the Run window and enter
services.msc
to open the Services window. - Restart the LogtailWorker service.
- Open the Run window and enter
- Linux:
- If the IP address that is specified in the machine group is the same as the IP address that is obtained by Logtail, proceed to the next step.
Step 4: Check whether a user identifier is configured
If your server is an ECS instance that belongs to a different Alibaba Cloud account than Log Service, a server from a third-party cloud service provider, or an on-premises server in a data center, you must specify the ID of the Alibaba Cloud account to which Log Service belongs as a user identifier for your server after you install Logtail on your server. This way, Logtail is authorized to collect logs from your server across different accounts. For more information, see Configure a user identifier.
- If yes, the user identifier is configured.
- If no, configure a user identifier. For more information, see Configure a user identifier.
If the issue persists after you perform the preceding operations, submit a ticket and provide the information about your project, Logstore, and machine group. In addition, provide the app_info.json and ilogtail_config.json files as well as the output of the Logtail automatic diagnostic tool.