Azure / Azure/azure-linux-extensions

ADE handler stdout has many of null characters

Open
#1,690 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

## Problem
ADE handler stdout has many of null characters
![image](https://user-images.githubusercontent.com/7685494/228263215-ffd35046-181c-4ce4-9743-a60bd0ade7d1.png)
Due to this problem, POST telemetrydata fail with 400 error.

/var/log/waagent.log
```
2023-03-28T04:35:24.924360Z ERROR SendTelemetryHandler ExtHandler Event: name=WALinuxAgent, op=ReportEventErrors, message=DroppedEventsCount: 1
Reasons (first 5 errors): [ProtocolError] [Wireserver Exception] [ProtocolError] [Wireserver Failed] URI http://168.63.129.16/machine?comp=telemetrydata [HTTP Failed] Status Code 400: Traceback (most recent call last):
File "bin/WALinuxAgent-2.9.0.4-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 551, in call_wireserver
raise ProtocolError(msg)
azurelinuxagent.common.exception.ProtocolError: [ProtocolError] [Wireserver Failed] URI http://168.63.129.16/machine?comp=telemetrydata [HTTP Failed] Status Code 400

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "bin/WALinuxAgent-2.9.0.4-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 1026, in _send_event
self.send_encoded_event(provider_id, buf[provider_id])
File "bin/WALinuxAgent-2.9.0.4-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 1010, in send_encoded_event
resp = self.call_wireserver(restutil.http_post, uri, data, header)
File "bin/WALinuxAgent-2.9.0.4-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 558, in call_wireserver
raise ProtocolError("[Wireserver Exception] {0}".format(ustr(e)))
azurelinuxagent.common.exception.ProtocolError: [ProtocolError] [Wireserver Exception] [ProtocolError] [Wireserver Failed] URI http://168.63.129.16/machine?comp=telemetrydata [HTTP Failed] Status Code 400
, duration=0
```

## Repro steps:
1. Deploy ADE
2. SSH to the VM
3. sudo -i
4. cd /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.2.0.97
5. ./extension_shim.sh -c main/handle.py --enable > stdout
6. vim stdout

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.