Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zabbix-server 4 not a valid Windows path #393

Closed
vlada-jerkovic opened this issue Oct 12, 2018 · 17 comments
Closed

Zabbix-server 4 not a valid Windows path #393

vlada-jerkovic opened this issue Oct 12, 2018 · 17 comments

Comments

@vlada-jerkovic
Copy link

I'm trying to start Zabbix on Windows 10 Pro Docker Version 18.06.1-ce-win73 (19507) which is switched to run Linux containers.
Error: Cannot create container for service zabbix-server: b'Mount denied:\nThe source path "\\etc\\localtime:/etc/localtime"\nis not a valid Windows path'

Is it possible to solve this issue for windows environment? It works on Centos 7 virtual machine, but I want to use on docker for Windows.

  • mysql error was solved by sharing the drive.

Commands I used:
git clone https://github.com/zabbix/zabbix-docker
git checkout trunk
docker-compose -f .\docker-compose_v3_alpine_mysql_latest.yaml pull
docker-compose -f .\docker-compose_v3_alpine_mysql_latest.yaml up -d

PS D:\docker\zabbix-docker> docker-compose -f .\docker-compose_v3_alpine_mysql_latest.yaml up -d
Creating network "zabbix-docker_zbx_net_backend" with driver "bridge"
Creating network "zabbix-docker_zbx_net_frontend" with driver "bridge"
Creating network "zabbix-docker_default" with the default driver
Creating zabbix-docker_zabbix-snmptraps_1 ... done
Creating zabbix-docker_zabbix-java-gateway_1 ... done
Creating zabbix-docker_db_data_mysql_1 ...
Creating zabbix-docker_mysql-server_1 ... error
Creating zabbix-docker_db_data_mysql_1 ... done
ERROR: for zabbix-docker_mysql-server_1 Cannot create container for service mysql-server: b'Drive has not been shared'

ERROR: for mysql-server Cannot create container for service mysql-server: b'Drive has not been shared'
ERROR: Encountered errors while bringing up the project.

PS D:\docker\zabbix-docker> docker-compose -f .\docker-compose_v3_alpine_mysql_latest.yaml up -d
Starting zabbix-docker_db_data_mysql_1 ...
zabbix-docker_zabbix-java-gateway_1 is up-to-date
Starting zabbix-docker_db_data_mysql_1 ... done
Creating zabbix-docker_mysql-server_1 ... done
Creating zabbix-docker_zabbix-server_1 ... error

** ERROR: for zabbix-docker_zabbix-server_1 Cannot create container for service zabbix-server: b'Mount denied:\nThe source path "\\etc\\localtime:/etc/localtime"\nis not a valid Windows path'

ERROR: for zabbix-server Cannot create container for service zabbix-server: b'Mount denied:\nThe source path "\\etc\\localtime:/etc/localtime"\nis not a valid Windows path' **
ERROR: Encountered errors while bringing up the project.

@dotneft
Copy link
Collaborator

dotneft commented Oct 14, 2018

Please remove these lines from compose file and try again.

@vlada-jerkovic
Copy link
Author

I removed from compose file but it still shows the same error.

  • /etc/localtime:/etc/localtime:ro
  • /etc/timezone:/etc/timezone:ro

PS D:\docker\zabbix-docker> docker-compose -f .\docker-compose_v3_alpine_mysql_latest.yaml up -d
WARNING: Some services (zabbix-agent, zabbix-java-gateway, zabbix-proxy-mysql, zabbix-proxy-sqlite3, zabbix-server, zabbix-snmptraps, zabbix-web-apache-mysql, zabbix-web-nginx-mysql) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use docker stack deploy to deploy to a swarm.
Starting zabbix-docker_db_data_mysql_1 ...
zabbix-docker_zabbix-java-gateway_1 is up-to-date
zabbix-docker_zabbix-snmptraps_1 is up-to-date
zabbix-docker_mysql-server_1 is up-to-date
Creating zabbix-docker_zabbix-server_1 ... error
Starting zabbix-docker_db_data_mysql_1 ... done
ERROR: for zabbix-docker_zabbix-server_1 Cannot create container for service zabbix-server: b'Mount denied:\nThe source path "\\etc\\localtime:/etc/localtime"\nis not a valid Windows path'

