GitHub user devaraj-kavali opened a pull request:
https://github.com/apache/spark/pull/11490
[SPARK-13117] [Web UI] WebUI should use the local ip not 0.0.0.0
## What changes were proposed in this pull request?
In WebUI, now Jetty Server starts with SPARK_PUBLIC_DNS config value if it
is configured otherwise it starts with default value as '0.0.0.0'.
It is continuation as per the closed PR
https://github.com/apache/spark/pull/11133 for the JIRA SPARK-13117 and
discussion in SPARK-13117.
## How was this patch tested?
This has been verified using the command 'netstat -tnlp | grep <PID>' to
check on which IP/hostname is binding with the below steps.
In the below results, mentioned PID in the command is the corresponding
process id.
#### Without the patch changes,
Web UI(Jetty Server) is not taking the value configured for
SPARK_PUBLIC_DNS and it is listening to all the interfaces.
###### Master
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 3930
tcp6 0 0 :::8080 :::* LISTEN
3930/java
```
###### Worker
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4090
tcp6 0 0 :::8081 :::* LISTEN
4090/java
```
###### History Server Process,
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 2471
tcp6 0 0 :::18080 :::* LISTEN
2471/java
```
###### Driver
```
[devaraj@stobdtserver2 spark-master]$ netstat -tnlp | grep 6556
tcp6 0 0 :::4040 :::* LISTEN
6556/java
```
#### With the patch changes
##### i. With SPARK_PUBLIC_DNS configured
If the SPARK_PUBLIC_DNS is configured then all the processes Web UI(Jetty
Server) is getting bind to the configured value.
###### Master
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 1561
tcp6 0 0 x.x.x.x:8080 :::* LISTEN
1561/java
```
###### Worker
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 2229
tcp6 0 0 x.x.x.x:8081 :::* LISTEN
2229/java
```
###### History Server
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 3747
tcp6 0 0 x.x.x.x:18080 :::* LISTEN
3747/java
```
###### Driver
```
[devaraj@stobdtserver2 spark-master]$ netstat -tnlp | grep 6013
tcp6 0 0 x.x.x.x:4040 :::* LISTEN
6013/java
```
##### ii. Without SPARK_PUBLIC_DNS configured
If the SPARK_PUBLIC_DNS is not configured then all the processes Web
UI(Jetty Server) will start with the '0.0.0.0' as default value.
###### Master
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4573
tcp6 0 0 :::8080 :::* LISTEN
4573/java
```
###### Worker
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4703
tcp6 0 0 :::8081 :::* LISTEN
4703/java
```
###### History Server
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4846
tcp6 0 0 :::18080 :::* LISTEN
4846/java
```
###### Driver
```
[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 5437
tcp6 0 0 :::4040 :::* LISTEN
5437/java
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/devaraj-kavali/spark SPARK-13117-v1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11490.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #11490
----
commit 1d736ff7053b0df7b42b34ae738b7a2873e718a7
Author: Devaraj K <[email protected]>
Date: 2016-03-03T09:00:24Z
[SPARK-13117] [Web UI] WebUI should use the local ip not 0.0.0.0
In WebUI, now Jetty Server starts with SPARK_PUBLIC_DNS config value if it
is configured otherwise it starts with default value as '0.0.0.0'.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]