ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 25 Oct 2013 10:10:07 +0200Running SAGE in the own networkhttps://ask.sagemath.org/question/10646/running-sage-in-the-own-network/Hi!
I'm using Fedora 18 64bits where I installed the SAGE and it runs normally when I'm using localhost:8080 and with local ip of the machine: 192.168.2.51:8080 (as an example).
I checked the firewall (ipchains) , any computer can connect to 192.168.2.51 . I'm trying to run in my tablet (and several computers in a class) the SAGE in the LAN (others programs/servers are working fine).
I did a search in google and here, I'm almost 1 week trying to solve this. I can't connect in the SAGE machine/server from other computers in the local network.
1) Can someone please explain how to set it to run locally?
2) Why not include in future releases an option to automatically turn it on to an entire network and maybe outside (public)? The security issues is up to the admin of the server.
Thank you very much for the attention.Wed, 23 Oct 2013 00:28:45 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/Answer by ppurka for <p>Hi!</p>
<p>I'm using Fedora 18 64bits where I installed the SAGE and it runs normally when I'm using localhost:8080 and with local ip of the machine: 192.168.2.51:8080 (as an example).</p>
<p>I checked the firewall (ipchains) , any computer can connect to 192.168.2.51 . I'm trying to run in my tablet (and several computers in a class) the SAGE in the LAN (others programs/servers are working fine). </p>
<p>I did a search in google and here, I'm almost 1 week trying to solve this. I can't connect in the SAGE machine/server from other computers in the local network.</p>
<p>1) Can someone please explain how to set it to run locally?</p>
<p>2) Why not include in future releases an option to automatically turn it on to an entire network and maybe outside (public)? The security issues is up to the admin of the server. </p>
<p>Thank you very much for the attention.</p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15589#post-id-15589Look at the [notebook options](http://www.sagemath.org/doc/reference/notebook/sagenb/notebook/notebook_object.html). By default it listens only to localhost. You can give the option `interface=""` to make it accept connections from other computers too.Wed, 23 Oct 2013 01:09:36 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15589#post-id-15589Comment by Luiz Roberto Meier for <p>Look at the <a href="http://www.sagemath.org/doc/reference/notebook/sagenb/notebook/notebook_object.html">notebook options</a>. By default it listens only to localhost. You can give the option <code>interface=""</code> to make it accept connections from other computers too.</p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16886#post-id-16886Still not working.Wed, 23 Oct 2013 01:32:47 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16886#post-id-16886Answer by Luca for <p>Hi!</p>
<p>I'm using Fedora 18 64bits where I installed the SAGE and it runs normally when I'm using localhost:8080 and with local ip of the machine: 192.168.2.51:8080 (as an example).</p>
<p>I checked the firewall (ipchains) , any computer can connect to 192.168.2.51 . I'm trying to run in my tablet (and several computers in a class) the SAGE in the LAN (others programs/servers are working fine). </p>
<p>I did a search in google and here, I'm almost 1 week trying to solve this. I can't connect in the SAGE machine/server from other computers in the local network.</p>
<p>1) Can someone please explain how to set it to run locally?</p>
<p>2) Why not include in future releases an option to automatically turn it on to an entire network and maybe outside (public)? The security issues is up to the admin of the server. </p>
<p>Thank you very much for the attention.</p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15596#post-id-15596Well, I don't understand why it wouldn't work. I'm out of ideas. As an alternative, you could try setting up apache as a reverse proxy, like this
<VirtualHost *:80>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
or use a different port if you have apache already running other sites (you could try using a different path on the same port, like `ProxyPass /sage http://localhost:8080/`, but I'm afraid it could break some links inside the notebook).Thu, 24 Oct 2013 06:38:55 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15596#post-id-15596Comment by Luiz Roberto Meier for <p>Well, I don't understand why it wouldn't work. I'm out of ideas. As an alternative, you could try setting up apache as a reverse proxy, like this</p>
<pre><code><VirtualHost *:80>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
</code></pre>
<p>or use a different port if you have apache already running other sites (you could try using a different path on the same port, like <code>ProxyPass /sage http://localhost:8080/</code>, but I'm afraid it could break some links inside the notebook).</p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16859#post-id-16859I will try now to redo all the steps..
1) Install of SAGE binary and test if it runs normally in localhost;
2) Reconfigure the firewall of Fedora 18;
Can you please show me the line you added in your ipchains to let other from your own network access the SAGE server?Fri, 25 Oct 2013 09:12:22 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16859#post-id-16859Comment by Luiz Roberto Meier for <p>Well, I don't understand why it wouldn't work. I'm out of ideas. As an alternative, you could try setting up apache as a reverse proxy, like this</p>
<pre><code><VirtualHost *:80>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
</code></pre>
<p>or use a different port if you have apache already running other sites (you could try using a different path on the same port, like <code>ProxyPass /sage http://localhost:8080/</code>, but I'm afraid it could break some links inside the notebook).</p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16860#post-id-16860Still not working. Just can't find the local ip address with the port 8080 or 80 whatever. But all the other services (running for lan only) runs normally, I can use apache, oracle, anything. Thanks anyway.Fri, 25 Oct 2013 09:11:07 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16860#post-id-16860Answer by Shashank for <p>Hi!</p>
<p>I'm using Fedora 18 64bits where I installed the SAGE and it runs normally when I'm using localhost:8080 and with local ip of the machine: 192.168.2.51:8080 (as an example).</p>
<p>I checked the firewall (ipchains) , any computer can connect to 192.168.2.51 . I'm trying to run in my tablet (and several computers in a class) the SAGE in the LAN (others programs/servers are working fine). </p>
<p>I did a search in google and here, I'm almost 1 week trying to solve this. I can't connect in the SAGE machine/server from other computers in the local network.</p>
<p>1) Can someone please explain how to set it to run locally?</p>
<p>2) Why not include in future releases an option to automatically turn it on to an entire network and maybe outside (public)? The security issues is up to the admin of the server. </p>
<p>Thank you very much for the attention.</p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15590#post-id-15590There is a sagecell server you can install on your network.
http://www.sagemath.org/eval.html
https://github.com/sagemath/sagecellWed, 23 Oct 2013 01:11:52 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15590#post-id-15590Comment by Luiz Roberto Meier for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16874#post-id-16874Still not working... maybe there is some .htaccess in somewhere in SAGE folders?Wed, 23 Oct 2013 15:29:00 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16874#post-id-16874Comment by ppurka for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16878#post-id-16878Are you behind a router? FTP, HTTP ( Apache ) are standard ports and your router might be allowing connections to those ports. Sage, when started as `interface=""` uses a nonstandard port 8080 by default.
Does it work if you change the port to 80? or 21? - these are the same ports as the FTP and HTTP servers. You need to launch the notebook like this:
sage -n interface="" port=80Wed, 23 Oct 2013 11:33:05 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16878#post-id-16878Comment by Luca for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16873#post-id-16873There's no `.htaccess`, Sage doesn't rely on apache, anyway. You haven't copied the whole error message in your comment, however I suspect that the error you get is a permission error: your user doesn't have the rights to listen on privileged ports. You should run the command as root (or `sudo` it).Wed, 23 Oct 2013 16:33:38 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16873#post-id-16873Comment by Luca for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16880#post-id-16880I do not agree with @Shashank. Sage's server ought to work on the local network if started with `notebook(interface="")`. This looks like a network issue. Are you able to connect to any other service on your server from the tablet? Have you tried changing port with the option `port`?Wed, 23 Oct 2013 09:22:41 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16880#post-id-16880Comment by Shashank for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16884#post-id-16884Well! I think you can't do it just by typing the ip in the url. You need to setup a sagecell server, which is different from a regular sage installation. If your computation is not resource intensive you can use the aleph server(http://aleph.sagemath.org/static/about.html), but otherwise you need to download the sagecell server from github and install it.Wed, 23 Oct 2013 02:40:05 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16884#post-id-16884Comment by Luiz Roberto Meier for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16885#post-id-16885Thank you for the links but none solved my problem. I still not be able to connect from another PC or tablet to the IP of where sage server is running. I can run it via notebook() and using interface, so, in the computer where the server is I can just type http://192.168.2.101:8080/home/mysage/ (my local_ip, path + user that I created) and it works.. but if I try from any other pc/tablet I can't connect.. maybe it isn't a sage issue but my local firewall.. I got no error message from Sage, the browsers just can't find the server.Wed, 23 Oct 2013 01:38:07 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16885#post-id-16885Comment by Luiz Roberto Meier for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16872#post-id-16872@luca The errors has gone , but I still unable to connect.Wed, 23 Oct 2013 20:33:13 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16872#post-id-16872Comment by Luiz Roberto Meier for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16879#post-id-16879Yes, @Luca , I can connect to Oracle and tested FTP and Apache. Also, I changed the 8080 to 5000, 6000, 7000 ports and still not working. I can run only in the machine , using the localhost, 192.168.2.x port 8080. I ping and the ports answers but 8080 Wed, 23 Oct 2013 10:44:02 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16879#post-id-16879Comment by Luiz Roberto Meier for <p>There is a sagecell server you can install on your network. </p>
<p><a href="http://www.sagemath.org/eval.html">http://www.sagemath.org/eval.html</a></p>
<p><a href="https://github.com/sagemath/sagecell">https://github.com/sagemath/sagecell</a></p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16875#post-id-16875After running the command told by @ppurka I got the following errors:
Executing twistd --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac"
2013-10-23 14:46:26-0200 [-] Log opened.
2013-10-23 14:46:26-0200 [-] twistd 12.3.0 (/home/lm/sage-5.11-linux-64bit-fedora_release_16_verne-x86_64-Linux/local/bin/python 2.7.5) starting up.
2013-10-23 14:46:26-0200 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2013-10-23 14:46:26-0200 [-] Traceback (most recent call last):Wed, 23 Oct 2013 13:50:48 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?comment=16875#post-id-16875Answer by Luiz Roberto Meier for <p>Hi!</p>
<p>I'm using Fedora 18 64bits where I installed the SAGE and it runs normally when I'm using localhost:8080 and with local ip of the machine: 192.168.2.51:8080 (as an example).</p>
<p>I checked the firewall (ipchains) , any computer can connect to 192.168.2.51 . I'm trying to run in my tablet (and several computers in a class) the SAGE in the LAN (others programs/servers are working fine). </p>
<p>I did a search in google and here, I'm almost 1 week trying to solve this. I can't connect in the SAGE machine/server from other computers in the local network.</p>
<p>1) Can someone please explain how to set it to run locally?</p>
<p>2) Why not include in future releases an option to automatically turn it on to an entire network and maybe outside (public)? The security issues is up to the admin of the server. </p>
<p>Thank you very much for the attention.</p>
https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15605#post-id-15605
I figure out the problem: I had to flush my iptables and then I set it again to accept connections from 192.168.x.y only at port 8080 (I can change the default port) and worked fine. Now I can 'see' my SAGE server from my tablet, laptops and desktops. No need to install it in more than 2 computers.
Also I probed the port 8080 from outside the network and it is closed/stealth (both) , so , my guess it is secure.
**Thank you all !**Fri, 25 Oct 2013 10:10:07 +0200https://ask.sagemath.org/question/10646/running-sage-in-the-own-network/?answer=15605#post-id-15605