Open jbcpollak opened 3 years ago
I am also facing the same issue with the same exact setup, running docker on Windoes with WSL2 enabled. Any suggestion to fix the issue.
ddagent_1 | 2021-03-08 22:14:53 UTC | CORE | ERROR | (pkg/collector/runner/runner.go:292 in work) | Error running check disk: [{"message": "[Errno 2] No such file or directory: '/host/proc/self'", "traceback": "Traceback (most recent call last):\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\", line 901, in run\n self.check(instance)\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/disk/disk.py\", line 115, in check\n for part in psutil.disk_partitions(all=self._include_all_devices):\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/psutil/__init__.py\", line 2027, in disk_partitions\n return _psplatform.disk_partitions(all)\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/psutil/_pslinux.py\", line 1167, in disk_partitions\n mounts_path = os.path.realpath(\"%s/self/mounts\" % procfs_path)\n File \"/opt/datadog-agent/embedded/lib/python3.8/posixpath.py\", line 391, in realpath\n path, ok = _joinrealpath(filename[:0], filename, {})\n File \"/opt/datadog-agent/embedded/lib/python3.8/posixpath.py\", line 439, in _joinrealpath\n path, ok = _joinrealpath(path, os.readlink(newpath), seen)\nFileNotFoundError: [Errno 2] No such file or directory: '/host/proc/self'\n"}]
After adding the environment variable "DD_PROCFS_PATH: /proc", I am no longer seeing the error. Reference https://github.com/DataDog/integrations-core/issues/1550.
Running the datadog agent container on Docker for Windows with the WSL2 backend, I get an error that /host/proc/self is not found.
I am using docker-compose, with the following config:
Describe what happened:
Describe what you expected:
No error
Steps to reproduce the issue:
setup docker agent as above
Additional environment details (Operating System, Cloud provider, etc):
This is Windows 10 (Home, if that matters), WSL2, Docker for Desktop and Ubuntu 20.04
I belief the issue appears similar to this bug but I don't think they are related.
The agent status report is: