Docker安装zabbix打不开页面

环境:CentOS 7.8 ,更新内核到 lt 版本4.4.230,禁用selinux,防火墙放行了http和https服务。

#uname -r
4.4.230-1.el7.elrepo.x86_64

#docker version
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:46:54 2020
OS/Arch: linux/amd64
Experimental: false

安装zabbix

#docker pull mysql:5.7
#docker pull zabbix/zabbix-server-mysql:centos-4.4-latest
#docker pull zabbix/zabbix-web-nginx-mysql:centos-4.4-latest

#docker network create -d bridge zabbix_net
#docker run -d --name zabbix-mysql --network zabbix_net --restart always \
-e MYSQL_DATABASE=“zabbix” \
-e MYSQL_USER=“zabbix” \
-e MYSQL_PASSWORD=“zabbix123” \
-e MYSQL_ROOT_PASSWORD=“Root123” \
-p 3306:3306 \
-v /etc/localtime:/etc/localtime \
mysql:5.7 --character-set-server=utf8 --collation-server=utf8_bin

#docker run -d --name zabbix-server --network zabbix_net --restart always \
-e DB_SERVER_HOST=“zabbix-mysql” \
-e MYSQL_DATABASE=“zabbix” \
-e MYSQL_USER=“zabbix” \
-e MYSQL_PASSWORD=“zabbix123” \
-e MYSQL_ROOT_PASSWORD=“Root123” \
-v /etc/localtime:/etc/localtime:ro \
-v /data/docker/zabbix/alertscripts:/usr/lib/zabbix/alertscripts \
-v /data/docker/zabbix/externalscripts:/usr/lib/zabbix/externalscripts \
-p 10051:10051 \
zabbix/zabbix-server-mysql:centos-4.4-latest

docker run -d --name zabbix-web-nginx --network zabbix_net --restart=always \
-e DB_SERVER_HOST=“zabbix-mysql” \
-e MYSQL_DATABASE=“zabbix” \
-e MYSQL_USER=“zabbix” \
-e MYSQL_PASSWORD=“zabbix123” \
-e MYSQL_ROOT_PASSWORD=“Root123” \
-e ZBX_SERVER_HOST=“zabbix-server” \
-e PHP_TZ=“Asia/Shanghai” \
-p 80:80 \
zabbix/zabbix-web-nginx-mysql:centos-4.4-latest

#firewall-cmd --add-service=http --permanent
#firewall-cmd --add-service=https --permanent
#firewall-cmd --reload

当访问http://IP/zabbix时打不开,请问哪里不对?
之前用默认的内核版本3.10也是打不开zabbix,更新内核仍然打不开。
将-p 80:80换成-p 8080:8080并开放8080端口仍然打不开。拿官方网站的两个举例,完全照抄也打不开页面:
docker run --name zabbix-appliance -t
-p 10051:10051
-p 80:80
-d zabbix/zabbix-appliance:latest
这个打不开页面,另一个实例也打不开,郁闷了。

附上三个容器的日志:

[root@localhost ~]# docker logs zabbix-mysql
2020-07-13 17:24:54+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.30-1debian10 started.
2020-07-13 17:24:54+08:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
2020-07-13 17:24:54+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.30-1debian10 started.
2020-07-13 17:24:54+08:00 [Note] [Entrypoint]: Initializing database files
2020-07-13T09:24:54.988752Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-07-13T09:24:55.120325Z 0 [Warning] InnoDB: New log files created, LSN=45790
2020-07-13T09:24:55.144559Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2020-07-13T09:24:55.152269Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: b6810857-c4ea-11ea-8339-0242ac120002.
2020-07-13T09:24:55.152795Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid_executed’ cannot be opened.
2020-07-13T09:24:55.639020Z 0 [Warning] CA certificate ca.pem is self signed.
2020-07-13T09:24:55.804394Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2020-07-13 17:24:57+08:00 [Note] [Entrypoint]: Database files initialized
2020-07-13 17:24:57+08:00 [Note] [Entrypoint]: Starting temporary server
2020-07-13 17:24:57+08:00 [Note] [Entrypoint]: Waiting for server startup
2020-07-13T09:24:58.086770Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-07-13T09:24:58.088171Z 0 [Note] mysqld (mysqld 5.7.30) starting as process 77 …
2020-07-13T09:24:58.091376Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-07-13T09:24:58.091395Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-13T09:24:58.091398Z 0 [Note] InnoDB: Uses event mutexes
2020-07-13T09:24:58.091400Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-07-13T09:24:58.091401Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-13T09:24:58.091403Z 0 [Note] InnoDB: Using Linux native AIO
2020-07-13T09:24:58.091573Z 0 [Note] InnoDB: Number of pools: 1
2020-07-13T09:24:58.091651Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-07-13T09:24:58.093382Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-07-13T09:24:58.099946Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-07-13T09:24:58.101653Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-07-13T09:24:58.114694Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-07-13T09:24:58.126326Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-07-13T09:24:58.126450Z 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
2020-07-13T09:24:58.137513Z 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
2020-07-13T09:24:58.138010Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-07-13T09:24:58.138032Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-07-13T09:24:58.140350Z 0 [Note] InnoDB: Waiting for purge to start
2020-07-13T09:24:58.191094Z 0 [Note] InnoDB: 5.7.30 started; log sequence number 2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值