dpkg-query": executable file not found in $PATH flooding errors logs on Amazon Linux (1 or 2)
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
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
```
2020-08-16 19:43:15 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [b3e80509-330a-4358-bcbb-2abe7853e7ed.2020-08-16T19-43-15.034Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"${Package}","Publisher":"${Maintainer}","Version":"${Version}","ApplicationType":"${Section}","Architecture":"${Architecture}","Url":"${Homepage}","Summary":"${Description}","PackageId":"${Package}_${Version}_${Architecture}.deb"},] with error - exec: "dpkg-query": executable file not found in $PATH
2020-08-16 20:13:26 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [b3e80509-330a-4358-bcbb-2abe7853e7ed.2020-08-16T20-13-26.043Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"${Package}","Publisher":"${Maintainer}","Version":"${Version}","ApplicationType":"${Section}","Architecture":"${Architecture}","Url":"${Homepage}","Summary":"${Description}","PackageId":"${Package}_${Version}_${Architecture}.deb"},] with error - exec: "dpkg-query": executable file not found in $PATH
2020-08-16 20:43:45 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [b3e80509-330a-4358-bcbb-2abe7853e7ed.2020-08-16T20-43-45.074Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"${Package}","Publisher":"${Maintainer}","Version":"${Version}","ApplicationType":"${Section}","Architecture":"${Architecture}","Url":"${Homepage}","Summary":"${Description}","PackageId":"${Package}_${Version}_${Architecture}.deb"},] with error - exec: "dpkg-query": executable file not found in $PATH
2020-08-16 21:14:03 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [b3e80509-330a-4358-bcbb-2abe7853e7ed.2020-08-16T21-14-03.037Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"${Package}","Publisher":"${Maintainer}","Version":"${Version}","ApplicationType":"${Section}","Architecture":"${Architecture}","Url":"${Homepage}","Summary":"${Description}","PackageId":"${Package}_${Version}_${Architecture}.deb"},] with error - exec: "dpkg-query": executable file not found in $PATH
2020-08-16 21:44:06 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [b3e80509-330a-4358-bcbb-2abe7853e7ed.2020-08-16T21-44-06.048Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"${Package}","Publisher":"${Maintainer}","Version":"${Version}","ApplicationType":"${Section}","Architecture":"${Architecture}","Url":"${Homepage}","Summary":"${Description}","PackageId":"${Package}_${Version}_${Architecture}.deb"},] with error - exec: "dpkg-query": executable file not found in $PATH
2020-08-16 22:14:26 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [b3e80509-330a-4358-bcbb-2abe7853e7ed.2020-08-16T22-14-26.034Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"${Package}","Publisher":"${Maintainer}","Version":"${Version}","ApplicationType":"${Section}","Architecture":"${Architecture}","Url":"${Homepage}","Summary":"${Description}","PackageId":"${Package}_${Version}_${Architecture}.deb"},] with error - exec: "dpkg-query": executable file not found in $PATH
2020-08-16 22:44:45 ERROR [getApplicationData @ dataProvider_unix.go.268] [ssm-document-worker] [b3e80509-330a-4358-bcbb-2abe7853e7ed.2020-08-16T22-44-45.035Z] [DataBackend] [pluginName=aws:softwareInventory] [aws:softwareInventory] Failed to execute command : dpkg-query [-W -f={"Name":"${Package}","Publisher":"${Maintainer}","Version":"${Version}","ApplicationType":"${Section}","Architecture":"${Architecture}","Url":"${Homepage}","Summary":"${Description}","PackageId":"${Package}_${Version}_${Architecture}.deb"},] with error - exec: "dpkg-query": executable file not found in $PATH
```
Contributor guide
Research direction
Read dataProvider_unix.go around line 268 and trace the software-inventory path that emits the shown command error. Reproduce or inspect the behavior on Amazon Linux 1 or 2; done means dpkg-query is no longer repeatedly attempted there and the resulting agent logs no longer flood with these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, linux
- Domain
- backend, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100