ERROR: for zabbix-server Cannot create container for service zabbix-server: b'Mount denied:\nThe source path "\\etc\\localtime:/etc/localtime"\nis not a valid Windows path'
ERROR: Encountered errors while bringing up the project.
PS D:\docker\zabbix-docker>

@dotneft
Copy link
Collaborator

dotneft commented Oct 17, 2018

remove all lines with these volumes :-)

@vlada-jerkovic
Copy link
Author

:-) I did that, but unfortunately it didn't help. Do you have any other idea?

@dotneft
Copy link
Collaborator

dotneft commented Oct 17, 2018

it is impossible, because only yaml file has such mount volume information.

@vlada-jerkovic
Copy link
Author

Please check this yaml file? Maybe I'm missing something.
1 removed all
/etc/localtime:/etc/localtime:ro
/etc/timezone:/etc/timezone:ro
2 Restared docker on my computer.
3 Executed commands:
docker-compose -f .\docker-compose_v3_alpine_mysql_latest.yaml down
docker-compose -f .\docker-compose_v3_alpine_mysql_latest.yaml up -d

docker-compose_v3_centos_mysql_latest .yaml.txt

@dotneft
Copy link
Collaborator

dotneft commented Oct 17, 2018

Looks good! Are you able to run "docker run -it --rm centos bash"?

@vlada-jerkovic
Copy link
Author

yes, it works.

@dotneft
Copy link
Collaborator

dotneft commented Oct 17, 2018

Hmmm .... you attached docker-compose_v3_centos_mysql_latest .yaml, but trying to run alpine version.

@vlada-jerkovic
Copy link
Author

Thanks. Attached modified compose file which is working on Windows 10 Pro. (rename file removing .txt extension)

Modified:
zabbix-web-apache-mysql:
image: zabbix/zabbix-web-apache-mysql:alpine-trunk
ports:
**- "80"

  • "443"**

docker-compose_v3_alpine_mysql_latest.yaml.txt

@VectorBCO
Copy link

this problem was not solved in a code
new members (as me) still facing with the same problem on at least centos_pgsql configuration

@dotneft
Copy link
Collaborator

dotneft commented Dec 27, 2019

these files are for example, just remove these "Linux-style" lines

@VectorBCO
Copy link

VectorBCO commented Dec 27, 2019

these files are for example, just remove these "Linux-style" lines
yes, I know but my expectation (and I believe not only my) that if someone will open official documentation https://www.zabbix.com/documentation/4.4/manual/installation/containers?s[]=docker
and execute Example1 or Example2 will get a result (nor a strange error)

at the same time there more than 1 problems with those examples: postgress sql container cannot get access to the folder
image

Otherwise I would like to see any notes in a documentation (link bellow) that example will not work on Docker on Windows and will require deep modifications

Simple solution in a code - add /etc/time congiguration to the repo and modify links in yaml files to use that time configs

@dotneft
Copy link
Collaborator

dotneft commented Dec 27, 2019

where from the output? What is that?

@VectorBCO
Copy link

VectorBCO commented Dec 27, 2019

Reproduction:
1 Install docker on windows (windows 10 pro 1903)
2 cd d:\projects # any location on a PC
3 git clone https://github.com/zabbix/zabbix-docker.git
4 open Yaml file and commmenting out all /etc/time config lines
5 execute command from example 1 or 2 : docker-compose -f .\docker-compose_v3_centos_pgsql_latest.yaml up -d
6 docker ps -a
image
7 docker logs <appache id>
image
8 docker logs <postgres-sql id>
image

@dotneft
Copy link
Collaborator

dotneft commented Dec 27, 2019

So, it is related to PostgreSQL. It is known PostgreSQL issue: docker-library/postgres#435 and docker/for-win#445

@VectorBCO
Copy link

Alexey, thanks for links
this comment solve my problem
docker/for-win#445 (comment)

Issue was in yaml file stored on zabbix repo (at least solution was in modification zabbix sample)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants