Git Product home page Git Product logo

Comments (7)

jangaraj avatar jangaraj commented on July 30, 2024

I'm not able to replicate your issue. You are probably using some non standard docker version/config, ... Pls provide more details about your infrastructure OS, docker version (source of you docker package), config, networking/firewall settings, ...

from dockbix-xxl.

cjd9023 avatar cjd9023 commented on July 30, 2024

@jangaraj
here my server info:
[root@docker ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@docker ~]# uname -a
Linux docker.exmaple.com 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@docker ~]# yum list|grep -i docker
docker-engine.x86_64 1.11.2-1.el7.centos @docker-main-repo
docker-engine-selinux.noarch 1.11.2-1.el7.centos @docker-main-repo

[root@docker ~]# docker info
Containers: 64
Running: 2
Paused: 0
Stopped: 62
Images: 101
Server Version: 1.11.2
Storage Driver: devicemapper
Pool Name: docker-0:39-9308151-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 26.59 GB
Data Space Total: 107.4 GB
Data Space Available: 80.79 GB
Metadata Space Used: 51.63 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.096 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Either use --storage-opt dm.thinpooldev or use --storage-opt dm.no_warn_on_loop_devices=true to suppress this warning.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.107-RHEL7 (2015-10-14)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge
Kernel Version: 3.10.0-327.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.79 GiB
Name: docker.exmaple.com
ID: NG7C:ZA2R:QUPK:WLVY:HLCU:7SFT:ANXC:CPIZ:AT65:FUG7:ZQQZ:CF6I
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

[root@docker ~]# systemctl status firewalld.service
?.firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)

Jun 21 03:34:37 docker.exmaple.com systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@docker ~]# getenforce
Disabled

from dockbix-xxl.

jangaraj avatar jangaraj commented on July 30, 2024

It seems to be OK. How looks /etc/hosts in the zabbix container? Do you use custom docker network, builtin Docker DNS server?

from dockbix-xxl.

cjd9023 avatar cjd9023 commented on July 30, 2024

@jangaraj
i try two ways to test; but i don't create network, using default .

  1. just tow docker run command to create two containers, upstairs
    2.i use docker-compose to create zabbix and zabbixdb container.

[root@docker zabbixdocker]# cat docker-compose.yaml
version: '2'
services:
zabbix:
#build: .
image: monitoringartist/zabbix-3.0-xxl
container_name: zabbix
#restart: always
networks:
- zxnet
ports:
- "80:80"
- "15001:15001"
- "15002:15002"
volumes:
- /root/zabbixdocker/alertscripts:/usr/local/share/zabbix/alertscripts
- /root/zabbixdocker/externalscripts:/usr/local/share/zabbix/externalscripts
- /root/zabbixdocker/modules:/usr/lib/zabbix/modules
- /etc/localtime:/etc/localtime:ro
links:
- zabbix-db
environment:
- ZS_DBHost=zabbix.db
- ZS_DBUser=zabbix
- ZS_DBPassword=zabbixpass
zabbix-db:
image: monitoringartist/zabbix-db-mariadb
container_name: zabbix.db
#restart: always
networks:
zxnet:
aliases:
- zabbix.db
expose:
- 3306
volumes:
- /root/zabbixdocker/zabbixdbdata:/var/lib/mysql
- /backups:/backups
- /etc/localtime:/etc/localtime:ro
environment:
- MARIADB_USER=zabbix
- MARIADB_PASS=zabbixpass

networks:
zxnet:

from dockbix-xxl.

cjd9023 avatar cjd9023 commented on July 30, 2024

@jangaraj

[root@docker zabbixdocker]# docker exec -it zabbix /bin/bash
[root@2d9f413879c9 /]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.20.0.3 2d9f413879c9
[root@2d9f413879c9 /]# ping zabbix.db
PING zabbix.db (172.20.0.2) 56(84) bytes of data.
64 bytes from zabbix.db.zabbixdocker_zxnet (172.20.0.2): icmp_seq=1 ttl=64 time=0.160 ms
64 bytes from zabbix.db.zabbixdocker_zxnet (172.20.0.2): icmp_seq=2 ttl=64 time=0.074 ms
64 bytes from zabbix.db.zabbixdocker_zxnet (172.20.0.2): icmp_seq=3 ttl=64 time=0.150 ms
^C
--- zabbix.db ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2098ms
rtt min/avg/max/mdev = 0.074/0.128/0.160/0.038 ms
[root@2d9f413879c9 /]# mysql -uzabbix -p -h zabbix.db
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 10.0.25-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> exit
Bye
[root@2d9f413879c9 /]# exit
exit
[root@docker zabbixdocker]# docker exec -it zabbix.db /bin/bash
[root@1a6e00366316 /]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.20.0.2 1a6e00366316
[root@1a6e00366316 /]# ping zabbix
PING zabbix (172.20.0.3) 56(84) bytes of data.
64 bytes from zabbix.zabbixdocker_zxnet (172.20.0.3): icmp_seq=1 ttl=64 time=0.063 ms
64 bytes from zabbix.zabbixdocker_zxnet (172.20.0.3): icmp_seq=2 ttl=64 time=0.115 ms
64 bytes from zabbix.zabbixdocker_zxnet (172.20.0.3): icmp_seq=3 ttl=64 time=0.105 ms
^C
--- zabbix ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 0.063/0.094/0.115/0.023 ms
[root@1a6e00366316 /]#

from dockbix-xxl.

jangaraj avatar jangaraj commented on July 30, 2024

You have network defined in your docker-compose:

networks:
- zxnet

=> you are using Docker DNS in your Docker network, e.g. you have DNS record zabbix.db.zabbixdocker_zxnet.

Also you are mixing zabbixdb vs zabbix.db, manual container start with docker compose => you issue report is not consistent, so I'm still not sure what are you doing.

Definetely you are not using recommended settings in your docker-compose. I'm not saying that's a problem, but you must to study Docker doc how to set it up properly on your own in this case.

from dockbix-xxl.

jangaraj avatar jangaraj commented on July 30, 2024

I'm closing this issue. Feel free to ask for commercial support for your issue.

from dockbix-xxl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.