sagecell spkg

176 views
Skip to first unread message

Jason Grout

unread,
Mar 30, 2012, 1:05:22 AM3/30/12
to sage-...@googlegroups.com
For anyone interested in working with the sage cell server, we've made
an experimental spkg and posted it here:

http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg

It's sort of hefty (~45MB) because it includes all of MathJax, which is
something like 200MB uncompressed for all the image fonts. When MathJax
is included in Sage, we won't have to do that, and the cell server will
be on the order of a few megabytes.

This works for sage 5.0 beta 6 *with the new notebook* (testing welcome,
and rebasing to newer betas welcome!):

# follow the instructions on trac #11080 to install the new notebook, then:
sage -i http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg

After installing, open up two terminals:

cd $SAGE_ROOT/devel/sagecell
sage ./start_web.py

and

cd $SAGE_ROOT/devel/sagecell
sage ./start_device.py


Then go to http://localhost:8080

(The potential troublesome spot I see in the installation is that it has
to apply two patches to Sage using queues. If you have uncommitted
changes, or if you have conflicts, that should stop the spkg installation.)

The default configuration is not secure, so you'll need to do more work
to harden the system to open it up to outside users. But at least that
should get you up and running for a personal/development server.

And, by the way, with the new notebook installed from #11080, you might
as well chip in reviewing it so it can get into Sage 5.0!

Thanks,

Jason

P.S. I made the spkg by doing 'sage sage-spkg/spkg-dist' in the sagecell
directory.

Dima Pasechnik

unread,
Mar 30, 2012, 1:28:32 AM3/30/12
to sage-...@googlegroups.com


On Friday, 30 March 2012 13:05:22 UTC+8, jason wrote:
For anyone interested in working with the sage cell server, we've made
an experimental spkg and posted it here:

http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg

It's sort of hefty (~45MB) because it includes all of MathJax, which is
something like 200MB uncompressed for all the image fonts.  When MathJax
is included in Sage, we won't have to do that, and the cell server will
be on the order of a few megabytes.

is there any real reason to include MathJax?
MathJax works reasonably well when it pulls
everything needed from the web.
I would rather see it as an optional package.

Jason Grout

unread,
Mar 30, 2012, 1:40:05 AM3/30/12
to sage-...@googlegroups.com
On 3/30/12 12:28 AM, Dima Pasechnik wrote:
>
>
> On Friday, 30 March 2012 13:05:22 UTC+8, jason wrote:
>
> For anyone interested in working with the sage cell server, we've made
> an experimental spkg and posted it here:
>
> http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg
> <http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg>
>
> It's sort of hefty (~45MB) because it includes all of MathJax, which is
> something like 200MB uncompressed for all the image fonts. When MathJax
> is included in Sage, we won't have to do that, and the cell server will
> be on the order of a few megabytes.
>
> is there any real reason to include MathJax?
> MathJax works reasonably well when it pulls
> everything needed from the web.
> I would rather see it as an optional package.

Our purpose is to make a single self-contained spkg that does not
require web access to install or use on localhost.

It would be trivial to exclude mathjax and download it when the spkg is
installed. It would also be trivial to use the MathJax CDN if so
desired. If someone wants to submit pull requests to implement these
features, they are more than welcome. We're going for
ease-of-installation of a flexible development environment in this
experimental spkg.

The hope is that "real soon now" we'll have the new notebook and MathJax
included in Sage. Then the sagecell spkg will drop to a few MB.

Thanks,

Jason

Julien Puydt

unread,
Mar 30, 2012, 1:21:28 AM3/30/12
to sage-...@googlegroups.com
Le jeudi 29 mars, Dima Pasechnik a écrit:

> is there any real reason to include MathJax?
> MathJax works reasonably well when it pulls
> everything needed from the web.

Uh... I'd rather be able to use sage from a slow connection or offline!

Snark on #sagemath

William Stein

unread,
Mar 30, 2012, 3:23:08 AM3/30/12
to sage-...@googlegroups.com
On Fri, Mar 30, 2012 at 6:05 AM, Jason Grout
<jason...@creativetrax.com> wrote:
> For anyone interested in working with the sage cell server, we've made an
> experimental spkg and posted it here:
>
> http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg
>
> It's sort of hefty (~45MB) because it includes all of MathJax, which is
> something like 200MB uncompressed for all the image fonts.  When MathJax is
> included in Sage, we won't have to do that, and the cell server will be on
> the order of a few megabytes.

