An exception occurred with log collection, and the associated server group is found to be exceptional.
The heartbeat between the server group and the CLS system is interrupted, resulting in a failure to collect and report logs. Possible causes of the server group exception include:
- The IP address is incorrect.
- The network is disconnected.
- LogListener process failure.
- LogListener is incorrectly configured.
Troubleshoot problems according to the above causes.
- Check whether the IP address added to the server group is correct.
- Check the IP address obtained by LogListener by running the following command:
cd loglistener/tools && ./check.sh
- Log in to the CLS Console, click Server Group Management, and check the IP address of the server group. The IP address must be the same as that for collection.
- Confirm whether the network is connected by running the following command:
telnet <region>.cls.myqcloud.com 80
<region> is the abbreviation for the region where CLS resides. For more information about regions, see Available Regions.
The following code appears under normal network connection. Otherwise, connection fails. Check the network and ensure normal connection.
- Check whether LogListener processes are running normally. Enter the installation directory and run the following command:
Normally, there are three processes:
cd loglistener/tools && ./p.sh
bin/loglistenerm -d #Daemon process
bin/loglistener --conf=etc/loglistener.conf #Main process
bin/loglisteneru -u --conf=etc/loglistener.conf #Update process
If any process fails, restart it. Enter the installation directory and run the following command:
cd loglistener/tools && ./start.sh
- Check whether the key and IP address are correctly configured in LogListener. Enter the installation directory to check configuration information by running the following command:
See the figure below:
cd loglistener/etc && cat loglistener.conf
- The key is the API key for the Tencent Cloud account or the collaborator. Project keys are not supported.
- group_ip in the configuration file must be consistent with the IP address entered in the server group on the console. Since LogListener obtains the server IP address automatically, check the consistency regularly when the server is bound to multiple ENIs.