zabbix / zabbix-docker

Official Zabbix Dockerfiles
https://www.zabbix.com
GNU Affero General Public License v3.0
2.38k stars 1.37k forks source link

new dockerfiles bugreport #1128

Closed spiralshapeturtle closed 9 months ago

spiralshapeturtle commented 9 months ago
SUMMARY

I updated my Zabbix docker environment today and noticed some issues as described below. I'm unable to start my docker compose instance.

OS / ENVIRONMENT / Used docker-compose files

Debian 12 Latest git pull

CONFIGURATION

Also tested in a clean greenfield folder, same results. My current installation and my fresh install both have the same errors.

STEPS TO REPRODUCE
git clone https://github.com/zabbix/zabbix-docker.git

root@pve:~/docker/zabbix-docker# docker compose up -d
validating /root/docker/zabbix-docker/compose.yaml: services.zabbix-proxy-mysql.ulimits.nproc must be a integer

Then i remove the nproc rules from the docker files and the validation moves on to the next stop:


root@pve:~/docker/zabbix-docker# docker compose up -d
service ports services.zabbix-proxy-mysql.ports.[0] is missing a target port

root@pve:~/docker/zabbix-docker# docker compose up -d
service ports services.zabbix-agent.ports.[0] is missing a target port
EXPECTED RESULTS

There seem to be an issue with ports in the new files, I'm unable to detect where the fault is located could you look with me? The nproc: data is inserted to the code with a reason, would be nice to fix this too. I don't know if there are other faults popping up after fixing the ports issue.

ACTUAL RESULTS
dotneft commented 9 months ago

what compose version do you use?

spiralshapeturtle commented 9 months ago

Thanks Alex, please see below

root@pve:~/docker/zabbix-docker# docker compose version
Docker Compose version v2.24.1
root@pve:~/docker/zabbix-docker# docker version
Client:
 Version:           20.10.24+dfsg1
 API version:       1.41
 Go version:        go1.19.8
 Git commit:        297e128
 Built:             Thu May 18 08:38:34 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.24+dfsg1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.8
  Git commit:       5d6db84
  Built:            Thu May 18 08:38:34 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.20~ds1
  GitCommit:        1.6.20~ds1-1+b1
 runc:
  Version:          1.1.5+ds1
  GitCommit:        1.1.5+ds1-1+b1
 docker-init:
  Version:          0.19.0
  GitCommit:
root@pve:~/docker/zabbix-docker#
dotneft commented 9 months ago

Just checked on:

# docker compose version
Docker Compose version v2.24.2

no issues at all with vanilla https://github.com/zabbix/zabbix-docker.git. Do you have .env file in git cloned directory?

spiralshapeturtle commented 9 months ago
root@pve:~/docker/zabbix-docker# apt update
Get:1 https://download.docker.com/linux/debian bookworm InRelease [43.3 kB]
Hit:2 http://security.debian.org bookworm-security InRelease
Get:3 https://download.docker.com/linux/debian bookworm/stable amd64 Packages [15.2 kB]
Hit:4 http://ftp.nl.debian.org/debian bookworm InRelease
Get:5 http://ftp.nl.debian.org/debian bookworm-updates InRelease [52.1 kB]
Hit:6 http://download.proxmox.com/debian/pve bookworm InRelease
Hit:7 https://packagecloud.io/ookla/speedtest-cli/debian bookworm InRelease
Fetched 111 kB in 2s (57.6 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root@pve:~/docker/zabbix-docker# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  docker-compose-plugin

Its seems a docker compose issue, the minimum version is 2.24.2 after upgrading the machine starts. I was one version behind yours. Now its all fixed ;-)

Thanks, sometimes it could be simple.

root@pve:~/docker/zabbix-docker# docker compose up -d
[+] Running 4/4
 ✔ Container zabbix-docker-db-data-mysql-1           Started                                                                                           0.8s
 ✔ Container zabbix-docker-mysql-server-1            Started                                                                                           0.8s
 ✔ Container zabbix-docker-zabbix-web-nginx-mysql-1  Started                                                                                           1.7s
 ✔ Container zabbix-docker-zabbix-server-1           Started