This doesn't quite make sense to me, since I'm against including
"MathJax + 200MB of fonts" in Sage ever.


William

P.S. Yes, I know those 200MB of image fonts "snuck" into moinmoin
wiki, which is in Sage right now, but that will get removed.

>
> This works for sage 5.0 beta 6 *with the new notebook* (testing welcome, and
> rebasing to newer betas welcome!):
>
> # follow the instructions on trac #11080 to install the new notebook, then:
> sage -i http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg
>
> After installing, open up two terminals:
>
> cd $SAGE_ROOT/devel/sagecell
> sage ./start_web.py
>
> and
>
> cd $SAGE_ROOT/devel/sagecell
> sage ./start_device.py
>
>
> Then go to http://localhost:8080
>
> (The potential troublesome spot I see in the installation is that it has to
> apply two patches to Sage using queues.  If you have uncommitted changes, or
> if you have conflicts, that should stop the spkg installation.)
>
> The default configuration is not secure, so you'll need to do more work to
> harden the system to open it up to outside users.  But at least that should
> get you up and running for a personal/development server.
>
> And, by the way, with the new notebook installed from #11080, you might as
> well chip in reviewing it so it can get into Sage 5.0!
>
> Thanks,
>
> Jason
>
> P.S. I made the spkg by doing 'sage sage-spkg/spkg-dist' in the sagecell
> directory.
>

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Jason Grout

unread,
Mar 30, 2012, 8:08:04 AM3/30/12
to sage-...@googlegroups.com
On 3/30/12 2:23 AM, William Stein wrote:
> On Fri, Mar 30, 2012 at 6:05 AM, Jason Grout
> <jason...@creativetrax.com> wrote:
>> For anyone interested in working with the sage cell server, we've made an
>> experimental spkg and posted it here:
>>
>> http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg
>>
>> It's sort of hefty (~45MB) because it includes all of MathJax, which is
>> something like 200MB uncompressed for all the image fonts. When MathJax is
>> included in Sage, we won't have to do that, and the cell server will be on
>> the order of a few megabytes.
>
> This doesn't quite make sense to me, since I'm against including
> "MathJax + 200MB of fonts" in Sage ever.


Nope; don't do that. When we do MathJax 2.0 in the Sage notebook, we'll
use SVG fonts and delete the image fonts. We include the image fonts in
sagecell because we haven't upgraded to MathJax 2.0 yet in the cell server.

Jason

Simon King

unread,
Mar 31, 2012, 6:00:45 AM3/31/12
to sage-devel
Hi!

On 30 Mrz., 07:40, Jason Grout <jason-s...@creativetrax.com> wrote:
> On 3/30/12 12:28 AM, Dima Pasechnik wrote:
> > is there any real reason to include MathJax?
> > MathJax works reasonably well when it pulls
> > everything needed from the web.
> > I would rather see it as an optional package.
>
> Our purpose is to make a single self-contained spkg that does not
> require web access to install or use on localhost.

To me, that sounds like an argument for *not* including it by default.

Do I understand correctly that it is only needed to download the fonts
*once*? Or would it be needed in every new session with the single
cell server?

I'd say:
* If a user doesn't mind to pull fonts from the web, then there is no
reason to have an oversized standard package.
* If a user really *never ever* wants to be connected with the
internet while running the single cell server, then s/he should better
install an optional MathJax package first.

So, I am for making MathJax an optional package *separate* from the
sagecell spkg.

Cheers,
Simon

William Stein

