Hi,
I have a Zabbix Docker appliance 4.0 LTS running un Ubuntu Server 18.
It uses a MariaDB database on the host located in /var/lib/mysql.
A colleague installed it years ago.
Unfortunately I don't know how exactly.
In console history I can find
My main question is: how exactly can I upgrade to v5.0?
Test using docker appliance 4.0 LTS
I wanted to test on a new local server:
[CODE]docker logs zabbix-server[CODE]
Try an alternative
Test using docker compose and the latest Zabbix release
I watched https://www.youtube.com/watch?v=ScKlF0ICVYA&ab_channel=Zabbix and learned a lot.
I noticed port 443 / 8433 is not working? The web UI only works using port 80 (apache) or 8443 (nginx).
I copied docker-compose_v3_alpine_mysql_latest.yaml to docker-compose_test.yaml and only kept the services zabbix-server, zabbix-web-nginx-mysql, zabbix-agent, mysql-server and db_data_mysql.
This works fine. Nice.
Now I want to use the database in /var/lib/mysql.
In the yaml file, I changed volumes:
- ./zbx_env/var/lib/mysql:/var/lib/mysql:rw
to
- /var/lib/mysql:/var/lib/mysql:rw
Docker kill and bring up. Then I get a warning:
So I killed again, removed that docker and brought up again. No warning now. Ok.
docker logs zabbixdocker_zabbix-server: MySQL server is not available. Waiting 5 seconds.
Now I can still access my local database with my admin user but when accessing the zabbix database, I get 1018 - Can't read dir of '.zabbix/' (errno: 13 "Permission denied").
I can't seem to get past this. Should be easy but I'm stuck. Getting desperate.
A clear, short procedure how to use local mysql database with Zabbix container would be great.
Please help, thanks!
I have a Zabbix Docker appliance 4.0 LTS running un Ubuntu Server 18.
It uses a MariaDB database on the host located in /var/lib/mysql.
A colleague installed it years ago.
Unfortunately I don't know how exactly.
In console history I can find
Code:
sudo docker run -td -p 127.0.0.1:8880:80 -p 0.0.0.0:10051:10051 -e "DB_SERVER_HOST=172.17.0.1" <... other parameters ...> -t zabbix/zabbix-appliance:alpine-4.0-latest
Test using docker appliance 4.0 LTS
I wanted to test on a new local server:
- Download an Ubuntu 18 server image, boot up and install.
- Installed MariaDB with an admin user which has all permissions.
- Create a database zabbix and a user zabbix which has all permissions on zabbix database except grant.
- Install docker
- Run Code:
sudo docker run -td -p 127.0.0.1:8880:80 -p 0.0.0.0:10051:10051 -e "DB_SERVER_HOST=172.17.0.1" -e MYSQL_DATABASE="zabbix" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix" -t zabbix/zabbix-appliance:alpine-4.0-latest
[CODE]docker logs zabbix-server[CODE]
**** MySQL server is not available. Waiting 5 seconds..
Test using docker compose and the latest Zabbix release
I watched https://www.youtube.com/watch?v=ScKlF0ICVYA&ab_channel=Zabbix and learned a lot.
I noticed port 443 / 8433 is not working? The web UI only works using port 80 (apache) or 8443 (nginx).
I copied docker-compose_v3_alpine_mysql_latest.yaml to docker-compose_test.yaml and only kept the services zabbix-server, zabbix-web-nginx-mysql, zabbix-agent, mysql-server and db_data_mysql.
This works fine. Nice.
Now I want to use the database in /var/lib/mysql.
In the yaml file, I changed volumes:
- ./zbx_env/var/lib/mysql:/var/lib/mysql:rw
to
- /var/lib/mysql:/var/lib/mysql:rw
Docker kill and bring up. Then I get a warning:
WARNING: Service "mysql-server" is using volume "/var/lib/mysql" from the previous container. Host mapping "/var/lib/mysql" has no effect. Remove the existing containers (with `docker-compose rm mysql-server`) to use the host volu...
docker logs zabbixdocker_zabbix-server: MySQL server is not available. Waiting 5 seconds.
Now I can still access my local database with my admin user but when accessing the zabbix database, I get 1018 - Can't read dir of '.zabbix/' (errno: 13 "Permission denied").
I can't seem to get past this. Should be easy but I'm stuck. Getting desperate.
A clear, short procedure how to use local mysql database with Zabbix container would be great.
Please help, thanks!
Comment