Ask Your Question
2

How to access Sage from the host operating system?

asked 2011-11-01 05:20:46 -0500

Ioannis Souldatos gravatar image

updated 2011-11-01 05:23:49 -0500

Hello, I just installed Sage in a Virtual Machine (VM) using SageLIVE-511-47 and it works fine in the VM but I can not access it from the host operating system (Windows). When I point the browser to localhost:8000 in the VM, Sage appears. When I point the browser to localhost:8000 in Windows, I get an error message. (Firefox can't establish a connection to the server at localhost:8000.) It seems to me a small problem, but I have no idea what to do. Any help would be appreciated.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2011-11-01 06:14:39 -0500

Volker Braun gravatar image

updated 2011-11-01 07:37:09 -0500

You need to set up the virtual machine networking correctly. E.g. in VirtualBox the VM networking must be set to NAT or bridged, host-only is not sufficient. You also need to forward port 8000 from the host to the guest.

The Sage virtual appliance image has networking set up so that it should just work.

Edit: To forward the port in VirtualBox, go to Settings -> Network -> Adapter 1 -> Advanced -> Port Forwarding. Click on the green plus. Put in name = anything you like, Protocol TCP, Host IP 127.0.0.1, Host Port 8000, Guest IP leave blank, Guest Port 8000.

edit flag offensive delete link more

Comments

Volker Braun thank you for your answer. The VM setting is "Adapter 1:Intel PRO/1000 MT Desktop (NAT)". I guess this will do it. I do not know how to forward port 8000 from Windows to the VM. Any help?

Ioannis Souldatos gravatar imageIoannis Souldatos ( 2011-11-01 06:20:18 -0500 )edit

As a side comment: The reason I tried to create a new VM is that the pre-made Sage VM on Fedora does not support the R capabilities I needed. In particular there is no X11 installed and I keep getting error messages when I try to execute some R code with graphics. I looked around for an answer, but I didn't really find anything helpful (maybe I didn't look hard enough). My assumption was that it is an easy fix (just give an update commnand), but I am not a Unix user and I needed some more guidance than "run an update command". Some step-by-step instructions would be more helpful, but I got frustrated with what I was finding.

Ioannis Souldatos gravatar imageIoannis Souldatos ( 2011-11-01 06:23:22 -0500 )edit

I tried what you suggested: name = guestsage, Protocol TCP, Host IP 127.0.0.1, Host Port 8000, Guest IP leave blank, Guest Port 8000, but it does not work.

Ioannis Souldatos gravatar imageIoannis Souldatos ( 2011-11-01 08:23:43 -0500 )edit

Make sure you disabled your host and the guest firewall.

Volker Braun gravatar imageVolker Braun ( 2011-11-01 08:29:41 -0500 )edit

I turned off Windows Firewall. The only link to firewall on Puppy Linux I found was Menu>Network>Network Applications>Unix Firewall firewall and when I click on it, it tries to install the firewall. So, my assumption is that it is not installed. Anyway. The error message now is "The connection has timed out", but it still does not connect.

Ioannis Souldatos gravatar imageIoannis Souldatos ( 2011-11-01 08:52:45 -0500 )edit
1

answered 2011-11-02 12:20:03 -0500

Emil Widmann gravatar image

updated 2011-11-02 13:34:04 -0500

Hello Ioannis,

there seems to be a problem in the Live CD iso, but I didn't figure out yet whats exactly wrong with this connection. Maybe some rogue firewall settings? One has to keep in mind though, that using the live CD as virtual sage server is not the intended main purpose.

Please import (File > Import Appliance) this ova file in your virtual box, check that network setting is "Bridged Adapter" sage-lite-vm-a1.ova

if you click the notebook icon there should be a blue popup with the IP adress to connect. You just need the IP, you do not need to specify the port (the :8000) because the sage server is started on the default html port (80).

hope this helps, maybe you can send a short feedback if it is working. I am not so good with this networking issues and I plan a fix in the next Live CD update.

emil

edit flag offensive delete link more

Comments

Emil,thank you for the answer. I will try this and let you know what the result is. As I mentioned above, the reason why I went with the live CD is that the pre-made sage virtual machine for Windows had some problems with R graphics. This was not the case with the live CD, so I though of giving it a try. Any suggestions are welcome.

Ioannis Souldatos gravatar imageIoannis Souldatos ( 2011-11-02 12:56:01 -0500 )edit

One thing: if there is a blue text popup saying there was improper shutdown you can select <ignore> - I was in a hurry in creating that ova file. I spent a lot of time to get this plotting things right when I prepared the previous version of the Live CD last year. In the current version I notice that capabilities() in R shows a missing Tcl/Tk backend ... Dang!!! I'll add that to my todo list.

Emil Widmann gravatar imageEmil Widmann ( 2011-11-02 13:12:23 -0500 )edit

Emil, I installed the virtual image you suggested and everything works fine as of now. I just imported the "sage-lite-vm-a1.ova" to the virtual box, I accepted the settings, and after it has started I changed the network connection to "bridged connection" and that was all. Thank you all for your help.

Ioannis Souldatos gravatar imageIoannis Souldatos ( 2011-11-03 05:38:22 -0500 )edit

Emil, I looked the R capabilities and tcl/tk is not missing! The only one missing are aqua and profmen.

Ioannis Souldatos gravatar imageIoannis Souldatos ( 2011-11-03 05:57:58 -0500 )edit

Hey, excellent - I am so happy it worked out for you! And yes, the tcl/tk in the vm image I sent you (this is 511-46, but heavily stripped) should be ok, but I fear I have to fix my last release of 511-47. Ioannis - could you mark your question as solved, so that this is visible for others who might have similar problems?

Emil Widmann gravatar imageEmil Widmann ( 2011-11-03 07:38:18 -0500 )edit
1

answered 2011-11-01 12:30:25 -0500

Dirk Danckaert gravatar image

I for one never use NAT or Host only networking. I find it much easier to use Bridged Networking. The VM then truly behaves as an extra computer on the local network. When you are working at home, you probably use network addresses in the range 192.168.1.x. Assign the VM an arbitrary IP, different from the one your host machine uses. Probably you can use 192.168.1.100. Then point the browser on your windows machine to http://192.168.1.100:8000.

If your windows machine is part of a university or company network, you should consult your networkmanager as to the addresses you can/must use for the virtual machine.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-01 05:20:46 -0500

Seen: 3,194 times

Last updated: Nov 02 '11