Open sbailliez opened 4 years ago
I have the same problem, have you find any solution to this?
I think this is coming from https://github.com/aws/amazon-ssm-agent/blob/fcd25443e49193c447cc1a8b4f9eb6207bc49705/agent/plugins/inventory/gatherers/application/dataProvider_unix.go#L90 and shouldn't be an issue, since it will use rpm right after failing.
I am also getting this error on CentOS. My Amazon Linux instances are not choking on this error, however, the CentOS instance appears to fail on that error.
I am also getting this error on CentOS. My Amazon Linux instances are not choking on this error, however, the CentOS instance appears to fail on that error.
Turns out in my case that the distribution has been repackaged as "Sangoma" so the SSM agent was not able to correctly identify that the OS was a CentOS base. I manually adjusted the /etc/os-release to work around the issue temporarily. Would it be reasonable for the agent to check the ID_LIKE section of os-release if the OS was not matched exactly?
Getting similar error in the Amazon Linux2
tartc390f798>${Homepage}<end80052f37>","Summary":"<startc390f798>${Description}<end80052f37>","PackageId":"<startc390f798>${Package}_${Version}_${Architecture}.deb<end80052f37>"},] with error - exec: "dpkg-query": executable file not found in $PATH
2020-11-29 21:25:35 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [13421e0a-78ec-458d-b5c7-32dc225ca8af.2020-11-29T21-25-35.027Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"<startc69c7d9b>${Package}<endf9bb5805>","Publisher":"<startc69c7d9b>${Maintainer}<endf9bb5805>","Version":"<startc69c7d9b>${Version}<endf9bb5805>","ApplicationType":"<startc69c7d9b>${Section}<endf9bb5805>","Architecture":"<startc69c7d9b>${Architecture}<endf9bb5805>","Url":"<startc69c7d9b>${Homepage}<endf9bb5805>","Summary":"<startc69c7d9b>${Description}<endf9bb5805>","PackageId":"<startc69c7d9b>${Package}_${Version}_${Architecture}.deb<endf9bb5805>"},] with error - exec: "dpkg-query": executable file not found in $PATH
[root@ip-172-31-23-111 ssm]# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
[root@ip-172-31-23-111 ssm]#
Running ssm-agent 2.3.1569.0
I have a ton of errors logs related to dpkg-query not found while this is running exclusively on Amazon Linux 1 or 2 OSes