unread,
Mar 31, 2012, 6:05:38 AM3/31/12
to sage-...@googlegroups.com
On Sat, Mar 31, 2012 at 11:00 AM, Simon King <simon...@uni-jena.de> wrote:
> Hi!
>
> On 30 Mrz., 07:40, Jason Grout <jason-s...@creativetrax.com> wrote:
>> On 3/30/12 12:28 AM, Dima Pasechnik wrote:
>> > is there any real reason to include MathJax?
>> > MathJax works reasonably well when it pulls
>> > everything needed from the web.
>> > I would rather see it as an optional package.
>>
>> Our purpose is to make a single self-contained spkg that does not
>> require web access to install or use on localhost.
>
> To me, that sounds like an argument for *not* including it by default.
>
> Do I understand correctly that it is only needed to download the fonts
> *once*? Or would it be needed in every new session with the single
> cell server?
>
> I'd say:
>  * If a user doesn't mind to pull fonts from the web, then there is no
> reason to have an oversized standard package.

The thread started with "For anyone interested in working with the
sage cell server, we've made an experimental spkg ".
I think nobody is talking about standard packages included in Sage here.

William

>  * If a user really *never ever* wants to be connected with the
> internet while running the single cell server, then s/he should better
> install an optional MathJax package first.
>
> So, I am for making MathJax an optional package *separate* from the
> sagecell spkg.
>
> Cheers,
> Simon
>

Jason Grout

unread,
Mar 31, 2012, 9:16:34 AM3/31/12
to sage-...@googlegroups.com
On 3/31/12 5:05 AM, William Stein wrote:

> The thread started with "For anyone interested in working with the
> sage cell server, we've made an experimental spkg ".
> I think nobody is talking about standard packages included in Sage here.

That's right. The motivation for this spkg is two students who are
joining us in developing the cell server---I wanted them to have a
one-step procedure for installation, instead of the mess it was before.
I thought others might like to play with it, hence my post here. I'm
not even proposing it be included in Sage (maybe I shouldn't have used
the word experimental?)

I think eventually we'd like to either make an optional spkg or (even
better) merge the codebase into the notebook.

Jason


Simon King

unread,
Mar 31, 2012, 9:31:41 AM3/31/12
to sage-...@googlegroups.com
Hi!

On 2012-03-31, Jason Grout <jason...@creativetrax.com> wrote:
> On 3/31/12 5:05 AM, William Stein wrote:
>
>> The thread started with "For anyone interested in working with the
>> sage cell server, we've made an experimental spkg ".
>> I think nobody is talking about standard packages included in Sage here.
>
> That's right.

OK, I misunderstood that point.

> I think eventually we'd like to either make an optional spkg or (even
> better) merge the codebase into the notebook.

Why not one optional spkg for the sage cell server, and a second
optional package with the mathjax fonts, for those few people who want
the cell server but never want to use it while being connected with the
internet?

Cheers,
Simon


Jason Grout

unread,
Mar 31, 2012, 9:34:00 AM3/31/12
to sage-...@googlegroups.com
On 3/31/12 8:31 AM, Simon King wrote:
> Hi!
>
> On 2012-03-31, Jason Grout<jason...@creativetrax.com> wrote:
>> On 3/31/12 5:05 AM, William Stein wrote:
>>
>>> The thread started with "For anyone interested in working with the
>>> sage cell server, we've made an experimental spkg ".
>>> I think nobody is talking about standard packages included in Sage here.
>>
>> That's right.
>
> OK, I misunderstood that point.

Sorry, apparently I should have been more clear.

>
>> I think eventually we'd like to either make an optional spkg or (even
>> better) merge the codebase into the notebook.
>
> Why not one optional spkg for the sage cell server, and a second
> optional package with the mathjax fonts, for those few people who want
> the cell server but never want to use it while being connected with the
> internet?

I'll leave the mathjax question up to a sage notebook discussion. What
you propose is what we have now with the jsmath-image-fonts spkg.

Jason

Christian Stump

unread,
May 8, 2012, 4:23:55 AM5/8/12
to sage-...@googlegroups.com
Hi --


# follow the instructions on trac #11080 to install the new notebook, then:

sage -i http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg

I just tried, and get a trivial reject in

sage/plot/plot.py:

 Patching Sage
adding 01-sage-embedded.patch to series file
applying 01-sage-embedded.patch
patching file sage/plot/plot.py
Hunk #1 FAILED at 336
1 out of 1 hunks FAILED -- saving rejects to file sage/plot/plot.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh 01-sage-embedded.patch
Error pushing patch 01-sage-embedded.patch.

which is

