monitoringartist / dockbix-agent-xxl

:whale: Dockerized Zabbix agent with Docker metrics and host metrics support for CoreOS, RHEL, CentOS, Ubuntu, Debian, Fedora, Boot2docker, Photon OS, Amazon Linux, ...
https://hub.docker.com/r/monitoringartist/dockbix-agent-xxl-limited/
Other
182 stars 54 forks source link

zabbix-agent start failed #16

Closed aaron0428 closed 7 years ago

aaron0428 commented 8 years ago

I can not start the zabbix-agent-xxl.here is the logs Zocker XXL v0.9.4b public limited version Copyright (C) 2014-2016 Jan Garaj - www.monitoringartist.com Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only. Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). Press Ctrl+C to exit.

10:20160907:080011.397 Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185).
10:20160907:080011.397 **** Enabled features ****
10:20160907:080011.397 IPv6 support:          YES
10:20160907:080011.397 TLS support:           YES
10:20160907:080011.397 **************************
10:20160907:080011.397 using configuration file: /etc/zabbix/zabbix_agentd.conf
10:20160907:080011.398 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so
10:20160907:080011.398 agent #0 started [main process]
11:20160907:080011.398 agent #1 started [collector]
12:20160907:080011.399 agent #2 started [listener #1]
13:20160907:080011.400 agent #3 started [listener #2]
14:20160907:080011.401 agent #4 started [listener #3]

remove /lib/x86_64-linux-gnu//security: directory not empty

how can i reslove this problem,ths!!!

jangaraj commented 8 years ago

I don't see any issue. Please provide full command how did you start container + docker ps

aaron0428 commented 8 years ago

thank you!!! [root@docker02 ~]# docker run \

--name=zabbix-agent-xxl \ -h $(hostname) \ -p 10050:10050 \ -v /:/rootfs \ -v /var/run:/var/run \ -e "ZA_Server=<10.10.16.143>" \ -d monitoringartist/zabbix-agent-xxl-limited:latest eb5f7428c4e4d5246d4cb9da87c68b03a6d979044052dd3ad2f8577493c0ed69

[root@docker02 ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES eb5f7428c4e4 monitoringartist/zabbix-agent-xxl-limited:latest "/zocker-xxl" 6 seconds ago Exited (0) 3 seconds ago zabbix-agent-xxl 991e905648e3 e36910b432b7 "/bin/sh -c 'yum -y i" About an hour ago Up About an hour amazing_lalande

[root@docker02 ~]# docker logs zabbix-agent-xxl Zocker XXL v0.9.4b public limited version Copyright (C) 2014-2016 Jan Garaj - www.monitoringartist.com Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only. Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). Press Ctrl+C to exit.

11:20160907:083754.142 Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185).
11:20160907:083754.142 **** Enabled features ****
11:20160907:083754.142 IPv6 support:          YES
11:20160907:083754.142 TLS support:           YES
11:20160907:083754.142 **************************
11:20160907:083754.142 using configuration file: /etc/zabbix/zabbix_agentd.conf
11:20160907:083754.143 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so
11:20160907:083754.143 agent #0 started [main process]
12:20160907:083754.143 agent #1 started [collector]
14:20160907:083754.143 agent #3 started [listener #2]
15:20160907:083754.143 agent #4 started [listener #3]
13:20160907:083754.143 agent #2 started [listener #1]

remove /lib/x86_64-linux-gnu//security: directory not empty

jangaraj commented 8 years ago

OK, thx. What is your OS and docker info? How did you install docker?

aaron0428 commented 8 years ago

OK, thx. My OS is centos7!! I use this command to install docker "yum install -y docker-engine"

docker info

Containers: 2 Running: 1 Paused: 0 Stopped: 1 Images: 11 Server Version: 1.12.0 Storage Driver: overlay Backing Filesystem: xfs Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge overlay null Swarm: active NodeID: 2v0o1v3myn4rteurzulb6lbi5 Is Manager: false Node Address: 10.10.16.91 Runtimes: runc Default Runtime: runc Security Options: seccomp Kernel Version: 4.7.2-1.el7.elrepo.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 11.73 GiB Name: docker02 ID: 54D4:YQHG:E564:P53Y:HZDD:W5XV:NUKG:FWCQ:5I3O:K4EZ:RV2J:547Y Docker Root Dir: /data/docker/images Debug Mode (client): false Debug Mode (server): true File Descriptors: 31 Goroutines: 119 System Time: 2016-09-07T16:50:52.139908896+08:00 EventsListeners: 0 Registry: https://index.docker.io/v1/ WARNING: bridge-nf-call-ip6tables is disabled Insecure Registries: docker.16qian.cn 127.0.0.0/8

jangaraj commented 8 years ago

