Azure / Azure/azure-linux-extensions
ADE handler stdout has many of null characters
- 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

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.