Azure / azure-linux-extensions

Linux Virtual Machine Extensions for Azure
Apache License 2.0
307 stars 254 forks source link

[OmsAgentForLinux] Install fails on RHEL 8.0 #945

Closed johanburati closed 1 month ago

johanburati commented 4 years ago

OmsAgentForLinux extension fails on RHEL 8.0 (RedHat:RHEL:8:latest)

Error

[ExtensionOperationError] Non-zero exit code: 127, /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13/omsagent.py -install
[stdout]
2019/11/17 00:03:15.873967 INFO ExtHandler Added PID 53985 to cgroup /sys/fs/cgroup/cpu/walinuxagent.extensions/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux_1.12.13
2019/11/17 00:03:15.883341 INFO ExtHandler Added PID 53985 to cgroup /sys/fs/cgroup/memory/walinuxagent.extensions/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux_1.12.13                  

[stderr]
/usr/bin/env: ‘python’: No such file or directory

CommandExecution.log

2019/11/14 00:10:28.024454 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13
2019/11/15 00:06:57.814091 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13
2019/11/16 00:02:26.045469 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13
2019/11/17 00:03:20.191348 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.13
2019/11/18 00:05:11.926138 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15
2019/11/18 22:50:19.928213 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15
2019/11/19 00:10:00.904387 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15
2019/11/20 00:08:04.896762 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15
2019/11/21 00:07:54.823934 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15
2019/11/22 00:12:03.808938 INFO [Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15] Remove extension handler directory: /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.12.15
johanburati commented 4 years ago

The extension install fails because no unversioned python command is installed on the image:

# /usr/bin/env python --version
/usr/bin/env: ‘python’: No such file or directory

I recommend you install python 2.7 using the command below as I have seen some issues with some extensions and python 3.6:


sudo yum install python2 -y
sudo alternatives --set python /usr/bin/python2
johanburati commented 4 years ago

Also refer to https://github.com/Azure/azure-linux-extensions/issues/992

hestolz commented 4 years ago

@johanburati thanks for your input! I've noted elsewhere but we are working on a fix/strategy going forward for RHEL/etc new distros that are not proving python by default.

hestolz commented 1 month ago

Thank you for your submission. As previously announced, the Log Analytics agent has been deprecated and has no support as of August 31, 2024. If you use the Log Analytics agent to ingest data to Azure Monitor, migrate now to the new Azure Monitor agent. As part of deprecation, open issues and pull requests will be closed.