How to access Sage from the host operating system?

i like this post (click again to cancel)
1
i dont like this post (click again to cancel)

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.

asked Nov 01 '11

Ioannis Souldatos gravatar image Ioannis Souldatos
11 1 1 5

updated Nov 01 '11

3 Answers:

i like this answer (click again to cancel)
2
i dont like this answer (click again to cancel)

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.

link

posted Nov 01 '11

Volker Braun gravatar image Volker Braun
2238 5 22 52

updated Nov 01 '11

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 (Nov 01 '11)

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 (Nov 01 '11)

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 (Nov 01 '11)

Make sure you disabled your host and the guest firewall.

Volker Braun (Nov 01 '11)

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 (Nov 01 '11)
see 3 more comments
i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel)

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.

link

posted Nov 01 '11

Dirk Danckaert gravatar image Dirk Danckaert
165 1 8
i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel)

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

link

posted Nov 02 '11

Emil Widmann gravatar image Emil Widmann
253 2 6 13

updated Nov 02 '11

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 (Nov 02 '11)

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 (Nov 02 '11)

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 (Nov 03 '11)

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

Ioannis Souldatos (Nov 03 '11)

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 (Nov 03 '11)

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Tags:

Stats:

Asked: Nov 01 '11

Seen: 608 times

Last updated: Nov 02 '11

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.