I have a remote Virtual Machine and I'm developing a Spark Application that runs inside a Docker container.
2018-12-16 13:07:10 INFO main [AbstractConnector] - Started ServerConnector@79c3f01f{HTTP/1.1,[http/1.1]}{0.0.0.0:4040}
2018-12-16 13:07:10 INFO main [Utils] - Successfully started service 'SparkUI' on port 4040.
...
2018-12-16 13:07:10 INFO main [SparkUI] - Bound SparkUI to 0.0.0.0, and started at http://f58300e7e6ea:4040
The log says that it launched SparkUI correctly, but binded to the container's localhost. At this point i decided to EXPOSE port 4040 during the building phase and to publish it during run with -p 4040:4040/tcp binding the two ports.
When i try to reach <remote host name>:4040 from my local machine (in Firefox) i can't connect to SparkUI. I also tried to telnet it but nothing.
When i start the container i can see the 4040 port listeining using netstat but maybe it is not reachable from remote. How can i manage to do this?
Basically I want to reach SparkUI from my Home PC --> Remote VM --> (Docker Container with Spark UI) using my browser.
The Remote VM runs RHEL 7.