Skip to content

HOWTO bind spark ui to an other address

Description

Access to Spark ui from a specific IP address instead of localhost.

Prerequisite

Your standalone is installed.

What to do ?

Update your standalone:

Open the following file

 cd $PUNCHPLATFORM_CONF_DIR/../external/spark-2.3.2-bin-hadoop2.7/conf
 vim spark-env.sh

Add and modify the following lines

#YOUR_IP = IP were you deployed spark 
 SPARK_MASTER_HOST=<YOUR_IP>
 SPARK_LOCAL_IP=<YOUR_IP>

Deploy Spark

punchplatform-spark --start 
or 
punchplatform-standalone --start

Check Spark ui

 Spark Master UI: http://<YOUR_IP>:8081
 Spark Worker UI: http://<YOUR_IP>:8084

Warning

You can't replace YOUR_IP by 0.0.0.0 (because the worker and the spark master must communicate between them)