Forums

Can't get mplh5canvas to work

I can import mplh5canvas and everything works. I get a url where my plots are located.

But I can't ever get that url to load in a browser. I've tried several approaches -- uploading a script, using interpreter, using IPython, ...

Any insight greatly appreciated. I've included an IPython session below:

Python 2.7.3 (default, Oct 4 2012, 11:28:36)
IPython 0.13 -- An enhanced Interactive Python.

In [1]: import matplotlib

In [2]: import mplh5canvas

In [3]: matplotlib.use('module://mplh5canvas.backend_h5canvas')

In [4]: from pylab import *

Management interface active. Browse to http://10.124.249.231:9000 to view plots.

In [5]: x = arange(-2,2,0.01)

In [6]: plot(x,x**2)
Out[6]: [<matplotlib.lines.Line2D at 0x2895d10>]

In [7]: show()

Showing figures. Hit Ctrl-C to finish script and close figures...

Upon entering the url in a browser window...

Oops! Google Chrome could not connect to 10.124.249.231:9000

That won't work with our current infrastructure because we are still trying to work out how to allow users to bind to arbitrary ports without stepping on each others toes. Also, it loks like it tried to bind to the private address of the server and that doesn't even exist outside of our infrastructure.

We're working on making this sort of thing possible, but it will be a while before it's available.

@AppMathDoc: Welcome aboard PA. I'm glad you've joined us!!

Would SSH port forwarding act as a temporary workaround? Might well be disabled as it might be a bit of a secrity issue, but worth checking, Even if the SSH endpoint ends up being a different host, the private IP might still be routable.

If you'd like to see how we're thinking in terms of the inbound mapping for arbitrary socket servers, you can check out the blog post I did last Friday -- the problem is working out how to give an internal IP address/port number that people can bind to without running the risk of one person on a given server "stealing" the port number from another on the same server. It looks like we can solve this using network namespaces or, less directly, Linux Containers... but that needs a bit more investigation.

@giles: Interesting, thanks for sharing!

What is the status on this?