{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/11490","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/11490/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/11490/comments","events_url":"https://api.github.com/repos/apache/spark/issues/11490/events","html_url":"https://github.com/apache/spark/pull/11490","id":138129367,"number":11490,"title":"[SPARK-13117] [Web UI] WebUI should use the local ip not 0.0.0.0","user":{"login":"devaraj-kavali","id":3174804,"avatar_url":"https://avatars.githubusercontent.com/u/3174804?v=3","gravatar_id":"","url":"https://api.github.com/users/devaraj-kavali","html_url":"https://github.com/devaraj-kavali","followers_url":"https://api.github.com/users/devaraj-kavali/followers","following_url":"https://api.github.com/users/devaraj-kavali/following{/other_user}","gists_url":"https://api.github.com/users/devaraj-kavali/gists{/gist_id}","starred_url":"https://api.github.com/users/devaraj-kavali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devaraj-kavali/subscriptions","organizations_url":"https://api.github.com/users/devaraj-kavali/orgs","repos_url":"https://api.github.com/users/devaraj-kavali/repos","events_url":"https://api.github.com/users/devaraj-kavali/events{/privacy}","received_events_url":"https://api.github.com/users/devaraj-kavali/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-03-03T09:46:09Z","updated_at":"2016-03-07T12:50:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11490","html_url":"https://github.com/apache/spark/pull/11490","diff_url":"https://github.com/apache/spark/pull/11490.diff","patch_url":"https://github.com/apache/spark/pull/11490.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nIn WebUI, now Jetty Server starts with SPARK_LOCAL_IP config value if it\r\nis configured otherwise it starts with default value as '0.0.0.0'.\r\n\r\nIt is continuation as per the closed PR https://github.com/apache/spark/pull/11133 for the JIRA SPARK-13117 and discussion in SPARK-13117.\r\n\r\n## How was this patch tested?\r\n\r\nThis has been verified using the command 'netstat -tnlp | grep <PID>' to check on which IP/hostname is binding with the below steps. \r\n\r\nIn the below results, mentioned PID in the command is the corresponding process id.\r\n\r\n#### Without the patch changes, \r\nWeb UI(Jetty Server) is not taking the value configured for SPARK_LOCAL_IP and it is listening to all the interfaces. \r\n###### Master\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 3930\r\ntcp6       0      0 :::8080                 :::*                    LISTEN      3930/java\r\n```\r\n\r\n\r\n###### Worker\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4090\r\ntcp6       0      0 :::8081                 :::*                    LISTEN      4090/java\r\n```\r\n\r\n###### History Server Process, \r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 2471\r\ntcp6       0      0 :::18080                :::*                    LISTEN      2471/java\r\n```\r\n###### Driver\r\n```\r\n[devaraj@stobdtserver2 spark-master]$ netstat -tnlp | grep 6556\r\ntcp6       0      0 :::4040                 :::*                    LISTEN      6556/java\r\n```\r\n\r\n\r\n#### With the patch changes\r\n\r\n##### i. With SPARK_LOCAL_IP configured\r\nIf the SPARK_LOCAL_IP is configured then all the processes Web UI(Jetty Server) is getting bind to the configured value.\r\n###### Master\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 1561\r\ntcp6       0      0 x.x.x.x:8080       :::*                    LISTEN      1561/java\r\n```\r\n###### Worker \r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 2229\r\ntcp6       0      0 x.x.x.x:8081       :::*                    LISTEN      2229/java\r\n```\r\n###### History Server\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 3747\r\ntcp6       0      0 x.x.x.x:18080      :::*                    LISTEN      3747/java\r\n```\r\n###### Driver\r\n```\r\n[devaraj@stobdtserver2 spark-master]$ netstat -tnlp | grep 6013\r\ntcp6       0      0 x.x.x.x:4040       :::*                    LISTEN      6013/java\r\n```\r\n\r\n##### ii. Without SPARK_LOCAL_IP configured\r\nIf the SPARK_LOCAL_IP is not configured then all the processes Web UI(Jetty Server) will start with the '0.0.0.0' as default value.\r\n###### Master\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4573\r\ntcp6       0      0 :::8080                 :::*                    LISTEN      4573/java\r\n```\r\n\r\n\r\n###### Worker\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4703\r\ntcp6       0      0 :::8081                 :::*                    LISTEN      4703/java\r\n```\r\n\r\n###### History Server\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 4846\r\ntcp6       0      0 :::18080                :::*                    LISTEN      4846/java\r\n```\r\n\r\n###### Driver\r\n```\r\n[devaraj@stobdtserver2 sbin]$ netstat -tnlp | grep 5437\r\ntcp6       0      0 :::4040                 :::*                    LISTEN      5437/java\r\n```"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/193236703","html_url":"https://github.com/apache/spark/pull/11490#issuecomment-193236703","issue_url":"https://api.github.com/repos/apache/spark/issues/11490","id":193236703,"user":{"login":"srowen","id":822522,"avatar_url":"https://avatars.githubusercontent.com/u/822522?v=3","gravatar_id":"","url":"https://api.github.com/users/srowen","html_url":"https://github.com/srowen","followers_url":"https://api.github.com/users/srowen/followers","following_url":"https://api.github.com/users/srowen/following{/other_user}","gists_url":"https://api.github.com/users/srowen/gists{/gist_id}","starred_url":"https://api.github.com/users/srowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srowen/subscriptions","organizations_url":"https://api.github.com/users/srowen/orgs","repos_url":"https://api.github.com/users/srowen/repos","events_url":"https://api.github.com/users/srowen/events{/privacy}","received_events_url":"https://api.github.com/users/srowen/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T12:50:53Z","updated_at":"2016-03-07T12:50:53Z","body":"Hm, maybe we should log both pieces of information. It currently logs _some_ public host name that the UI has bound to, which is good. but maybe the message can include what it tried to bind to. How about `Bound $className to $host, and started at $publicHostName:$boundPort`"}}