I'm not able to replicate your issue. I guess your storage driver is a problem (overlay is not IMHO standard for CentOS). Try to run container with --privileged parameter.

aaron0428 commented 8 years ago

After start the container,why to remove this directory /lib/x86_64-linux-gnu//security

[root@docker02 ~]# docker logs zabbix-agent-xxl Zocker XXL v0.9.4b public limited version Copyright (C) 2014-2016 Jan Garaj - www.monitoringartist.com Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only. Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). Press Ctrl+C to exit.

11:20160908:044929.332 Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185).
11:20160908:044929.332 **** Enabled features ****
11:20160908:044929.332 IPv6 support:          YES
11:20160908:044929.332 TLS support:           YES
11:20160908:044929.332 **************************
11:20160908:044929.332 using configuration file: /etc/zabbix/zabbix_agentd.conf
11:20160908:044929.333 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so
11:20160908:044929.333 agent #0 started [main process]
12:20160908:044929.334 agent #1 started [collector]
13:20160908:044929.334 agent #2 started [listener #1]
15:20160908:044929.334 agent #4 started [listener #3]
14:20160908:044929.335 agent #3 started [listener #2]
 remove /lib/x86_64-linux-gnu//security: directory not empty
jangaraj commented 8 years ago

It's a part of container initialization process. Did you try --privileged param? Or try to install docker from docker repo instead of Centos/Rhel docker version.

aaron0428 commented 8 years ago

I have used --privileged param to run the container, but the problem still persists, not a solution! My docker is install from docker repo!!

[root@docker02 ~]# docker run \

--name=zabbix-agent-xxl \ -h $(hostname) \ -p 10050:10050 \ -v /:/rootfs \ -v /var/run:/var/run \ -e "ZA_Server=<10.10.16.143>" \ --privileged \ -d monitoringartist/zabbix-agent-xxl-limited:latest 4dc311e3d16ca5796c0c68fbe8dc303d7b7e0b9d628c420c4d8a8f8941e52d2c [root@docker02 ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4dc311e3d16c monitoringartist/zabbix-agent-xxl-limited:latest "/zocker-xxl" 2 seconds ago Exited (0) Less than a second ago zabbix-agent-xxl [root@docker02 ~]# docker logs zabbix-agent-xxl Zocker XXL v0.9.4b public limited version Copyright (C) 2014-2016 Jan Garaj - www.monitoringartist.com Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only. Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). Press Ctrl+C to exit.

11:20160908:101449.353 Starting Zabbix Agent [docker02]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185).
11:20160908:101449.353 **** Enabled features ****
11:20160908:101449.353 IPv6 support:          YES
11:20160908:101449.353 TLS support:           YES
11:20160908:101449.353 **************************
11:20160908:101449.353 using configuration file: /etc/zabbix/zabbix_agentd.conf
11:20160908:101449.354 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so
11:20160908:101449.354 agent #0 started [main process]
12:20160908:101449.354 agent #1 started [collector]
13:20160908:101449.354 agent #2 started [listener #1]
14:20160908:101449.356 agent #3 started [listener #2]
15:20160908:101449.357 agent #4 started [listener #3]
remove /lib/x86_64-linux-gnu//security: directory not empty
jangaraj commented 8 years ago

Try to disable seccomp for container: --security-opt seccomp=unconfined and if it doesn't work try to use devicemapper storage driver.

aaron0428 commented 8 years ago

Hi!! I used devicemapper storage driver and It is work !! thank you very much!!! why it doesn't work with overlay!!!

jangaraj commented 8 years ago

Overlay is IMHO too strict (or too proper). Also it's not common to have overlay on CentOS.

santiarias commented 7 years ago

Is there any other possible solution besides changing the storage driver to devicemapper? I have quite a few containers running with overlay.

jangaraj commented 7 years ago

I don't know. It's not in the scope of this project. Try some overlay (kernel) developer forum. BTW: https://github.com/docker/docker/issues/13108

santiarias commented 7 years ago

You are right, thank you so much!

sergsadovyi commented 7 years ago

To fix problem with overlay driver you need to format your xfs partition (with /var/lib/docker). mkfs -t xfs -n ftype=1 /PATH/TO/DEVICE

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.2_Release_Notes/technology-preview-file_systems.html Note that XFS file systems must be created with the -n ftype=1 option enabled for use as an overlay. With the rootfs and any file systems created during system installation, set the --mkfsoptions=-n ftype=1 parameters in the Anaconda kickstart. When creating a new file system after the installation, run the # mkfs -t xfs -n ftype=1 /PATH/TO/DEVICE command. To determine whether an existing file system is eligible for use as an overlay, run the # xfs_info /PATH/TO/DEVICE | grep ftype command to see if the ftype=1 option is enabled.