-EMBEDDED_MODE = False
+from sage.misc.misc import EMBEDDED_MODE

How can I fix that?

Thanks, Christian

Jason Grout

unread,
May 8, 2012, 4:31:31 AM5/8/12
to sage-...@googlegroups.com
What version of Sage are you using?

You just need to edit that file (plot/plot.py) and make that change
(delete the EMBEDDED_MODE line, and replace it with the "from
sage.misc...." line).

You'll then need to apply the second patch:

* go to SAGE_ROOT/devel/sage/
* do: ../../sage -hg qimport -P
https://raw.github.com/sagemath/sagecell/master/sage-patches/02-sage-show.patch
* do: ../../sage -b

Then reinstall the sagecell spkg.

Jason



Christian Stump

unread,
May 8, 2012, 5:03:48 AM5/8/12
to sage-...@googlegroups.com
Thanks for your quick reply!


What version of Sage are you using?

5.0.rc0
 
You just need to edit that file (plot/plot.py) and make that change
(delete the EMBEDDED_MODE line, and replace it with the "from
sage.misc...." line).

You'll then need to apply the second patch:

* go to SAGE_ROOT/devel/sage/
* do: ../../sage -hg qimport -P
https://raw.github.com/sagemath/sagecell/master/sage-patches/02-sage-show.patch
* do: ../../sage -b

Then reinstall the sagecell spkg.

I did that, but got tons of further rejects again in plot.py after applying 02-sage-show.patch. I guess it is because of http://trac.sagemath.org/sage_trac/ticket/12857, which got merged in rc0. If you want me to, I can try to do the rebase, but the file changed quite a bit, and I guess I will mess up sth when doing the rebasing...

Jason Grout

unread,
May 9, 2012, 3:22:31 PM5/9/12
to sage-...@googlegroups.com
On 5/8/12 4:03 AM, Christian Stump wrote:
> Thanks for your quick reply!
>
> What version of Sage are you using?
>
> 5.0.rc0

I just upgraded the patches in the sagecell spkg to work for 5.0.rc0
(which is what aleph.sagemath.org is now running). So I'd suggest
trying to install it again. You may need to delete the patches it
already applied:

cd to SAGE_ROOT/devel/sage
hg qseries

if either 01-sage-embedded.patch or 02-sage-show.patch show up, then hg
qpop them off and then hg qdelete them. Email if those directions
aren't clear.

Then just do the sage -i
http://sage.math.washington.edu/home/jason/sagecell-0.9.0.spkg step again.

Thanks,

Jason


Christian Stump

unread,
May 10, 2012, 4:20:32 AM5/10/12
to sage-...@googlegroups.com
It seemed to be installing now, but when running sage ./start_device.py, I get the following error with ssh:

stumpc5@stumpc5:~/progs/sage-5.0.rc0/devel/sagecell$ sage ./start_device.py
Executing:  /home/stumpc5/progs/sage-5.0.rc0/sage  -python trusted_db.py  --untrusted-mem -1  --workers 5  --quiet ''  --untrusted-account 'localhost'  --untrusted-python '/home/stumpc5/progs/sage-5.0.rc0/sage  -python'  --untrusted-cpu -1 
PID:  31102
/usr/bin/ssh: /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no version information available (required by /usr/bin/ssh)
ssh: connect to host localhost port 22: Connection refused
lost connection
SSH process id:  31115
ssh: /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no version information available (required by ssh)
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh: connect to host localhost port 22: Connection refused

Best, Christian

Christian Stump

unread,
May 10, 2012, 6:23:52 AM5/10/12
to sage-...@googlegroups.com
It seemed to be installing now, but when running sage ./start_device.py, I get the following error with ssh:

Okay, I am slowly moving forward: I had not installed openssh-server...

Now, I get the following error message:


stumpc5@stumpc5:~/progs/sage-5.0.rc0/devel/sagecell$ sage ./start_device.py
Executing:  /home/stumpc5/progs/sage-5.0.rc0/sage  -python trusted_db.py  --untrusted-mem -1  --workers 5  --quiet ''  --untrusted-account 'localhost'  --untrusted-python '/home/stumpc5/progs/sage-5.0.rc0/sage  -python'  --untrusted-cpu -1
PID:  22308

/usr/bin/ssh: /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no version information available (required by /usr/bin/ssh)
stumpc5@localhost's password:
SSH process id:  22464

ssh: /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no version information available (required by ssh)
Pseudo-terminal will not be allocated because stdin is not a terminal.
stumpc5@localhost's password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

Traceback (most recent call last):
  File "device_process.py", line 62, in <module>
    sage.all.plot(lambda x: x, (0,1)).save(StringIO.StringIO())
  File "/home/stumpc5/progs/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 456, in wrapper
    return func(*args, **kwds)
  File "/home/stumpc5/progs/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 2191, in save
    ext = os.path.splitext(filename)[1].lower()
  File "/home/stumpc5/progs/sage-5.0.rc0/local/lib/python/posixpath.py", line 96, in splitext
    return genericpath._splitext(p, sep, altsep, extsep)
  File "/home/stumpc5/progs/sage-5.0.rc0/local/lib/python/genericpath.py", line 91, in _splitext
    sepIndex = p.rfind(sep)
AttributeError: StringIO instance has no attribute 'rfind'


Jason Grout

unread,
May 10, 2012, 9:35:00 AM5/10/12
to sage-...@googlegroups.com
This indicates that the patches to Sage did not apply successfully. Can
you check those? The patches in SAGE_ROOT/devel/sage/.hg/patches/
should exactly with the patches here:

https://github.com/sagemath/sagecell/blob/master/sage-patches/01-sage-embedded.patch

https://github.com/sagemath/sagecell/blob/master/sage-patches/02-sage-show.patch

In particular, my guess is that the second patch is not applied. If it
isn't applied, you can apply it manually by going to
SAGE_ROOT/devel/sage/ and doing:

hg qimport -P
https://github.com/sagemath/sagecell/raw/master/sage-patches/02-sage-show.patch

Then do 'sage -br' to make sure that Sage builds the new code and can
start up.

Thanks,

Jason

Christian Stump

unread,
May 10, 2012, 10:32:30 AM5/10/12
to sage-...@googlegroups.com
This indicates that the patches to Sage did not apply successfully.  Can
you check those?

thanks for your replies!

the error message has gone after reimporting the patches and building sage. Nevertheless, I still don't get the cell running:

1. The device seems to be starting somehow:


 stumpc5@stumpc5:~/progs/sage-5.0.rc0/devel/sagecell$ sage ./start_device.py
Executing:  /home/stumpc5/progs/sage-5.0.rc0/sage  -python trusted_db.py  --untrusted-mem -1  --workers 5  --quiet ''  --untrusted-account 'localhost'  --untrusted-python '/home/stumpc5/progs/sage-5.0.rc0/sage  -python'  --untrusted-cpu -1
PID:  6773

/usr/bin/ssh: /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no version information available (required by /usr/bin/ssh)
stumpc5@localhost's password:
SSH process id:  6929

ssh: /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no version information available (required by ssh)
Pseudo-terminal will not be allocated because stdin is not a terminal.
stumpc5@localhost's password:
Permission denied, please try again.

stumpc5@localhost's password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

PROCESS GROUP ID:  7104

-------------------------------------------------------------------------------

2. The server as well

stumpc5@stumpc5:~/progs/sage-5.0.rc0/devel/sagecell$ sage ./start_web.py
Executing:  /home/stumpc5/progs/sage-5.0.rc0/sage  -twistd -n web --wsgi web_server.app --port 8080
2012-05-10 16:30:59+0200 [-] Log opened.
2012-05-10 16:30:59+0200 [-] twistd 12.0.0 (/home/stumpc5/progs/sage-5.0.rc0/local/bin/python 2.7.2) starting up.
2012-05-10 16:30:59+0200 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2012-05-10 16:30:59+0200 [-] Site starting on 8080
2012-05-10 16:30:59+0200 [-] Starting factory <twisted.web.server.Site instance at 0x221eea8>

-------------------------------------------------------------------------------

But when I try to compute 1+1, I get this message in the server terminal

1336660297.76:         : Retrieved messages: []
2012-05-10 16:31:37+0200 [-] 127.0.0.1 - - [10/May/2012:14:31:37 +0000] "GET /output_poll?computation_id=242b2ec6-062b-49c2-bf13-2522c6605564&sequence=0&rand=0.18678609952491598 HTTP/1.1" 200 2 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"

again and again.

Thanks, Christian

Jason Grout

unread,
May 10, 2012, 10:43:33 AM5/10/12
to sage-...@googlegroups.com
On 5/10/12 9:32 AM, Christian Stump wrote:
> This indicates that the patches to Sage did not apply successfully. Can
>
>> you check those?
>>
>
> thanks for your replies!
>
> the error message has gone after reimporting the patches and building sage.
> Nevertheless, I still don't get the cell running:
>
> 1. The device seems to be starting somehow:
>
> stumpc5@stumpc5:~/progs/sage-5.0.rc0/devel/sagecell$ sage
> ../start_device.py
> Executing: /home/stumpc5/progs/sage-5.0.rc0/sage -python trusted_db.py
> --untrusted-mem -1 --workers 5 --quiet '' --untrusted-account
> 'localhost' --untrusted-python '/home/stumpc5/progs/sage-5.0.rc0/sage
> -python' --untrusted-cpu -1
> PID: 6773
> /usr/bin/ssh:
> /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no version
> information available (required by /usr/bin/ssh)
> stumpc5@localhost's password:
> SSH process id: 6929
> ssh: /home/stumpc5/progs/sage-5.0.rc0/local/lib/libcrypto.so.1.0.0: no
> version information available (required by ssh)
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> stumpc5@localhost's password:
> Permission denied, please try again.
> stumpc5@localhost's password:
> Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64)
>
> * Documentation: https://help.ubuntu.com/
>
> PROCESS GROUP ID: 7104

Looks good. Remember that it takes a few seconds or even a minute for
Sage to start up.

Can you copy the sagecell_config_default.py file to sagecell_config.py
and comment out the quiet: '' line in the device_config section? That
will turn on extra logging for the device process so we can see what is
happening.


>
> -------------------------------------------------------------------------------
>
> 2. The server as well
>
> stumpc5@stumpc5:~/progs/sage-5.0.rc0/devel/sagecell$ sage ./start_web.py
> Executing: /home/stumpc5/progs/sage-5.0.rc0/sage -twistd -n web --wsgi
> web_server.app --port 8080
> 2012-05-10 16:30:59+0200 [-] Log opened.
> 2012-05-10 16:30:59+0200 [-] twistd 12.0.0
> (/home/stumpc5/progs/sage-5.0.rc0/local/bin/python 2.7.2) starting up.
> 2012-05-10 16:30:59+0200 [-] reactor class:
> twisted.internet.pollreactor.PollReactor.
> 2012-05-10 16:30:59+0200 [-] Site starting on 8080
> 2012-05-10 16:30:59+0200 [-] Starting factory<twisted.web.server.Site
> instance at 0x221eea8>

Looks good.

>
> -------------------------------------------------------------------------------
>
> But when I try to compute 1+1, I get this message in the server terminal
>
> 1336660297.76: : Retrieved messages: []
> 2012-05-10 16:31:37+0200 [-] 127.0.0.1 - - [10/May/2012:14:31:37 +0000]
> "GET
> /output_poll?computation_id=242b2ec6-062b-49c2-bf13-2522c6605564&sequence=0&rand=0.18678609952491598
> HTTP/1.1" 200 2 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux
> x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"
>
> again and again.

That's not an error message. That's a log message saying your browser
is requesting output.

Thanks,

Jason

Christian Stump

unread,
May 10, 2012, 12:42:04 PM5/10/12
to sage-...@googlegroups.com

> That's not an error message.  That's a log message saying your browser is requesting output.

Thanks for your support - after I restarted both processes, it finally worked! my next step is to apply make this work on top of an applied combinat queue... (and then, on a mac machine, but I guess this will be hopeless)

Thanks again! Christian

Jason Grout

unread,
May 10, 2012, 1:28:48 PM5/10/12
to sage-...@googlegroups.com
I develop it on a mac, so it should certainly be possible!

It would be interesting to have the combinat queue with this. My guess
is that the patches we apply don't conflict with combinat patches, but
on the other hand, I've heard that the combinat patch queue is pretty
extensive.

Jason

Christian Stump

unread,
May 15, 2012, 10:55:24 AM5/15/12
to sage-...@googlegroups.com
> I develop it on a mac, so it should certainly be possible!

yes, it is working!


>It would be interesting to have the combinat queue with this.

No problem at all on sage-5.0.rc0 with the combinat queue applied!

One thing: the source url's for the js are given as absolute url's. but I want to serve localhost:8080 to some other pubic url, namely sagecell.lacim.uqam.ca. Do you know how to either give relative url's, or to change the base url?

Thanks, Christian

Christian Stump

unread,
May 15, 2012, 11:48:01 AM5/15/12
to sage-...@googlegroups.com
Another question on the single cell: is the macro in MoinMoin for #!sagecell available somewhere?

Thanks, Christian

Jason Grout

unread,
May 15, 2012, 12:09:39 PM5/15/12
to sage-...@googlegroups.com
On 5/15/12 10:48 AM, Christian Stump wrote:
> Another question on the single cell: is the macro in MoinMoin for
> #!sagecell available somewhere?

In the contrib directory:
https://github.com/sagemath/sagecell/blob/master/contrib/sagecell.py

(change the references in the wikiconfig to your combinat server, of
course...)

Thanks,

Jason


Christian Stump

unread,
May 15, 2012, 12:15:54 PM5/15/12
to sage-...@googlegroups.com

Thanks a lot! I will try to get it running...

Jason Grout

unread,
May 15, 2012, 1:35:04 PM5/15/12
to sage-...@googlegroups.com
How are you running the server? It should just work if you are using
sagecell.lacim.ugam.ca to access the server, I think. The absolute URLs
are constructed on the fly.

I just committed a change that makes the default server use a
multiprocess flask server. If you pull those latest changes, then copy
the sagecell_config_default.py file to sagecell_config.py and change the
flaskweb configuration, you can change the host and port the webserver
is listening on.

We are running aleph using nginx and uwsgi. We run it on a local port
and then William somehow has the DNS pointing the domain
aleph.sagemath.org to that local port (I'm not sure of the details on
William's side).

Thanks,

Jason

Christian Stump

unread,
May 15, 2012, 1:53:06 PM5/15/12
to sage-...@googlegroups.com
> How are you running the server?  It should just work if you are using
> sagecell.lacim.ugam.ca to access the server, I think.  The absolute URLs are
> constructed on the fly.

Okay, I now have the right url's on http://sagecell.lacim.uqam.ca/ .
Anyhow, I still don't have the cell if I am accessing the page from
the web. Might there still be something wrong the the apache
configuration?

Thanks, Christian

Christian Stump

unread,
May 15, 2012, 1:56:10 PM5/15/12
to sage-...@googlegroups.com
> Okay, I now have the right url's on http://sagecell.lacim.uqam.ca/ .
> Anyhow, I still don't have the cell if I am accessing the page from
> the web. Might there still be something wrong the the apache
> configuration?

Comparing aleph.sagemath.org and sagecell.lacim.uqam.ca, I see that
inside embedded_sagecell.js, the url's are still wrong... Do you have
an idea how to get them right?

Thanks, Christian

Christian Stump

unread,
May 15, 2012, 2:50:41 PM5/15/12
to sage-...@googlegroups.com
> Comparing aleph.sagemath.org and sagecell.lacim.uqam.ca, I see that
> inside embedded_sagecell.js, the url's are still wrong... Do you have
> an idea how to get them right?

Okay, I got it running... we had to set ProxyPreserveHost On in order
to get the url's get properly...

Thanks again for all the support, now I can start including the
singlecell into http://www.findstat.org/!

Best, Christian

Jason Grout

unread,
May 15, 2012, 3:05:08 PM5/15/12
to sage-...@googlegroups.com
Great!

It looks like you are a few commits behind the master, so you still have
the output that greys out when it is no longer active. I've changed the
master to not do that. To update to include our latest fixes, just go
to the sagecell directory and do:

git pull
make

and then restart the server. You'll need to have git installed to do that.

Thanks,

Jason

Reply all
Reply to author
Forward
0 new messages