Allow Canvas to be accessible from an external IP address / port

User 794 | 10/28/2014, 2:49:42 PM

Would it be possible to allow user's to define which IP address and port they want the graph lab canvas service to run on during development?

The main reason for this request is for users who work remotely on servers.

As far as I can tell, with the current system the user must have a web-browser installed on the machine that is running graph lab create, and the canvas is only accessible from the localhost. This makes it difficult for developers working remotely, especially when company policy does not allow for downloading of data to local machines.

Thank you!


User 4 | 10/28/2014, 7:59:40 PM

The Canvas browser target is currently designed to run only on localhost for security reasons, and because the interaction between Python environment and Canvas UI is what powers the experience, so other remote users (who are not using the Python console) will not have the same experience. If you are running a Python console over a remote session (ssh) then you will have a problem with Canvas being on localhost like you describe. Exposing it over plain HTTP over the public internet would potentially leak data (the contents of your SFrames or other data structures) so it is not advisable.

However, there is a workaround you can try, which will allow a local (to your machine) web browser to access Canvas running on a remote server (over ssh).

You can find the port that Canvas is running on by calling: <pre><code>gl.canvas.gettarget().server.getport()</code></pre>

Then, run an SSH tunnel to the remote server from your local machine, forwarding that port: <pre><code>ssh -L <port>:localhost:<port> remote.server</code></pre>

Now you should be able to browse to that port on localhost (on your local machine) and get the Canvas experience locally, while having the traffic securely forwarded via SSH. You will need to leave the SSH session open while using Canvas for the port forwarding to continue. Make sure to browse to:


User 794 | 10/28/2014, 8:58:22 PM

Thank you for the help Zach! This is exactly what was needed.

User 1812 | 4/26/2015, 4:14:22 PM

I am running graph-create in a vagrant virtualbox image (ubuntu precise) and forwarding port 47362 to the host (Windows 8). And in my iPython notebook I set - gl.canvas.set_target('browser', port=47362). But the http://localhost:47362 does not work. Is there a better way to work with virtual images

User 4 | 4/27/2015, 6:52:55 PM

Hi @sravan, be sure to run this from the Windows machine (host):

ssh -L <port>:localhost:<port> remote.server

Substituting the guest IP address for "remote.server". Does this connection establish correctly? If it does not work on port 47362, can you try another port?

User 1812 | 5/1/2015, 3:03:59 PM

I get an error when I connect with 47362 or any other port. The error is ssh: connect to host xx.xx.xx.xx port 22: Bad file number".

User 4 | 5/1/2015, 5:00:47 PM

Hi @sravan, this error indicates the port or host might be blocked by a firewall rule (see Try allowing ssh through your Windows Firewall (or other firewall software) and see if that helps.

User 2568 | 1/14/2016, 2:22:05 AM

@Zach Has there been any further thought on this?

I'm running Graphlab in AWS (using the AMI provided for coursera) and accessing my work using the Jupyter notebook interface. My workstation is a Chromebox and I can do the ssh port mapping described.

Since security is the primary issue raise why not allow remove access, by providing a URL to the remote host rather than local, then 1. Privode a security warning. If I'm concered about leaking my data I don't have to use it. 2. Use HTTPS instead and secure the notebook connection at the same time.

User 4 | 1/14/2016, 4:31:35 AM

Hi @Kevin_McIsaac, we will keep this feature request in mind as we refine our product roadmap. For now there has not been any further development to allow for remote connections to the Canvas browser app. As a workaround, you could use the ipynb target (with inline output in the IPython Notebook), or the port forwarding workaround described above.

Could I ask if there is a reason you prefer to use the Canvas browser interface vs. the ipynb target?

User 2568 | 1/14/2016, 4:46:51 AM

I've been using the ipynb target, however it looks like the Canvas browser is more interactive. I thought this might help with data exploration.

User 4 | 1/14/2016, 7:10:25 AM

@Kevin_McIsaac The main feature that is missing from the ipynb target is Table View (and you will probably find this useful for interactive exploration of your data). Sorry it is not easily available right now over a non-localhost connection, but as a substitute, you could try printing various ranges of the data from within the notebook using the SFrame [printrows]( function.