jhipster / jhipster-console

JHipster monitoring & alerting console, based on ELK
Other
226 stars 162 forks source link

jhipster-alert error #105

Open victorinno opened 6 years ago

victorinno commented 6 years ago

Hi there, I cloned the application and started it with the docker-compose up -d but i got the following error:

WARNING: The state variable is not set. Defaulting to a blank string. Starting bootstrap_jhipster-logstash_1 ... done Starting bootstrap_jhipster-console_1 ... Starting bootstrap_jhipster-alerter_1 ... error Starting bootstrap_jhipster-elasticsearch_1 ... Starting bootstrap_jhipster-zipkin_1 ... Starting bootstrap_jhipster-curator_1 ...

Starting bootstrap_jhipster-console_1 ... done s caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/hostmnt/c/Users/rotc/Documents/GitHub/jhipster-console/alerts/Starting bootstrap_jhipster-elasticsearch_1 ... done Starting bootstrap_jhipster-zipkin_1 ... done Starting bootstrap_jhipster-curator_1 ... done Starting bootstrap_jhipster-import-dashboards_1 ... done

ERROR: for jhipster-alerter Cannot start service jhipster-alerter: b'OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/hostmnt/c/Users/rotc/Documents/GitHub/jhipster-console/alerts/config.yaml\\\" to rootfs \\\"/var/lib/docker/overlay2/19f8ca442a0ed3d30374471d8ed1270353da1a074e84d65ac9b225154b286430/merged\\\" at \\\"/var/lib/docker/overlay2/19f8ca442a0ed3d30374471d8ed1270353da1a074e84d65ac9b225154b286430/merged/opt/elastalert/config.yaml\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type' ERROR: Encountered errors while bringing up the project.

My docker version is Docker version 18.06.1-ce, build e68fc7a And I´m using windows 10

MaikoKingma commented 5 years ago

Your output says:

Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'

I had the same problem since I only copied the docker-compose.yml. This docker compose contains a container called jhipster-alerter which references two volumes. Both these volumes can be found in this repository and should be added to your implementation. See:

ernesto-butto commented 5 years ago

I have been struggling with this issue. I tried doing it like the README says, cloning the project and running docker-compose from inside the bootstrap directory, where reference to config.yaml is correct. I had the same issue in the Windows server but worked perfectly on my production Debian server.

I think the problem is that on Windows container, you CANNOT bind or mount single files. See stack overflow link

So the volume line:

- ../jhipster-alerter/config.yaml:/opt/elastalert/config.yaml

Does not work on Windows and everything breaks