In the [spark_mesos example - Dockerfile|https://github.com/apache/zeppelin/blob/master/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile], there are some issues.
- The original used SPARK_VERSION=2.1.2 is not available now, update it to 2.4.0
- There is no package named libevent2-devel, it should be corrected to libevent-devel
- Update from centos6 to centos7
- Update from jdk7 to jdk8
In the [spark_mesos example - entrypoint.sh|https://github.com/apache/zeppelin/blob/master/scripts/docker/spark-cluster-managers/spark_mesos/entrypoint.sh]:
- Follow the instructionszeppelin on spark mesos mode - configure spark interpreter in zeppelin add the two environment variables.
- add --hostname flag to the command mesos-master. This solves the problem of "Failed to connect to xx.xx.xx.xx:5050".