how to access to my browser in local machine from remote machine

纵饮孤独 提交于 2019-12-24 06:36:09

问题


because I run spark application on my remote machine and I want to see the progress so I need to access to spark web UI from a browser.

What should I do to be able to run my browser firefox on my local machine from the remote one in which I run my spark application?

If the distant (remote) one has an IP address:

192.yy.yy.yy

knowing that I use to access to remote machine from my local one

ssh name@xx.xx.xx.xx

ps: I can interact with the remote machine only using commands.


回答1:


Every SparkContext launches a web UI, by default on port 4040, that displays useful information about the application. This includes:

  • A list of scheduler stages and tasks
  • A summary of RDD sizes and memory usage
  • Environmental information.
  • Information about the running executors

You can access this interface by simply opening http://192.yy.yy.yy:4040 in a web browser. If multiple SparkContexts are running on the same host, they will bind to successive ports beginning with 4040 (4041, 4042, etc).

Source: Monitoring Spark

Now that you have a management server in between, you need to create tunnel to access spark UI, to create tunnel use ssh -L 4041:192.yy.yy.yy:4041 name@xx.xx.xx.xx and then access spark UI through localhost:4041




回答2:


You only need to forward UI port from server to local

ssh -L 4040:localhost:4040 name@xx.xx.xx.xx

in local machine just go to address localhost:4040 to see the progress.

ref: https://unix.stackexchange.com/questions/115897/whats-ssh-port-forwarding-and-whats-the-difference-between-ssh-local-and-remot



来源:https://stackoverflow.com/questions/39239214/how-to-access-to-my-browser-in-local-machine-from-remote-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!