google / cadvisor

Analyzes resource usage and performance characteristics of running containers.
Other
17.07k stars 2.32k forks source link

unable to find thin_ls binary #1600

Open sheldon-xie opened 7 years ago

sheldon-xie commented 7 years ago

When i type: ~/golib/src/github.com/google/cadvisor# ./cadvisor get the error info: E0224 10:23:57.426509 23902 factory.go:291] devicemapper filesystem stats will not be reported: unable to find thin_ls binary

PS: https://github.com/google/cadvisor/blob/master/docs/development/build.md

avaitla commented 7 years ago

Similar issue with v0.24.1 on Ubuntu 16.04.2 (Note that Ubuntu 14.04.2 does not report the error)

# ./cadvisor --version
cAdvisor version v0.24.1 (ae6934c)
# ./cadvisor
E0309 02:17:15.862421   19527 factory.go:291] devicemapper filesystem stats will not be reported: unable to find thin_ls binary

The validate endpoint gives:

cAdvisor version: v0.24.1

OS version: Ubuntu 16.04.2 LTS

Kernel version: [Supported and recommended]
    Kernel version is 4.4.0-64-generic. Versions >= 2.6 are supported. 3.0+ are recommended.

Cgroup setup: [Supported and recommended]
    Available cgroups: map[cpuset:1 blkio:1 memory:1 freezer:1 perf_event:1 net_prio:1 hugetlb:1 cpu:1 cpuacct:1 devices:1 net_cls:1 pids:1]
    Following cgroups are required: [cpu cpuacct]
    Following other cgroups are recommended: [memory blkio cpuset devices freezer]
    Hierarchical memory accounting enabled. Reported memory usage includes memory used by child containers.

Cgroup mount setup: [Supported and recommended]
    Cgroups are mounted at /sys/fs/cgroup.
    Cgroup mount directories: blkio cpu cpu,cpuacct cpuacct cpuset devices freezer hugetlb memory net_cls net_cls,net_prio net_prio perf_event pids systemd 
    Any cgroup mount point that is detectible and accessible is supported. /sys/fs/cgroup is recommended as a standard location.
    Cgroup mounts:
    cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
    cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
    cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
    cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
    cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
    cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
    cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
    cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
    cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
    cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
    cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0

Docker version: [Supported and recommended]
    Docker version is 1.12.1. Versions >= 1.0 are supported. 1.2+ are recommended.

Docker driver setup: [Supported and recommended]
    Docker exec driver is . Storage driver is devicemapper.

Block device setup: [Supported, but not recommended]
    None of the devices support 'cfq' I/O scheduler. No disk stats can be reported.
     Disk "dm-4" Scheduler type "none".
     Disk "sda" Scheduler type "deadline".
     Disk "vda" Scheduler type "none".
     Disk "dm-0" Scheduler type "none".
     Disk "dm-1" Scheduler type "none".
     Disk "dm-2" Scheduler type "none".
     Disk "dm-3" Scheduler type "none".

Inotify watches: 

Managed containers: 
    /system.slice/mdadm.service
    /system.slice/iscsid.service
    /system.slice/keyboard-setup.service
    /system.slice/cloud-init-local.service
    /system.slice/cloud-final.service
    /system.slice/kmod-static-nodes.service
    /system.slice/systemd-udev-trigger.service
    /system.slice/lvm2-lvmetad.service
    /system.slice/rsyslog.service
    /user.slice/user-0.slice/session-4.scope
    /system.slice/systemd-tmpfiles-setup.service
    /system.slice/irqbalance.service
    /system.slice/system-serial\x2dgetty.slice
    /init.scope
    /system.slice/systemd-journald.service
    /system.slice/snapd.service
    /user.slice/user-0.slice
    /system.slice/console-setup.service
    /system.slice/lxd-containers.service
    /system.slice/docker.service
    /system.slice/apparmor.service
    /system.slice/setvtrgb.service
    /system.slice/systemd-timesyncd.service
    /system.slice
    /system.slice/lxcfs.service
    /system.slice/grub-common.service
    /docker
    /system.slice/ufw.service
    /system.slice/systemd-random-seed.service
    /system.slice/systemd-update-utmp.service
    /system.slice/systemd-machine-id-commit.service
    /system.slice/systemd-tmpfiles-setup-dev.service
    /system.slice/systemd-user-sessions.service
    /system.slice/networking.service
    /system.slice/acpid.service
    /system.slice/systemd-sysctl.service
    /system.slice/rc-local.service
    /user.slice/user-0.slice/user@0.service
    /system.slice/system-getty.slice
    /user.slice/user-0.slice/session-3.scope
    /system.slice/apport.service
    /system.slice/lvm2-monitor.service
    /system.slice/resolvconf.service
    /system.slice/ondemand.service
    /system.slice/polkitd.service
    /user.slice
    /system.slice/ssh.service
    /system.slice/cron.service
    /system.slice/open-iscsi.service
    /system.slice/systemd-udevd.service
    /system.slice/accounts-daemon.service
    /user.slice/user-0.slice/session-1.scope
    /system.slice/systemd-remount-fs.service
    /
    /system.slice/cgroupfs-mount.service
    /system.slice/cloud-init.service
    /system.slice/atd.service
    /system.slice/systemd-journal-flush.service
    /system.slice/cloud-config.service
    /system.slice/systemd-modules-load.service
    /system.slice/dbus.service
    /system.slice/systemd-logind.service

Also an issue with: Docker version is 17.03.0-ce

dashpole commented 7 years ago

@derekwaynecarr is this solved by #1588?

phhutter commented 7 years ago

any update ?

same issue with Docker 1.10.3-55.gite03ddb8.fc24 and cAdvisor-image google/cadvisor-canary:latest

E0415 23:19:25.560422 1 factory.go:330] devicemapper filesystem stats will not be reported: unable to find thin_ls binary

JerryDog commented 7 years ago

yum install device-mapper-persistent-data

phhutter commented 7 years ago

@JerryDog nope, already installed:

[root@localhost ~]# yum install device-mapper-persistent-data

Fedora 26 - x86_64 - Test Updates                                                                                                                                            2.2 MB/s |  17 MB     00:07
Fedora 26 - x86_64                                                                                                                                                           2.2 MB/s |  53 MB     00:23
Last metadata expiration check: 0:00:00 ago on Wed Apr 19 18:19:05 2017 CEST.
Package device-mapper-persistent-data-0.6.3-3.fc26.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
JerryDog commented 7 years ago

try to reinstall. or get the lastest cadvisor.

ps: My env is CentOS7.2.

cat cadvisor\devicemapper\util.go

`// ThinLsBinaryPresent returns the location of the thin_ls binary in the mount // namespace cadvisor is running in or an error. The locations checked are: // // - /sbin/ // - /bin/ // - /usr/sbin/ // - /usr/bin/ // // The thin_ls binary is provided by the device-mapper-persistent-data // package. func ThinLsBinaryPresent() (string, error) { var ( thinLsPath string err error )

for _, path := range []string{"/sbin", "/bin", "/usr/sbin/", "/usr/bin"} {
    // try paths for non-containerized operation
    // note: thin_ls is most likely a symlink to pdata_tools
    thinLsPath = filepath.Join(path, "thin_ls")
    _, err = os.Stat(thinLsPath)
    if err == nil {
        return thinLsPath, nil
    }
}

return "", fmt.Errorf("unable to find thin_ls binary")

}`