You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "James Zhao (JIRA)" <ji...@apache.org> on 2012/05/24 06:59:41 UTC
[jira] [Created] (MESOS-198) WebUI fails when the master is set to
any ip other than localhost
James Zhao created MESOS-198:
--------------------------------
Summary: WebUI fails when the master is set to any ip other than localhost
Key: MESOS-198
URL: https://issues.apache.org/jira/browse/MESOS-198
Project: Mesos
Issue Type: Bug
Components: webui
Affects Versions: 0.9.0
Environment: Ubuntu 12.04, Python 2.7.3
Reporter: James Zhao
When bin/mesos-master.sh is run, everything works fine
When bin/mesos-master.sh --ip=[ip] is run, WebUI fails with IOError('socket error', error(111, 'Connection refused'))
Traceback (most recent call last):
File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 499, in handle
return handler(**args)
File "/home/jzhao/mesos/src/webui/master/webui.py", line 51, in index
return template("index", master_port = master_port, log_dir = log_dir)
File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1796, in template
return TEMPLATES[tpl].render(**kwargs)
File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1775, in render
self.execute(stdout, **args)
File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1763, in execute
eval(self.co, env)
File "/home/jzhao/mesos/src/webui/master/index.tpl", line 10, in <module>
% data = urllib.urlopen(url).read()
File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
return opener.open(url)
File "/usr/lib/python2.7/urllib.py", line 207, in open
return getattr(self, name)(url)
File "/usr/lib/python2.7/urllib.py", line 344, in open_http
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
IOError: [Errno socket error] [Errno 111] Connection refused
With further testing, --ip=127.0.0.1 and --ip=0.0.0.0 both work fine, but --ip=127.0.1.1 and --ip=0.0.0.1 result in failure.
Someone else seems to have had this issue too:
http://mail-archives.apache.org/mod_mbox/incubator-mesos-dev/201204.mbox/%3CCAN29XDAticKq3DmU3o+UGMCWsMLViowu2OGA+MeEn4NdiJzqsA@mail.gmail.com%3E
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MESOS-198) WebUI fails when the master is set
to any ip other than localhost
Posted by "Benjamin Mahler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MESOS-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465212#comment-13465212 ]
Benjamin Mahler commented on MESOS-198:
---------------------------------------
The old (python bottle) webui is being deprecated and eventually removed in favor of the new webui (that runs on port 5050). So this will become a non-issue.
> WebUI fails when the master is set to any ip other than localhost
> -----------------------------------------------------------------
>
> Key: MESOS-198
> URL: https://issues.apache.org/jira/browse/MESOS-198
> Project: Mesos
> Issue Type: Bug
> Components: webui
> Affects Versions: 0.9.0
> Environment: Ubuntu 12.04, Python 2.7.3
> Reporter: James Zhao
>
> When bin/mesos-master.sh is run, everything works fine
> When bin/mesos-master.sh --ip=[ip] is run, WebUI fails with IOError('socket error', error(111, 'Connection refused'))
> Traceback (most recent call last):
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 499, in handle
> return handler(**args)
> File "/home/jzhao/mesos/src/webui/master/webui.py", line 51, in index
> return template("index", master_port = master_port, log_dir = log_dir)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1796, in template
> return TEMPLATES[tpl].render(**kwargs)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1775, in render
> self.execute(stdout, **args)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1763, in execute
> eval(self.co, env)
> File "/home/jzhao/mesos/src/webui/master/index.tpl", line 10, in <module>
> % data = urllib.urlopen(url).read()
> File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
> return opener.open(url)
> File "/usr/lib/python2.7/urllib.py", line 207, in open
> return getattr(self, name)(url)
> File "/usr/lib/python2.7/urllib.py", line 344, in open_http
> h.endheaders(data)
> File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
> self._send_output(message_body)
> IOError: [Errno socket error] [Errno 111] Connection refused
> With further testing, --ip=127.0.0.1 and --ip=0.0.0.0 both work fine, but --ip=127.0.1.1 and --ip=0.0.0.1 result in failure.
> Someone else seems to have had this issue too:
> http://mail-archives.apache.org/mod_mbox/incubator-mesos-dev/201204.mbox/%3CCAN29XDAticKq3DmU3o+UGMCWsMLViowu2OGA+MeEn4NdiJzqsA@mail.gmail.com%3E
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MESOS-198) WebUI fails when the master is set
to any ip other than localhost
Posted by "Jessica J (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MESOS-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283421#comment-13283421 ]
Jessica J commented on MESOS-198:
---------------------------------
Yes, I had the same problem. webui/master/index.tpl has the URL hardcoded to http://localhost. I changed it to instead use "http://" + master_ip; then I modified webui/master/webui.py, setting master_ip to the IP I used for my master and passing master_ip=master_ip as an extra context variable to the index template. My index page then loaded correctly.
So I think the solution is something along the following lines: when the webui script is started, pass an additional option master_ip (along with master_port, etc.) to match whatever IP the master is bound to, which will then also get passed to each template for rendering. I'm guessing the same thing will need to be done with the slave files (e.g., slave_ip).
This is the first time I've tried to use the WebUI, so I haven't tested my solution completely. It seems like there ought to be a better solution, but at the very least this is one that I'm fairly certain will work.
> WebUI fails when the master is set to any ip other than localhost
> -----------------------------------------------------------------
>
> Key: MESOS-198
> URL: https://issues.apache.org/jira/browse/MESOS-198
> Project: Mesos
> Issue Type: Bug
> Components: webui
> Affects Versions: 0.9.0
> Environment: Ubuntu 12.04, Python 2.7.3
> Reporter: James Zhao
>
> When bin/mesos-master.sh is run, everything works fine
> When bin/mesos-master.sh --ip=[ip] is run, WebUI fails with IOError('socket error', error(111, 'Connection refused'))
> Traceback (most recent call last):
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 499, in handle
> return handler(**args)
> File "/home/jzhao/mesos/src/webui/master/webui.py", line 51, in index
> return template("index", master_port = master_port, log_dir = log_dir)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1796, in template
> return TEMPLATES[tpl].render(**kwargs)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1775, in render
> self.execute(stdout, **args)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1763, in execute
> eval(self.co, env)
> File "/home/jzhao/mesos/src/webui/master/index.tpl", line 10, in <module>
> % data = urllib.urlopen(url).read()
> File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
> return opener.open(url)
> File "/usr/lib/python2.7/urllib.py", line 207, in open
> return getattr(self, name)(url)
> File "/usr/lib/python2.7/urllib.py", line 344, in open_http
> h.endheaders(data)
> File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
> self._send_output(message_body)
> IOError: [Errno socket error] [Errno 111] Connection refused
> With further testing, --ip=127.0.0.1 and --ip=0.0.0.0 both work fine, but --ip=127.0.1.1 and --ip=0.0.0.1 result in failure.
> Someone else seems to have had this issue too:
> http://mail-archives.apache.org/mod_mbox/incubator-mesos-dev/201204.mbox/%3CCAN29XDAticKq3DmU3o+UGMCWsMLViowu2OGA+MeEn4NdiJzqsA@mail.gmail.com%3E
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MESOS-198) WebUI fails when the master is set
to any ip other than localhost
Posted by "James Zhao (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MESOS-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283625#comment-13283625 ]
James Zhao commented on MESOS-198:
----------------------------------
That worked; thanks Jessica!
Judging by threads on stackoverflow, Python doesn't know what IP a webpage it's constructing will eventually be returned from, so we'll need to pass the IP from mesos-master.sh to webui-py manually. I'm guessing it should be fairly easy for someone with knowledge of the internal communication flows.
> WebUI fails when the master is set to any ip other than localhost
> -----------------------------------------------------------------
>
> Key: MESOS-198
> URL: https://issues.apache.org/jira/browse/MESOS-198
> Project: Mesos
> Issue Type: Bug
> Components: webui
> Affects Versions: 0.9.0
> Environment: Ubuntu 12.04, Python 2.7.3
> Reporter: James Zhao
>
> When bin/mesos-master.sh is run, everything works fine
> When bin/mesos-master.sh --ip=[ip] is run, WebUI fails with IOError('socket error', error(111, 'Connection refused'))
> Traceback (most recent call last):
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 499, in handle
> return handler(**args)
> File "/home/jzhao/mesos/src/webui/master/webui.py", line 51, in index
> return template("index", master_port = master_port, log_dir = log_dir)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1796, in template
> return TEMPLATES[tpl].render(**kwargs)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1775, in render
> self.execute(stdout, **args)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1763, in execute
> eval(self.co, env)
> File "/home/jzhao/mesos/src/webui/master/index.tpl", line 10, in <module>
> % data = urllib.urlopen(url).read()
> File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
> return opener.open(url)
> File "/usr/lib/python2.7/urllib.py", line 207, in open
> return getattr(self, name)(url)
> File "/usr/lib/python2.7/urllib.py", line 344, in open_http
> h.endheaders(data)
> File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
> self._send_output(message_body)
> IOError: [Errno socket error] [Errno 111] Connection refused
> With further testing, --ip=127.0.0.1 and --ip=0.0.0.0 both work fine, but --ip=127.0.1.1 and --ip=0.0.0.1 result in failure.
> Someone else seems to have had this issue too:
> http://mail-archives.apache.org/mod_mbox/incubator-mesos-dev/201204.mbox/%3CCAN29XDAticKq3DmU3o+UGMCWsMLViowu2OGA+MeEn4NdiJzqsA@mail.gmail.com%3E
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MESOS-198) WebUI fails when the master is set
to any ip other than localhost
Posted by "Jessica J (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MESOS-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428155#comment-13428155 ]
Jessica J commented on MESOS-198:
---------------------------------
I would love to see this issue fixed so I don't have to change the template every time I recompile the source code.
> WebUI fails when the master is set to any ip other than localhost
> -----------------------------------------------------------------
>
> Key: MESOS-198
> URL: https://issues.apache.org/jira/browse/MESOS-198
> Project: Mesos
> Issue Type: Bug
> Components: webui
> Affects Versions: 0.9.0
> Environment: Ubuntu 12.04, Python 2.7.3
> Reporter: James Zhao
>
> When bin/mesos-master.sh is run, everything works fine
> When bin/mesos-master.sh --ip=[ip] is run, WebUI fails with IOError('socket error', error(111, 'Connection refused'))
> Traceback (most recent call last):
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 499, in handle
> return handler(**args)
> File "/home/jzhao/mesos/src/webui/master/webui.py", line 51, in index
> return template("index", master_port = master_port, log_dir = log_dir)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1796, in template
> return TEMPLATES[tpl].render(**kwargs)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1775, in render
> self.execute(stdout, **args)
> File "/home/jzhao/mesos/src/webui/bottle-0.8.3/bottle.py", line 1763, in execute
> eval(self.co, env)
> File "/home/jzhao/mesos/src/webui/master/index.tpl", line 10, in <module>
> % data = urllib.urlopen(url).read()
> File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
> return opener.open(url)
> File "/usr/lib/python2.7/urllib.py", line 207, in open
> return getattr(self, name)(url)
> File "/usr/lib/python2.7/urllib.py", line 344, in open_http
> h.endheaders(data)
> File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
> self._send_output(message_body)
> IOError: [Errno socket error] [Errno 111] Connection refused
> With further testing, --ip=127.0.0.1 and --ip=0.0.0.0 both work fine, but --ip=127.0.1.1 and --ip=0.0.0.1 result in failure.
> Someone else seems to have had this issue too:
> http://mail-archives.apache.org/mod_mbox/incubator-mesos-dev/201204.mbox/%3CCAN29XDAticKq3DmU3o+UGMCWsMLViowu2OGA+MeEn4NdiJzqsA@mail.gmail.com%3E
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira