I am trying to run an EMS server on a disconnected network behind an Nginx reverse-proxy in a docker swarm.
I am able to start EMS up and it looks to connect to elasticsearch without the basePath setting. As soon as I add BASEPATH to the environment EMS fails to start.
I tried to change the logging level to debug to see why it doesn't start, but I am not getting anything too obvious.
Here is the EMS stanza from my docker-compose.yml:
When I uncomment BASEPATH and restart EMS, it never enters a running state and elasticsearch cannot resolve the ems hostname. The only change I see in the logs is that the /status endpoint can no longer be resolved and gives me a status code of 404 instead of 200.
Here is the reverse-proxy snippet for completeness:
This allows kibana to resolve the EMS server with map.emsUrl: https://<host>/map set.
But this has a downside in that I cannot use variables in the proxy_pass setting. If the EMS server is down, then my reverse proxy will not start because it will try to verify that https://ems:8080 is accessible, so none of the other services will be reachable.
Also, I cannot see any of the layers from the EMS UI. I am not convinced that is related to this issue; I might need to play with the reverse proxy settings some more.
Also, I wonder why basePath didn't seem to work as intended.
hi @m.hanna thanks for reporting the issue, we'll take a look a this next week and get back to you with any findings. Thanks also for sharing your attempts as well, everything helps.
Can't check deeper now, but I did a quick test, and the basePath setting is working on my local environment (8.11) both as being passed as an environment variable and in the configuration file.
Maybe it is better to contact your Elastic support representative to get a discussion where logs or other private details are better handled?
Thanks for looking into it.
It looks to me that the main issue with setting basePath is the that /status endpoint can no longer be resolved (I get a 404 instead of the expected 200). So then the healthcheck in the docker container fails.
For running EMS with a regular docker compose, this just means that EMS will show as unhealthy, but will still start.
In a docker swarm, however, EMS fails to start at all when the container is unhealthy. I will play around with adding my own healthcheck in the compose file and see if that resolves the issue.
Definitely looks like the heathcheck settings in the container.
As a quick test, I added BASEPATH=/map back to the environment, changed the reverse proxy back to the original settings (first post), and then added
healthcheck:
disable: true
to my compose file and EMS started up fine.
Not only does Kibana see the map server using the correct URL, but the EMS UI now also works as expected.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.