elastic / stack-docker

Project no longer maintained.
Apache License 2.0
1.18k stars 448 forks source link

APM server setup fails #73

Open mindbat opened 5 years ago

mindbat commented 5 years ago

Just tried setting this up on my mac, following the directions in the readme.

I get the following error while running docker-compose -f setup.yml up:

setup_1  | setup_apm_server       | Loaded index template
setup_1  | setup_apm_server       | Loading dashboards (Kibana must be running and reachable)
setup_1  | setup_apm_server       | Exiting: fail to create the Kibana loader: Error creating Kibana client: Error creating Kibana client: fail to get the Kibana version: HTTP GET request to /api/status fails: <nil>. Response: {"message":"[doc][config:6.5.2]: version conflict, document already exists (current version [1]): [version_conflict_engine_exception] [doc][config:6.5.2]: version conflict, document already exists (current version [1]), with { index_uuid=\"m8fWXMZmSB... (truncated).
setup_1  | setup_apm_server exited with code 1

Even though the apm-server setup fails, the overall setup exists cleanly.

So then I try docker-compose up -d, and get this:

Creating apm_server      ... error
...

ERROR: for apm-server  Cannot create container for service apm-server: invalid mount config for type "bind": bind source path does not exist: /Users/rontoland/Code/stack-docker/config/apm-server/apm-server.keystore
ERROR: Encountered errors while bringing up the project.

Everything else seems to come up ok, but it seems there's problems getting the apm-server setup?

mindbat commented 5 years ago

Oh, and here's all the details about my docker setup:

screen shot 2019-01-08 at 10 45 11 am

Running with 4GB of memory, 2 CPUs, and 1GB swap configured.

fxdgear commented 5 years ago

@mindbat did you upgrade Elasticsearch versions?

seems the APM setup failed cause it was expecting a "clean" environment but that environment wasn't clean.

Maybe try wiping the whole thing (make sure your container, and volumes and networks are all deleted, as well as the keystores created in the config directory). the make clean target should take care of that for you. Then try again.

mindbat commented 5 years ago

@fxdgear Will do, though afaik this was the first time I'd done anything with stack-docker, so I'd be surprised if there was other state lingering around.

WilliamAshoti commented 5 years ago

Hi all, Is this problem solved? Because Iam not able to start the apm-server the following error appears: for apm-server Cannot create container for service apm-server: b'Mount denied:\nThe source path "C:path/Stack-docker-master/stack-docker-master/config/apm-server/apm-server.keystore"\ndoesn\'t exist and is not known to Docker'

Can anyone help me with that please

SteveDoeve commented 5 years ago

I get the same error for: ERROR: for auditbeat Cannot create container for service auditbeat: b'Mount denied:\nThe source path "C:/Github-repos/stack-docker-master/config/auditbeat/auditbeat.keystore"\ndoesn\'t exist and is not known to Docker' ERROR: Encountered errors while bringing up the project.

poohsen commented 5 years ago

@mindbat were you able to get past that error by any chance?

poohsen commented 5 years ago

I was able to "fix" this for myself by copying over metricbeat's keystore file into the apm-server config dir and renaming it to apm-server.keystore. Not sure if APM is working or not but I could log into kibana that way and that's enough for me.

marianobilli commented 5 years ago

I was able to solve this by running setup with the --remove-orphans option docker-compose -f setup.yml up --remove-orphans

quangduong109 commented 5 years ago

I was able to solve this by running setup with the --remove-orphans option docker-compose -f setup.yml up --remove-orphans

Thanks, it worked