4

I have installed monitoring out of the box according to this link:

http://www.jhipster.tech/monitoring/

When I start with:

docker-compose up -d

Everything starts but not Elastalert:

First log:

ERROR: for monitoring_jhipster-alerter_1 Cannot start service jhipster-alerter: OCI runtime create failed: container_linux.go:296: starting container process caused "process_linux.go:398: container init caused \"rootfs_linux.go:58: mounting \\"/Users/john/source/intellij/company/app/myservice/alerts/config.yaml\\" to rootfs \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged\\" at \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged/opt/elastalert/config.yaml\\" caused \\"not a directory\\"\"": unknown: Are you trying to mount a direStarting monitoring_jhipster-import-dashboards_1

Second log:

ERROR: for jhipster-alerter Cannot start service jhipster-alerter: OCI runtime create failed: container_linux.go:296: starting container process caused "process_linux.go:398: container init caused \"rootfs_linux.go:58: mounting \\"/Users/john/source/intellij/company/app/myservice/alerts/config.yaml\\" to rootfs \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged\\" at \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/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.

Using the default docker-compose.yml file that I got with:

curl -O https://raw.githubusercontent.com/jhipster/jhipster-console/master/bootstrap/docker-compose.yml

Im not sure what this messages says?

powder366
  • 4,351
  • 7
  • 47
  • 79

1 Answers1

0

This is because the volumes path for JHipster Alerter is incorrect. Change

jhipster-alerter:
    image: jhipster/jhipster-alerter:latest
    environment:
        - ES_HOST=jhipster-elasticsearch
        - ES_PORT=9200
    volumes:
        - ../jhipster-alerter/rules/:/opt/elastalert/rules/
        - ../alerts/config.yaml:/opt/elastalert/config.yaml

To

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

As shown in https://github.com/jhipster/jhipster-console/pull/102/commits/fa5bc75ec29ca357477ac1a22203ae6cbe2af2f7.