Ask Your Question
0

Notebook hangs when run from command line

asked 2012-04-18 11:46:46 +0100

ctennenh gravatar image

updated 2015-01-23 21:58:04 +0100

FrédéricC gravatar image

I'm getting comfortable with Sage with my own work, and have tasked my students with registering at sagenb.org and working through some problems. I would like to run a Sage server from my desktop machine at home to access when I'm out, instead of trying to synchronize my worksheets.

I'm running OS X 10.7 on a Mac Mini, and have properly forwarded the appropriate port. When I run sage in the Terminal, then the command

notebook(interface='', server_pool=['sage1@localhost'], accounts=False, secure=True)

things seem to work smoothly. I can access the login screen from a remote machine, run worksheets, and evaluate commands. However, when I try to run sage from the command line with

...sage --notebook interface='' server_pool=['sage1@localhost'] accounts=False secure=True

I'm still able to access the login screen from a remote machine and run worksheets, but when I try to evaluate something it hangs. The command I'm using is something I put together from pieces I found on the Sage wiki, but I admit even after reading a number of tutorials over and over I'm still not sure what all the parameters mean.

I'd like to run this server at boot, so I'm calling it via a bash script. If there's another way to do things I'm all ears. Does anyone have any suggestions?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2012-04-18 15:02:56 +0100

Jason Grout gravatar image

I always start up my sage server by using the -c option to have Sage run a command. Here is my startup script:

#!/bin/sh

~/sage/sage -c "notebook(interface='localhost', directory='./sage_notebook.sagenb',port=8000, accounts=True, timeout=3600, server_pool=['sage%d@localhost'%i for i in range(10)], ulimit='-u 100 -t 36000 -v 500000', open_viewer=False)"

See step 8 of http://wiki.sagemath.org/SageServer

edit flag offensive delete link more
0

answered 2012-04-18 15:46:48 +0100

ctennenh gravatar image

updated 2012-04-18 20:25:36 +0100

Thanks so much. That seems to work at first, it doesn't hang, but then I get no output from evaluating a cell. It just jumps to the next line with nothing to show for it. I've tried it in Chrome and Firefox. Could it be my parameters? I'm just trying to open it up to me as a user.

edit: Playing with the settings I think I've sorted it out. I'm running /Applications/sage/sage -c "notebook(interface='',secure=True,accounts=False)" and it seems to work well. I'm not sure what caused the issue above, but it was clearly one of the settings. I appreciate the help.

edit flag offensive delete link more

Comments

It was probably the server_pool setting.

Jason Grout gravatar imageJason Grout ( 2012-04-30 10:21:18 +0100 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-04-18 11:46:46 +0100

Seen: 1,004 times

Last updated: Apr 18 '12